From b29f1e6cdc2e8602870b1e01dc8d64581ab6d916 Mon Sep 17 00:00:00 2001 From: Feifan He Date: Sun, 20 Oct 2024 20:59:14 +0800 Subject: [PATCH] vkd3d-shader/msl: Add the missing output register index in msl_generate_entrypoint_epilogue(). --- libs/vkd3d-shader/msl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/msl.c b/libs/vkd3d-shader/msl.c index a0dbb063..034ac3c3 100644 --- a/libs/vkd3d-shader/msl.c +++ b/libs/vkd3d-shader/msl.c @@ -715,7 +715,7 @@ static void msl_generate_entrypoint_epilogue(struct msl_generator *gen) case VKD3D_SHADER_SV_POSITION: vkd3d_string_buffer_printf(buffer, " output.shader_out_%u", i); msl_print_write_mask(buffer, e->mask); - vkd3d_string_buffer_printf(buffer, " = %s_out", gen->prefix); + vkd3d_string_buffer_printf(buffer, " = %s_out[%u]", gen->prefix, e->register_index); msl_print_register_datatype(buffer, gen, vkd3d_data_type_from_component_type(e->component_type)); msl_print_write_mask(buffer, e->mask); break;