From 34145fc3b739d21387e7df483ca902c8373ce319 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 19 Nov 2009 17:30:32 +0100 Subject: st/xorg: Try harder to ensure a shared texture has valid contents right away. --- src/gallium/state_trackers/xorg/xorg_dri2.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/state_trackers/xorg') 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); } -- cgit v1.2.3