From 5220125c9ff918e04f14b6273be067c6c7735ef0 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Mon, 11 Sep 2023 14:51:25 +0200 Subject: [PATCH] vkd3d-shader/ir: Fully reinitialize an instruction when making it a NOP. --- libs/vkd3d-shader/ir.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index fa6880f3..c3168545 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -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,