OSDN Git Service

i965: added intelFlush() call in intel_get_tex_image()
authorBrian Paul <brianp@vmware.com>
Tue, 9 Jun 2009 21:07:39 +0000 (15:07 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 9 Jun 2009 21:07:39 +0000 (15:07 -0600)
Fixes the render-to-texture test in progs/tests/getteximage.c

src/mesa/drivers/dri/intel/intel_tex_image.c

index 7339015..e9a3823 100644 (file)
@@ -628,6 +628,12 @@ intel_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
    struct intel_context *intel = intel_context(ctx);
    struct intel_texture_image *intelImage = intel_texture_image(texImage);
 
+   /* If we're reading from a texture that has been rendered to, need to
+    * make sure rendering is complete.
+    * We could probably predicate this on texObj->_RenderToTexture
+    */
+   intelFlush(ctx);
+
    /* Map */
    if (intelImage->mt) {
       /* Image is stored in hardware format in a buffer managed by the