intel: Resolve buffers in intel_map_texture_image()
authorChad Versace <chad.versace@linux.intel.com>
Wed, 16 Nov 2011 02:21:12 +0000 (18:21 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 22 Nov 2011 18:50:51 +0000 (10:50 -0800)
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/intel/intel_tex.c

index 505e617d7096be8a3b68f159f23ac1f5ba06d315..9884a57d0fef720722960c9c1039be449da120e4 100644 (file)
@@ -171,6 +171,11 @@ intel_map_texture_image(struct gl_context *ctx,
       intel_miptree_s8z24_gather(intel, mt, tex_image->Level, slice);
    }
 
+   intel_miptree_slice_resolve_depth(intel, mt, tex_image->Level, slice);
+   if (mode & GL_MAP_WRITE_BIT) {
+      intel_miptree_slice_set_needs_hiz_resolve(mt, tex_image->Level, slice);
+   }
+
    /* For compressed formats, the stride is the number of bytes per
     * row of blocks.  intel_miptree_get_image_offset() already does
     * the divide.