No idea why this wasn't done if pc.first was a renamed temporary.
Fixes navi10 RA validation error with
dEQP-VK.binding_model.descriptor_buffer.multiple.graphics_geom_buffers1_sets3_imm_samplers
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8349
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21501>
/* rename */
std::unordered_map<unsigned, Temp>::iterator orig_it = ctx.orig_names.find(pc.first.tempId());
- Temp orig = pc.first.getTemp();
- if (orig_it != ctx.orig_names.end())
- orig = orig_it->second;
- else
- ctx.orig_names[pc.second.tempId()] = orig;
+ Temp orig = orig_it != ctx.orig_names.end() ? orig_it->second : pc.first.getTemp();
+ ctx.orig_names[pc.second.tempId()] = orig;
ctx.renames[block.index][orig.id()] = pc.second.getTemp();
/* otherwise, this is a live-in and we need to create a new phi