From 3ff22ac5af99ce809aefd1ae5c48d2a6092769e6 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 16 Oct 2023 21:57:55 -0500 Subject: [PATCH] vkd3d-shader/spirv: Use the array sizes for shader phase builtins as well. --- libs/vkd3d-shader/spirv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index a25edb64..f9d28b1a 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -4974,7 +4974,7 @@ static void spirv_compiler_emit_output_register(struct spirv_compiler *compiler, } static uint32_t spirv_compiler_emit_shader_phase_builtin_variable(struct spirv_compiler *compiler, - const struct vkd3d_spirv_builtin *builtin) + const struct vkd3d_spirv_builtin *builtin, const unsigned int *array_sizes, unsigned int size_count) { struct vkd3d_spirv_builder *builder = &compiler->spirv_builder; uint32_t *variable_id, id; @@ -4989,7 +4989,7 @@ static uint32_t spirv_compiler_emit_shader_phase_builtin_variable(struct spirv_c if (variable_id && *variable_id) return *variable_id; - id = spirv_compiler_emit_builtin_variable(compiler, builtin, SpvStorageClassOutput, 0); + id = spirv_compiler_emit_builtin_variable_v(compiler, builtin, SpvStorageClassOutput, array_sizes, size_count); if (is_in_fork_or_join_phase(compiler)) vkd3d_spirv_build_op_decorate(builder, id, SpvDecorationPatch, NULL, 0); @@ -5071,7 +5071,7 @@ static void spirv_compiler_emit_output(struct spirv_compiler *compiler, const st else if (builtin) { if (spirv_compiler_get_current_shader_phase(compiler)) - id = spirv_compiler_emit_shader_phase_builtin_variable(compiler, builtin); + id = spirv_compiler_emit_shader_phase_builtin_variable(compiler, builtin, array_sizes, 2); else id = spirv_compiler_emit_builtin_variable_v(compiler, builtin, storage_class, array_sizes, 2);