From ad088641344dafb449cff804a44b6d1b2245380e Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Fri, 26 May 2023 16:42:47 +1000 Subject: [PATCH] vkd3d-shader/spirv: Use the register index count in spirv_compiler_get_register_name(). --- libs/vkd3d-shader/spirv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 1b24629a..f21e24f2 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -2881,7 +2881,7 @@ static bool spirv_compiler_get_register_name(char *buffer, unsigned int buffer_s { unsigned int idx; - idx = reg->idx[1].offset != ~0u ? reg->idx[1].offset : reg->idx[0].offset; + idx = reg->idx_count ? reg->idx[reg->idx_count - 1].offset : 0; switch (reg->type) { case VKD3DSPR_RESOURCE: