i965: added intelFlush() call in intel_get_tex_image()

Fixes the render-to-texture test in progs/tests/getteximage.c
(cherry picked from commit a03b349153)
This commit is contained in:
Brian Paul
2009-06-09 15:07:39 -06:00
committed by Ian Romanick
parent a5b7e0c7d7
commit 19218fe712

View File

@@ -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