vkd3d-shader/spirv: Use the register index count in spirv_compiler_get_register_name().

This commit is contained in:
Conor McCarthy 2023-05-26 16:42:47 +10:00 committed by Alexandre Julliard
parent b3927726cc
commit ad08864134
Notes: Alexandre Julliard 2023-05-26 22:16:37 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/213

View File

@ -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: