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

This commit is contained in:
Conor McCarthy 2023-05-26 16:45:26 +10:00 committed by Alexandre Julliard
parent d46250a59b
commit 178a7677e2
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

@ -4436,10 +4436,8 @@ static unsigned int shader_register_get_io_indices(const struct vkd3d_shader_reg
array_sizes[0] = 0;
array_sizes[1] = 0;
element_idx = reg->idx[0].offset;
for (i = 1; i < 3; ++i)
for (i = 1; i < reg->idx_count; ++i)
{
if (reg->idx[i].offset == ~0u)
break;
array_sizes[1] = array_sizes[0];
array_sizes[0] = element_idx;
element_idx = reg->idx[i].offset;