sna: Mark the pixmap for writing when creating the screen resources

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-03-08 11:59:02 +00:00
parent 5c5ebd6a3e
commit 6abfa4c566
2 changed files with 8 additions and 1 deletions

View File

@ -2051,6 +2051,13 @@ sna_pixmap_force_to_gpu(PixmapPtr pixmap, unsigned flags)
struct sna *sna = to_sna_from_pixmap(pixmap);
unsigned mode;
DBG(("%s: forcing creation of gpu bo (%dx%d@%d, flags=%x)\n",
__FUNCTION__,
pixmap->drawable.width,
pixmap->drawable.height,
pixmap->drawable.bitsPerPixel,
priv->create));
mode = 0;
if (priv->cpu_damage && !priv->cpu_bo)
mode |= CREATE_INACTIVE;

View File

@ -198,7 +198,7 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
return FALSE;
}
if (!sna_pixmap_force_to_gpu(sna->front, MOVE_READ)) {
if (!sna_pixmap_force_to_gpu(sna->front, MOVE_WRITE)) {
xf86DrvMsg(screen->myNum, X_ERROR,
"[intel] Failed to allocate video resources for front buffer %dx%d at depth %d\n",
screen->width,