Mesa (master): anv/cmd_buffer: Disable CCS on gen7 color attachments upfront

Jason Ekstrand jekstrand at kemper.freedesktop.org
Sun Jul 23 03:58:36 UTC 2017


Module: Mesa
Branch: master
Commit: 8e532aa0281e0680bebd10c71bde9f35825fa0aa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8e532aa0281e0680bebd10c71bde9f35825fa0aa

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Wed Jun 28 09:35:08 2017 -0700

anv/cmd_buffer: Disable CCS on gen7 color attachments upfront

The next patch enables the use of CCS_D even when the color attachment
will not be fast-cleared. Catch the gen7 case early to simplify the
changes required.

Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/intel/vulkan/genX_cmd_buffer.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 182ea762b6..4c8ac5f6da 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -239,7 +239,11 @@ color_attachment_compute_aux_usage(struct anv_device * device,
    struct anv_attachment_state *att_state = &cmd_state->attachments[att];
    struct anv_image_view *iview = cmd_state->framebuffer->attachments[att];
 
-   if (iview->image->aux_surface.isl.size == 0) {
+   if (iview->isl.base_array_layer >=
+       anv_image_aux_layers(iview->image, iview->isl.base_level)) {
+      /* There is no aux buffer which corresponds to the level and layer(s)
+       * being accessed.
+       */
       att_state->aux_usage = ISL_AUX_USAGE_NONE;
       att_state->input_aux_usage = ISL_AUX_USAGE_NONE;
       att_state->fast_clear = false;
@@ -275,16 +279,6 @@ color_attachment_compute_aux_usage(struct anv_device * device,
           render_area.extent.height != iview->extent.height)
          att_state->fast_clear = false;
 
-      if (GEN_GEN <= 7) {
-         /* On gen7, we can't do multi-LOD or multi-layer fast-clears.  We
-          * technically can, but it comes with crazy restrictions that we
-          * don't want to deal with now.
-          */
-         if (iview->isl.base_level > 0 ||
-             iview->isl.base_array_layer > 0)
-            att_state->fast_clear = false;
-      }
-
       /* On Broadwell and earlier, we can only handle 0/1 clear colors */
       if (GEN_GEN <= 8 && !att_state->clear_color_is_zero_one)
          att_state->fast_clear = false;




More information about the mesa-commit mailing list