sna/dri3: Don't forget to add SHM pixmaps to the list of exported DRI3 bo
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Jul 2014 07:48:58 +0000 (08:48 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Jul 2014 08:00:46 +0000 (09:00 +0100)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_dri3.c

index 5d51b41..cd4c174 100644 (file)
@@ -333,10 +333,9 @@ static int sna_dri3_fd_from_pixmap(ScreenPtr screen,
                return -1;
        }
 
-       if (bo == priv->gpu_bo && (priv->pinned & PIN_DRI3) == 0) {
-               list_add(&priv->cow_list, &sna->dri3.pixmaps);
+       if (bo == priv->gpu_bo)
                priv->pinned |= PIN_DRI3;
-       }
+       list_move(&priv->cow_list, &sna->dri3.pixmaps);
 
        *stride = (priv->pinned & PIN_DRI3) ? priv->gpu_bo->pitch : priv->cpu_bo->pitch;
        *size = kgem_bo_size((priv->pinned & PIN_DRI3) ? priv->gpu_bo : priv->cpu_bo);