From 26a62720737f00c553db5c2a7aaf14893fc07884 Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Fri, 21 Nov 2025 17:00:45 -0600 Subject: [PATCH] vkd3d-shader/hlsl: Handle HLSL_CLASS_VECTOR in hlsl_regset_index_from_deref(). Loads of components of vectors (i.e. functionally a subset of SWIZZLE instructions, but expressed using LOAD) are legal, and generated elsewhere. Due to circumstances they never reach this point currently, but we shouldn't use vkd3d_unreachable() here. --- libs/vkd3d-shader/hlsl_codegen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 30ce7cec3..19cd47f9f 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -7754,6 +7754,10 @@ bool hlsl_regset_index_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *index += 4 * idx; break; + case HLSL_CLASS_VECTOR: + *index += idx; + break; + default: vkd3d_unreachable(); }