i965: Move images to the new resolve functions
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 25 May 2017 19:30:50 +0000 (12:30 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 8 Jun 2017 05:18:53 +0000 (22:18 -0700)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h

index c7dfe14e245fa8a6c30fbf36101f94abbc030189..0cc72bfc83b5f2d12391c83b5bca61baa7e9e4be 100644 (file)
@@ -253,14 +253,7 @@ intel_update_state(struct gl_context * ctx, GLuint new_state)
             tex_obj = intel_texture_object(u->TexObj);
 
             if (tex_obj && tex_obj->mt) {
-               /* Access to images is implemented using indirect messages
-                * against data port. Normal render target write understands
-                * lossless compression but unfortunately the typed/untyped
-                * read/write interface doesn't. Therefore even lossless
-                * compressed surfaces need to be resolved prior to accessing
-                * them. Hence skip setting INTEL_MIPTREE_IGNORE_CCS_E.
-                */
-               intel_miptree_all_slices_resolve_color(brw, tex_obj->mt, 0);
+               intel_miptree_prepare_image(brw, tex_obj->mt);
 
                if (intel_miptree_is_lossless_compressed(brw, tex_obj->mt) &&
                    intel_disable_rb_aux_buffer(brw, tex_obj->mt->bo)) {
index c8fddc27030a84b5d76400d8b8e38d19da087d5a..4e913882fffa7172132d091d41c35f765f13d5cc 100644 (file)
@@ -2468,6 +2468,15 @@ intel_miptree_prepare_texture(struct brw_context *brw,
                                         aux_supported_out);
 }
 
+void
+intel_miptree_prepare_image(struct brw_context *brw,
+                            struct intel_mipmap_tree *mt)
+{
+   /* The data port doesn't understand any compression */
+   intel_miptree_prepare_access(brw, mt, 0, INTEL_REMAINING_LEVELS,
+                                0, INTEL_REMAINING_LAYERS, false, false);
+}
+
 void
 intel_miptree_prepare_fb_fetch(struct brw_context *brw,
                                struct intel_mipmap_tree *mt, uint32_t level,
index 7613db57defdd9acf563dd95134540af6003a73d..799695d0a01f4d40f4edeb4dcc2f64e2e48d1a9d 100644 (file)
@@ -1051,6 +1051,9 @@ intel_miptree_prepare_texture(struct brw_context *brw,
                               mesa_format view_format,
                               bool *aux_supported_out);
 void
+intel_miptree_prepare_image(struct brw_context *brw,
+                            struct intel_mipmap_tree *mt);
+void
 intel_miptree_prepare_fb_fetch(struct brw_context *brw,
                                struct intel_mipmap_tree *mt, uint32_t level,
                                uint32_t start_layer, uint32_t num_layers);