vkd3d-shader/ir: Fully reinitialize an instruction when making it a NOP.

This commit is contained in:
Giovanni Mascellani 2023-09-11 14:51:25 +02:00 committed by Alexandre Julliard
parent 05af25eecb
commit 5220125c9f
Notes: Alexandre Julliard 2023-09-22 22:46:19 +02:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/317

View File

@ -31,11 +31,7 @@ static bool shader_instruction_is_dcl(const struct vkd3d_shader_instruction *ins
static void vkd3d_shader_instruction_make_nop(struct vkd3d_shader_instruction *ins)
{
ins->handler_idx = VKD3DSIH_NOP;
ins->dst_count = 0;
ins->src_count = 0;
ins->dst = NULL;
ins->src = NULL;
vsir_instruction_init(ins, VKD3DSIH_NOP);
}
static void shader_register_eliminate_phase_addressing(struct vkd3d_shader_register *reg,