vkd3d-shader/msl: Add the missing output register index in msl_generate_entrypoint_epilogue().

This commit is contained in:
Feifan He 2024-10-20 20:59:14 +08:00 committed by Henri Verbeet
parent c246c8db79
commit b29f1e6cdc
Notes: Henri Verbeet 2024-11-20 15:00:07 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1243

View File

@ -715,7 +715,7 @@ static void msl_generate_entrypoint_epilogue(struct msl_generator *gen)
case VKD3D_SHADER_SV_POSITION: case VKD3D_SHADER_SV_POSITION:
vkd3d_string_buffer_printf(buffer, " output.shader_out_%u", i); vkd3d_string_buffer_printf(buffer, " output.shader_out_%u", i);
msl_print_write_mask(buffer, e->mask); 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_register_datatype(buffer, gen, vkd3d_data_type_from_component_type(e->component_type));
msl_print_write_mask(buffer, e->mask); msl_print_write_mask(buffer, e->mask);
break; break;