vkd3d-shader/dxil: Emit 16-bit indexable temporaries as 32-bit registers.

Unless the "native low precision" flag is enabled.
vkd3d_component_type_from_data_type() currently ends up doing this
mapping for us in the SPIR-V backend, but that's about to go away.
This commit is contained in:
Henri Verbeet
2025-09-02 15:47:03 +02:00
parent e3118110bf
commit ea90f7ae2e
Notes: Henri Verbeet 2025-09-08 12:41:38 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1715

View File

@@ -3698,6 +3698,14 @@ static void sm6_parser_declare_indexable_temp(struct sm6_parser *sm6, const stru
{ {
enum vsir_data_type data_type = vsir_data_type_from_dxil(elem_type, sm6); enum vsir_data_type data_type = vsir_data_type_from_dxil(elem_type, sm6);
if (!(sm6->program->global_flags & VKD3DSGF_FORCE_NATIVE_LOW_PRECISION))
{
if (data_type == VSIR_DATA_F16)
data_type = VSIR_DATA_F32;
else if (data_type == VSIR_DATA_U16)
data_type = VSIR_DATA_U32;
}
if (ins) if (ins)
vsir_instruction_init(ins, &sm6->p.location, VSIR_OP_DCL_INDEXABLE_TEMP); vsir_instruction_init(ins, &sm6->p.location, VSIR_OP_DCL_INDEXABLE_TEMP);
else else