From 075979fa21f0975a01f3f71eaccefac29c25039a Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Wed, 24 Apr 2024 18:07:16 +1000 Subject: [PATCH] vkd3d-shader/ir: Always check for undominated SSA use in register relative addresses. --- libs/vkd3d-shader/ir.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index f313eb65..121b0fe3 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -5098,12 +5098,12 @@ static void register_map_undominated_use(struct vkd3d_shader_register *reg, stru { unsigned int i; - if (!register_is_ssa(reg)) - return; - - i = reg->idx[0].offset; - if (alloc->table[i] == UINT_MAX && !vsir_block_dominates(origin_blocks[i], block)) - alloc->table[i] = alloc->next_temp_idx++; + if (register_is_ssa(reg)) + { + i = reg->idx[0].offset; + if (alloc->table[i] == UINT_MAX && !vsir_block_dominates(origin_blocks[i], block)) + alloc->table[i] = alloc->next_temp_idx++; + } for (i = 0; i < reg->idx_count; ++i) if (reg->idx[i].rel_addr)