From d20d0fc69f4ce4f794fcae87476f892553a3c109 Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Thu, 18 Jul 2024 21:39:34 -0500 Subject: [PATCH] vkd3d-shader: Use the program parameters in spirv_compiler_alloc_spec_constant_id(). --- libs/vkd3d-shader/spirv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index af2100da..5135ee68 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -3316,12 +3316,11 @@ static uint32_t spirv_compiler_alloc_spec_constant_id(struct spirv_compiler *com { if (!compiler->current_spec_constant_id) { - const struct vkd3d_shader_spirv_target_info *info = compiler->spirv_target_info; unsigned int i, id = 0; - for (i = 0; info && i < info->parameter_count; ++i) + for (i = 0; i < compiler->program->parameter_count; ++i) { - const struct vkd3d_shader_parameter *current = &info->parameters[i]; + const struct vkd3d_shader_parameter1 *current = &compiler->program->parameters[i]; if (current->type == VKD3D_SHADER_PARAMETER_TYPE_SPECIALIZATION_CONSTANT) id = max(current->u.specialization_constant.id + 1, id);