mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
aco: don't value-number instructions from within a loop with ones after the loop.
Fixes: Wolfenstein:Youngblood (w/o shader_ballot) dEQP-VK.descriptor_indexing.combined_image_sampler_in_loop_with_lod Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
This commit is contained in:
parent
46420dd294
commit
7cd548d352
1 changed files with 6 additions and 1 deletions
|
|
@ -256,9 +256,14 @@ struct vn_ctx {
|
|||
vn_ctx(Program* program) : program(program) {}
|
||||
};
|
||||
|
||||
|
||||
/* dominates() returns true if the parent block dominates the child block and
|
||||
* if the parent block is part of the same loop or has a smaller loop nest depth.
|
||||
*/
|
||||
bool dominates(vn_ctx& ctx, uint32_t parent, uint32_t child)
|
||||
{
|
||||
while (parent < child)
|
||||
unsigned parent_loop_nest_depth = ctx.program->blocks[parent].loop_nest_depth;
|
||||
while (parent < child && parent_loop_nest_depth <= ctx.program->blocks[child].loop_nest_depth)
|
||||
child = ctx.program->blocks[child].logical_idom;
|
||||
|
||||
return parent == child;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue