vkd3d-shader/ir: Always check for undominated SSA use in register relative addresses.

This commit is contained in:
Conor McCarthy 2024-04-24 18:07:16 +10:00 committed by Alexandre Julliard
parent 5e3515f191
commit 075979fa21
Notes: Alexandre Julliard 2024-04-25 00:13:55 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/828

View File

@ -5098,12 +5098,12 @@ static void register_map_undominated_use(struct vkd3d_shader_register *reg, stru
{ {
unsigned int i; unsigned int i;
if (!register_is_ssa(reg)) if (register_is_ssa(reg))
return; {
i = reg->idx[0].offset;
i = reg->idx[0].offset; if (alloc->table[i] == UINT_MAX && !vsir_block_dominates(origin_blocks[i], block))
if (alloc->table[i] == UINT_MAX && !vsir_block_dominates(origin_blocks[i], block)) alloc->table[i] = alloc->next_temp_idx++;
alloc->table[i] = alloc->next_temp_idx++; }
for (i = 0; i < reg->idx_count; ++i) for (i = 0; i < reg->idx_count; ++i)
if (reg->idx[i].rel_addr) if (reg->idx[i].rel_addr)