From: Brian Paul Date: Tue, 9 Jun 2009 21:07:39 +0000 (-0600) Subject: i965: added intelFlush() call in intel_get_tex_image() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19218fe71269d03e1a2e9fcfd0c06a9adb5cb21d;p=mesa.git 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) --- 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