st/xorg: Try harder to ensure a shared texture has valid contents right away.
authorMichel Dänzer <daenzer@vmware.com>
Thu, 19 Nov 2009 16:30:32 +0000 (17:30 +0100)
committerMichel Dänzer <daenzer@vmware.com>
Thu, 19 Nov 2009 16:30:32 +0000 (17:30 +0100)
src/gallium/state_trackers/xorg/xorg_dri2.c

index 660ea6a1ba95bcc9c547894d431f6645fb7eb96a..9a7c3568603c00e3c77890aaf2b596fe34219689 100644 (file)
@@ -127,9 +127,12 @@ driDoCreateBuffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int format)
     }
 
     if (!tex) {
+       /* First call to make sure we have a pixmap private */
        exaMoveInPixmap(private->pPixmap);
        xorg_exa_set_shared_usage(private->pPixmap);
        pScreen->ModifyPixmapHeader(private->pPixmap, 0, 0, 0, 0, 0, NULL);
+       /* Second call to make sure texture has valid contents */
+       exaMoveInPixmap(private->pPixmap);
        tex = xorg_exa_get_texture(private->pPixmap);
     }