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>
This commit is contained in:
Jesse Natalie
2023-01-11 10:44:26 -08:00
committed by Marge Bot
parent 8924fe9fc3
commit e0024a844c
+4 -2
View File
@@ -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));