mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/ir: Return early for shader model < 4 in vsir_update_dcl_temps().
This commit is contained in:
Notes:
Henri Verbeet
2025-09-19 12:54:33 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1741
@@ -9426,6 +9426,9 @@ enum vkd3d_result vsir_update_dcl_temps(struct vsir_program *program,
|
||||
struct vkd3d_shader_instruction *ins;
|
||||
unsigned int temp_count = 0;
|
||||
|
||||
if (program->shader_version.major < 4)
|
||||
return VKD3D_OK;
|
||||
|
||||
for (ins = vsir_program_iterator_tail(&it); ins; ins = vsir_program_iterator_prev(&it))
|
||||
{
|
||||
location = ins->location;
|
||||
@@ -9437,10 +9440,9 @@ enum vkd3d_result vsir_update_dcl_temps(struct vsir_program *program,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (temp_count && program->shader_version.major >= 4
|
||||
&& (ins->opcode == VSIR_OP_HS_CONTROL_POINT_PHASE
|
||||
|| ins->opcode == VSIR_OP_HS_FORK_PHASE
|
||||
|| ins->opcode == VSIR_OP_HS_JOIN_PHASE))
|
||||
if (temp_count && (ins->opcode == VSIR_OP_HS_CONTROL_POINT_PHASE
|
||||
|| ins->opcode == VSIR_OP_HS_FORK_PHASE
|
||||
|| ins->opcode == VSIR_OP_HS_JOIN_PHASE))
|
||||
{
|
||||
/* The phase didn't have a dcl_temps instruction, but we added
|
||||
* temps here, so we need to insert one. */
|
||||
@@ -9467,7 +9469,7 @@ enum vkd3d_result vsir_update_dcl_temps(struct vsir_program *program,
|
||||
}
|
||||
}
|
||||
|
||||
if (temp_count && program->shader_version.major >= 4)
|
||||
if (temp_count)
|
||||
{
|
||||
ins = vsir_program_iterator_head(&it);
|
||||
location = ins->location;
|
||||
|
||||
Reference in New Issue
Block a user