mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/ir: Move DCL_TEMPS removal to the generic instruction lowering pass.
This commit is contained in:
parent
8a17a5a08b
commit
9112a5be58
Notes:
Alexandre Julliard
2024-04-15 22:23:02 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Conor McCarthy (@cmccarthy) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/779
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user