Mesa (master): intel/isl: Ignore base_array_layer and array_len for 3D storage surfaces

Jason Ekstrand jekstrand at kemper.freedesktop.org
Tue Sep 13 17:43:34 UTC 2016


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

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Mon Sep 12 22:31:00 2016 -0700

intel/isl: Ignore base_array_layer and array_len for 3D storage surfaces

The time we want to restrict the Z range of a 3-D surface is when rendering
to it.  For storage surfaces, we always want he full range.  However, we
still need to set MinimumArrayElement and RenderTargetViewExtent to
sensible values so we'll just set them to the reasonable defaults we used
before we started respecting the base_array_layer and array_len.

This fixes a bunch of Vulkan CTS regressions caused by 48f195d7c6483ed.

Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97790
Reviewed-by: Chad Versace <chadversary at chromium.org>

---

 src/intel/isl/isl_surface_state.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index 5845175..da1544b7 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -313,10 +313,14 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
        * Since it's already initialized to 0, we can just leave it alone for
        * texture surfaces.
        */
-      if (info->view->usage & (ISL_SURF_USAGE_RENDER_TARGET_BIT |
-                               ISL_SURF_USAGE_STORAGE_BIT)) {
+      if (info->view->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) {
          s.MinimumArrayElement = info->view->base_array_layer;
          s.RenderTargetViewExtent = info->view->array_len - 1;
+      } else if (info->view->usage & ISL_SURF_USAGE_STORAGE_BIT) {
+         s.MinimumArrayElement = 0;
+         s.RenderTargetViewExtent =
+            isl_minify(info->surf->logical_level0_px.depth,
+                       info->view->base_level) - 1;
       }
       break;
    default:




More information about the mesa-commit mailing list