Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/ir.c:
- unsigned int next_temp_idx;
+};
+static void materialize_ssas_to_temps_process_src_param(struct vsir_program *program, struct ssa_allocation *ssa, struct vkd3d_shader_src_param *src);
/* This is idempotent: it can be safely applied more than once on the
- same register. */
-static void materialize_ssas_to_temps_process_reg(struct vsir_program *program, struct vkd3d_shader_register *reg) +static void materialize_ssas_to_temps_process_reg(struct vsir_program *program, struct ssa_allocation *ssa,
struct vkd3d_shader_register *reg)
{ unsigned int i;
- if (reg->type == VKD3DSPR_SSA)
- if (reg->type == VKD3DSPR_SSA && ssa->table[reg->idx[0].offset])
Given that we're using `UINT_MAX` as a special value anyway, could we use it to mark an entry that shouldn't be translated rather than zero? This has the advantage that you don't need to fixup indices, and you can only introduce this convention in the commit that really uses it.