From: Michel Dänzer Date: Thu, 19 Nov 2009 16:30:32 +0000 (+0100) Subject: st/xorg: Try harder to ensure a shared texture has valid contents right away. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34145fc3b739d21387e7df483ca902c8373ce319;p=mesa.git st/xorg: Try harder to ensure a shared texture has valid contents right away. --- diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c index 660ea6a1ba9..9a7c3568603 100644 --- a/src/gallium/state_trackers/xorg/xorg_dri2.c +++ b/src/gallium/state_trackers/xorg/xorg_dri2.c @@ -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); }