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

Author: Sagar Ghuge <[email protected]>
Date:   Fri Apr 24 10:33:27 2020 -0700

anv: Return optimal aux state for stencil buffer compression

v2:
- Assert on aux_supported. (Nanley Chery)

Signed-off-by: Sagar Ghuge <[email protected]>
Reviewed-by: Nanley Chery <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2942>

---

 src/intel/vulkan/anv_image.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 044af4e5601..60b3911fc07 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -1359,9 +1359,6 @@ anv_layout_to_aux_state(const struct gen_device_info * 
const devinfo,
    /* All images that use an auxiliary surface are required to be tiled. */
    assert(image->planes[plane].surface.isl.tiling != ISL_TILING_LINEAR);
 
-   /* Stencil has no aux */
-   assert(aspect != VK_IMAGE_ASPECT_STENCIL_BIT);
-
    /* Handle a few special cases */
    switch (layout) {
    /* Invalid layouts */
@@ -1460,6 +1457,7 @@ anv_layout_to_aux_state(const struct gen_device_info * 
const devinfo,
 
       case ISL_AUX_USAGE_CCS_E:
       case ISL_AUX_USAGE_MCS:
+      case ISL_AUX_USAGE_STC_CCS:
          break;
 
       default:
@@ -1496,6 +1494,10 @@ anv_layout_to_aux_state(const struct gen_device_info * 
const devinfo,
          return ISL_AUX_STATE_PASS_THROUGH;
       }
 
+   case ISL_AUX_USAGE_STC_CCS:
+      assert(aux_supported);
+      return ISL_AUX_STATE_COMPRESSED_NO_CLEAR;
+
    default:
       unreachable("Unsupported aux usage");
    }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to