Skip to content
Snippets Groups Projects
Commit 9112a5be authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard
Browse files

vkd3d-shader/ir: Move DCL_TEMPS removal to the generic instruction lowering pass.

parent 8a17a5a0
No related branches found
No related tags found
1 merge request!779vkd3d-shader/spirv: Implement MAD in two operations if flagged as precise.
......@@ -56,19 +56,6 @@ static void vkd3d_shader_instruction_make_nop(struct vkd3d_shader_instruction *i
vsir_instruction_init(ins, &location, VKD3DSIH_NOP);
}
static void remove_dcl_temps(struct vsir_program *program)
{
unsigned int i;
for (i = 0; i < program->instructions.count; ++i)
{
struct vkd3d_shader_instruction *ins = &program->instructions.elements[i];
if (ins->handler_idx == VKD3DSIH_DCL_TEMPS)
vkd3d_shader_instruction_make_nop(ins);
}
}
static bool vsir_instruction_init_with_params(struct vsir_program *program,
struct vkd3d_shader_instruction *ins, const struct vkd3d_shader_location *location,
enum vkd3d_shader_opcode handler_idx, unsigned int dst_count, unsigned int src_count)
......@@ -189,6 +176,10 @@ static enum vkd3d_result vsir_program_lower_instructions(struct vsir_program *pr
return ret;
break;
case VKD3DSIH_DCL_TEMPS:
vkd3d_shader_instruction_make_nop(ins);
break;
default:
break;
}
......@@ -5767,8 +5758,6 @@ enum vkd3d_result vsir_program_normalise(struct vsir_program *program, uint64_t
{
enum vkd3d_result result = VKD3D_OK;
remove_dcl_temps(program);
if ((result = vsir_program_lower_instructions(program)) < 0)
return result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment