From 193692bbcbaf6fbcd8138ae8f0b0c6995d5b02c8 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 8 Mar 2023 02:47:59 +0100 Subject: [PATCH] vkd3d-shader/hlsl: Use array element type for array's regset. Currently this affects SM1 compilation only, with a minimal example like this: float4 var[3]; float4 main() : sv_target { return var[1]; } --- libs/vkd3d-shader/hlsl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index a62a76de..286c6e60 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -203,6 +203,8 @@ enum hlsl_regset hlsl_type_get_regset(const struct hlsl_type *type) vkd3d_unreachable(); } } + else if (type->type == HLSL_CLASS_ARRAY) + return hlsl_type_get_regset(type->e.array.type); vkd3d_unreachable(); }