iris: Bring back check for srgb and fast clear color.
[mesa.git] / src / gallium / drivers / iris / iris_resolve.c
index 6989f89aa21350995e5f36439a1c6e900249b9ce..08d139fcdf7f11d5e6c84f0de70f0dc88509f73e 100644 (file)
@@ -176,6 +176,11 @@ iris_predraw_resolve_framebuffer(struct iris_context *ice,
       if (z_res) {
          iris_resource_prepare_depth(ice, batch, z_res, zs_surf->u.tex.level,
                                      zs_surf->u.tex.first_layer, num_layers);
+         iris_cache_flush_for_depth(batch, z_res->bo);
+      }
+
+      if (s_res) {
+         iris_cache_flush_for_depth(batch, s_res->bo);
       }
    }
 
@@ -527,7 +532,7 @@ sample_with_hiz(const struct gen_device_info *devinfo,
  *   - 7.5.3.2 Depth Buffer Resolve
  *   - 7.5.3.3 Hierarchical Depth Buffer Resolve
  */
-static void
+void
 iris_hiz_exec(struct iris_context *ice,
               struct iris_batch *batch,
               struct iris_resource *res,
@@ -1366,12 +1371,10 @@ iris_resource_render_aux_usage(struct iris_context *ice,
        * formats.  However, there are issues with blending where it doesn't
        * properly apply the sRGB curve to the clear color when blending.
        */
-      /* XXX:
       if (devinfo->gen >= 9 && blend_enabled &&
           isl_format_is_srgb(render_format) &&
-          !isl_color_value_is_zero_one(res->fast_clear_color, render_format))
+          !isl_color_value_is_zero_one(res->aux.clear_color, render_format))
          return ISL_AUX_USAGE_NONE;
-         */
 
       if (res->aux.usage == ISL_AUX_USAGE_CCS_E &&
           format_ccs_e_compat_with_resource(devinfo, res, render_format))