Module: vkd3d Branch: master Commit: 9112a5be58f7c1a526f10f00c50f9a9768604f0a URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/9112a5be58f7c1a526f10f00c50f9a...
Author: Giovanni Mascellani gmascellani@codeweavers.com Date: Thu Apr 11 12:24:23 2024 +0200
vkd3d-shader/ir: Move DCL_TEMPS removal to the generic instruction lowering pass.
---
libs/vkd3d-shader/ir.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index 56ec26af..d38ec1df 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -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;