Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8652
Fixes:
44fdd2ebcb27 ("aco: end reduce tmp after control flow, when used within control flow")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22011>
Temp vtmp(0, RegClass(RegType::vgpr, maxSize).as_linear());
int inserted_at = -1;
int vtmp_inserted_at = -1;
- bool vtmp_in_loop = false;
for (Block& block : program->blocks) {
need_vtmp |= cluster_size == 32;
}
- vtmp_in_loop |= need_vtmp && block.loop_nest_depth > 0;
if (need_vtmp && (int)last_top_level_block_idx != vtmp_inserted_at) {
vtmp = program->allocateTmp(vtmp.regClass());
aco_ptr<Pseudo_instruction> create{create_instruction<Pseudo_instruction>(