<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 14, 2017 at 12:18 PM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The description under RENDER_SURFACE_STATE::<wbr>RedClearColor says,<br>
<br>
   For Sampling Engine Multisampled Surfaces and Render Targets:<br>
    Specifies the clear value for the red channel.<br>
   For Other Surfaces:<br>
    This field is ignored.<br>
<br>
This means that the sampler on BDW doesn't support CCS.<br>
<br>
Cc: Samuel Iglesias Gonsálvez <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>><br>
Cc: Jordan Justen <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>><br>
Cc: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
Cc: <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.<wbr>freedesktop.org</a>><br>
Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
---<br>
 src/intel/vulkan/anv_blorp.c       | 11 -----------<br>
 src/intel/vulkan/genX_cmd_<wbr>buffer.c | 32 +++++++++++++-----------------<wbr>--<br>
 2 files changed, 13 insertions(+), 30 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c<br>
index 4904ee3a5f..8a3c4deed3 100644<br>
--- a/src/intel/vulkan/anv_blorp.c<br>
+++ b/src/intel/vulkan/anv_blorp.c<br>
@@ -1381,7 +1381,6 @@ ccs_resolve_attachment(struct anv_cmd_buffer *cmd_buffer,<br>
     * still hot in the cache.<br>
     */<br>
    bool found_draw = false;<br>
-   bool self_dep = false;<br>
    enum anv_subpass_usage usage = 0;<br>
    for (uint32_t s = subpass_idx + 1; s < pass->subpass_count; s++) {<br>
       usage |= pass->attachments[att].<wbr>subpass_usage[s];<br>
@@ -1391,8 +1390,6 @@ ccs_resolve_attachment(struct anv_cmd_buffer *cmd_buffer,<br>
           * wait to resolve until then.<br>
           */<br>
          found_draw = true;<br>
-         if (pass->attachments[att].<wbr>subpass_usage[s] & ANV_SUBPASS_USAGE_INPUT)<br>
-            self_dep = true;<br>
          break;<br>
       }<br>
    }<br>
@@ -1451,14 +1448,6 @@ ccs_resolve_attachment(struct anv_cmd_buffer *cmd_buffer,<br>
           *    binding this surface to Sampler."<br>
           */<br>
          resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_<wbr>PARTIAL;<br>
-      } else if (cmd_buffer->device->info.gen == 8 && self_dep &&<br>
-                 att_state->input_aux_usage == ISL_AUX_USAGE_CCS_D) {<br>
-         /* On Broadwell we still need to do resolves when there is a<br>
-          * self-dependency because HW could not see fast-clears and works<br>
-          * on the render cache as if there was regular non-fast-clear surface.<br>
-          * To avoid any inconsistency, we force the resolve.<br>
-          */<br>
-         resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_<wbr>FULL;<br>
       }<br>
    }<br>
<br>
diff --git a/src/intel/vulkan/genX_cmd_<wbr>buffer.c b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
index b78b13d88e..2e0108d3f5 100644<br>
--- a/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
+++ b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
@@ -291,27 +291,21 @@ color_attachment_compute_aux_<wbr>usage(struct anv_device *device,<br>
       att_state->input_aux_usage = ISL_AUX_USAGE_CCS_E;<br>
    } else if (att_state->fast_clear) {<br>
       att_state->aux_usage = ISL_AUX_USAGE_CCS_D;<br>
-      if (GEN_GEN >= 9 &&<br>
-          !isl_format_supports_ccs_e(&<wbr>device->info, iview->isl.format)) {<br>
-         /* From the Sky Lake PRM, RENDER_SURFACE_STATE::<wbr>AuxiliarySurfaceMode:<br>
-          *<br>
-          *    "If Number of Multisamples is MULTISAMPLECOUNT_1, AUX_CCS_D<br>
-          *    setting is only allowed if Surface Format supported for Fast<br>
-          *    Clear. In addition, if the surface is bound to the sampling<br>
-          *    engine, Surface Format must be supported for Render Target<br>
-          *    Compression for surfaces bound to the sampling engine."<br>
-          *<br>
-          * In other words, we can't sample from a fast-cleared image if it<br>
-          * doesn't also support color compression.<br>
-          */<br>
-         att_state->input_aux_usage = ISL_AUX_USAGE_NONE;<br>
-      } else if (GEN_GEN >= 8) {<br>
-         /* Broadwell/Skylake can sample from fast-cleared images */<br>
+      /* From the Sky Lake PRM, RENDER_SURFACE_STATE::<wbr>AuxiliarySurfaceMode:<br>
+       *<br>
+       *    "If Number of Multisamples is MULTISAMPLECOUNT_1, AUX_CCS_D<br>
+       *    setting is only allowed if Surface Format supported for Fast<br>
+       *    Clear. In addition, if the surface is bound to the sampling<br>
+       *    engine, Surface Format must be supported for Render Target<br>
+       *    Compression for surfaces bound to the sampling engine."<br>
+       *<br>
+       * In other words, we can only sample from a fast-cleared image if it<br>
+       * also supports color compression.<br>
+       */<br>
+      if (isl_format_supports_ccs_e(&<wbr>device->info, iview->isl.format))<br>
          att_state->input_aux_usage = ISL_AUX_USAGE_CCS_D;<br>
-      } else {<br>
-         /* Ivy Bridge and Haswell cannot */<br>
+      else<br>
          att_state->input_aux_usage = ISL_AUX_USAGE_NONE;<br>
-      }<br>
    } else {<br>
       att_state->aux_usage = ISL_AUX_USAGE_NONE;<br>
       att_state->input_aux_usage = ISL_AUX_USAGE_NONE;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.12.2<br>
<br>
</font></span></blockquote></div><br></div>