vkd3d-shader/glsl: Use the semantic index for shader_out_* declarations.

Because that's what we use in shader_glsl_print_sysval_name(). Fragment
shaders like the ones from uav-rwtexture.shader_test that output to
sv_target1 would declare "shader_out_0", but then store to
"shader_out_1" in the epilogue.
This commit is contained in:
Henri Verbeet 2024-10-05 21:10:04 +02:00
parent afb1a2610e
commit 8e47ecbd92
Notes: Henri Verbeet 2024-10-10 20:10:19 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1171

View File

@ -1820,7 +1820,7 @@ static void shader_glsl_generate_output_declarations(struct vkd3d_glsl_generator
"Internal compiler error: Unhandled output component type %#x.", e->component_type); "Internal compiler error: Unhandled output component type %#x.", e->component_type);
break; break;
} }
vkd3d_string_buffer_printf(buffer, " shader_out_%u;\n", i); vkd3d_string_buffer_printf(buffer, " shader_out_%u;\n", e->semantic_index);
++count; ++count;
} }
if (count) if (count)