Mesa (master): radeon: fix some wine d3d9 tests

Maciej Cencora osiris at kemper.freedesktop.org
Mon Jul 12 14:42:32 PDT 2010


Module: Mesa
Branch: master
Commit: ba03a0b5ba73bc8e79d0ffa6d1da623544716f74
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba03a0b5ba73bc8e79d0ffa6d1da623544716f74

Author: Maciej Cencora <m.cencora at gmail.com>
Date:   Mon Jul 12 21:45:20 2010 +0200

radeon: fix some wine d3d9 tests

Need to flush command stream before mapping texture image
that is referenced by current cs.

Candidate for 7.8 branch.

Signed-off-by: Maciej Cencora <m.cencora at gmail.com>

---

 src/mesa/drivers/dri/radeon/radeon_tex_getimage.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c b/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c
index 3ababb1..f878b48 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c
@@ -31,6 +31,7 @@
 
 #include "radeon_common_context.h"
 #include "radeon_texture.h"
+#include "radeon_mipmap_tree.h"
 
 #include "main/texgetimage.h"
 
@@ -51,7 +52,15 @@ radeon_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
                  __func__, ctx, texObj, image, compressed);
 
     if (image->mt) {
+        radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
         /* Map the texture image read-only */
+        if (radeon_bo_is_referenced_by_cs(image->mt->bo, rmesa->cmdbuf.cs)) {
+            radeon_print(RADEON_TEXTURE, RADEON_VERBOSE,
+                "%s: called for texture that is queued for GPU processing\n",
+                __func__);
+            radeon_firevertices(rmesa);
+        }
+
         radeon_teximage_map(image, GL_FALSE);
     } else {
         /* Image hasn't been uploaded to a miptree yet */



More information about the mesa-commit mailing list