From 75bdbdd90b15c8704d87ca195a364ff6a42edbb1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 4 Nov 2009 14:54:09 -0800 Subject: intel: Don't validate in a texture image used as a render target. Otherwise, we could lose track of rendering to that image, which could easily happen during mipmap generation. --- src/mesa/drivers/dri/intel/intel_tex_validate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/intel/intel_tex_validate.c') diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c index dbef288615..c9a24ac398 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_validate.c +++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c @@ -222,8 +222,13 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) intel_texture_image(intelObj->base.Image[face][i]); /* Need to import images in main memory or held in other trees. + * If it's a render target, then its data isn't needed to be in + * the object tree (otherwise we'd be FBO incomplete), and we need + * to keep track of the image's MT as needing to be pulled in still, + * or we'll lose the rendering that's done to it. */ - if (intelObj->mt != intelImage->mt) { + if (intelObj->mt != intelImage->mt && + !intelImage->used_as_render_target) { copy_image_data_to_tree(intel, intelObj, intelImage); } } -- cgit v1.2.3