From b3927726cc6f7dfb7fc86d04cb7b58e8bbf4c7ac Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Fri, 26 May 2023 16:42:02 +1000 Subject: [PATCH] vkd3d-shader/spirv: Use the register index count in non-I/O variable registers in vkd3d_symbol_make_register(). --- 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 b38896ae..1b24629a 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -2064,7 +2064,7 @@ static void vkd3d_symbol_make_register(struct vkd3d_symbol *symbol, assert(!reg->idx_count || symbol->key.reg.idx != ~0u); } else if (reg->type != VKD3DSPR_IMMCONSTBUFFER) - symbol->key.reg.idx = reg->idx[0].offset; + symbol->key.reg.idx = reg->idx_count ? reg->idx[0].offset : ~0u; } static void vkd3d_symbol_set_register_info(struct vkd3d_symbol *symbol,