summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-11-19 17:30:32 +0100
committerMichel Dänzer <daenzer@vmware.com>2009-11-19 17:30:32 +0100
commit34145fc3b739d21387e7df483ca902c8373ce319 (patch)
tree20d050e33258ecddff4740678abde38017cc0576
parent012d0193cc9ad6fdc9829db0a6884a5a590dd4c5 (diff)
st/xorg: Try harder to ensure a shared texture has valid contents right away.
-rw-r--r--src/gallium/state_trackers/xorg/xorg_dri2.c3
1 files changed, 3 insertions, 0 deletions
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);
}