Module: Mesa
Branch: main
Commit: e0024a844cf93e1b7155c17ff5aec97bb5dc8e94
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0024a844cf93e1b7155c17ff5aec97bb5dc8e94

Author: Jesse Natalie <[email protected]>
Date:   Wed Jan 11 10:44:26 2023 -0800

microsoft/compiler: Subpass textures are supposed to be arrays

When doing multiview subpass rendering, they get loaded with the
view/layer index.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>

---

 src/microsoft/compiler/dxil_enums.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/microsoft/compiler/dxil_enums.c 
b/src/microsoft/compiler/dxil_enums.c
index ce4c0d7199c..9d29e49a056 100644
--- a/src/microsoft/compiler/dxil_enums.c
+++ b/src/microsoft/compiler/dxil_enums.c
@@ -90,9 +90,10 @@ enum dxil_resource_kind dxil_get_resource_kind(const struct 
glsl_type *type)
                             : DXIL_RESOURCE_KIND_TEXTURE1D;
          case GLSL_SAMPLER_DIM_2D:
          case GLSL_SAMPLER_DIM_EXTERNAL:
-         case GLSL_SAMPLER_DIM_SUBPASS:
             return is_array ? DXIL_RESOURCE_KIND_TEXTURE2D_ARRAY
                             : DXIL_RESOURCE_KIND_TEXTURE2D;
+         case GLSL_SAMPLER_DIM_SUBPASS:
+            return DXIL_RESOURCE_KIND_TEXTURE2D_ARRAY;
          case GLSL_SAMPLER_DIM_3D:
             return DXIL_RESOURCE_KIND_TEXTURE3D;
          case GLSL_SAMPLER_DIM_CUBE:
@@ -103,9 +104,10 @@ enum dxil_resource_kind dxil_get_resource_kind(const 
struct glsl_type *type)
          case GLSL_SAMPLER_DIM_BUF:
             return DXIL_RESOURCE_KIND_TYPED_BUFFER;
          case GLSL_SAMPLER_DIM_MS:
-         case GLSL_SAMPLER_DIM_SUBPASS_MS:
             return is_array ? DXIL_RESOURCE_KIND_TEXTURE2DMS_ARRAY
                             : DXIL_RESOURCE_KIND_TEXTURE2DMS;
+         case GLSL_SAMPLER_DIM_SUBPASS_MS:
+            return DXIL_RESOURCE_KIND_TEXTURE2DMS_ARRAY;
 
          default:
             debug_printf("type: %s\n", glsl_get_type_name(type));

Reply via email to