<div dir="ltr"><div>Perf numbers in the commit message would be nice<br><br></div>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 Thu, Feb 2, 2017 at 8:15 AM, 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"><span class="">Compressing a render target and decompressing it in the same<br>
single-subpass render pass may waste bandwidth. While this may be<br>
beneficial in some circumstances, it does not help in all.<br>
<br>
</span>v2 (Jason Ekstrand):<br>
- Provide a more thorough comment<br>
- Enable CCS_D for input attachments<br>
<span class=""><br>
Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
---<br>
</span> src/intel/vulkan/genX_cmd_<wbr>buffer.c | 17 ++++++++++++++---<br>
 1 file changed, 14 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/genX_cmd_<wbr>buffer.c b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
index 63911f2c8e..cba876b58e 100644<br>
--- a/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
+++ b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
@@ -266,13 +266,24 @@ color_attachment_compute_aux_<wbr>usage(struct anv_device *device,<br>
<span class="">       att_state->fast_clear = false;<br>
    }<br>
<br>
-   if (isl_format_supports_lossless_<wbr>compression(&device->info,<br>
-                                                iview->isl.format)) {<br>
</span>+   /**<br>
+    * TODO: Consider using a heuristic to determine if temporarily enabling<br>
<span class="">+    * CCS_E for this image view would be beneficial.<br>
+    *<br>
</span>+    * While fast-clear resolves and partial resolves are fairly cheap in the<br>
+    * case where you render to most of the pixels, full resolves are not<br>
+    * because they potentially involve reading and writing the entire<br>
+    * framebuffer.  If we can't texture with CCS_E, we should leave it off and<br>
+    * limit ourselves to fast clears.<br>
+    */<br>
<span class="">+   if (iview->image->aux_usage == ISL_AUX_USAGE_CCS_E) {<br>
       att_state->aux_usage = ISL_AUX_USAGE_CCS_E;<br>
       att_state->input_aux_usage = ISL_AUX_USAGE_CCS_E;<br>
    } else if (att_state->fast_clear) {<br>
</span>       att_state->aux_usage = ISL_AUX_USAGE_CCS_D;<br>
-      if (GEN_GEN >= 9) {<br>
+      if (GEN_GEN >= 9 &&<br>
+          !isl_format_supports_lossless_<wbr>compression(&device->info,<br>
+                                                    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>
<div class="HOEnZb"><div class="h5">--<br>
2.11.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>