From 178a7677e274a452ecb43cecdbf8de01a01c4308 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Fri, 26 May 2023 16:45:26 +1000 Subject: [PATCH] vkd3d-shader/spirv: Use the register index count in shader_register_get_io_indices(). --- libs/vkd3d-shader/spirv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 25d75e69..6fdb1cca 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -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;