diff options
author | Brian Paul <[email protected]> | 2009-06-09 15:07:39 -0600 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2009-06-22 15:15:20 -0700 |
commit | 19218fe71269d03e1a2e9fcfd0c06a9adb5cb21d (patch) | |
tree | f1c3d2d6889a464f9472545d278eb1df17fb3cc0 | |
parent | a5b7e0c7d73949e24d4edb1ab09b0aff367132a5 (diff) |
i965: added intelFlush() call in intel_get_tex_image()
Fixes the render-to-texture test in progs/tests/getteximage.c
(cherry picked from commit a03b349153660e449daf4f56d750f1caef23b1a5)
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 66a3b4e492b..5e61e9e95ec 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -637,6 +637,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 |