summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir_visitor.h
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2016-09-02 19:07:57 -0400
committerConnor Abbott <[email protected]>2016-09-03 00:37:48 -0400
commitc62b58c2165a55c5e656efeafebc64da7acd8cca (patch)
treef47cc3e2768cabe18713e9ac87c53db582c70502 /src/compiler/glsl/ir_visitor.h
parent0dc4cabee213135aa25bef9062366f251838dc16 (diff)
nir: fix bug with moves in nir_opt_remove_phis()
In 144cbf8 ("nir: Make nir_opt_remove_phis see through moves."), Ken made nir_opt_remove_phis able to coalesce phi nodes whose sources are all moves with the same swizzle. However, he didn't add the logic necessary for handling the fact that the phi may now have multiple different sources, even though the sources point to the same thing. For example, if we had something like: if (...) a1 = b.yx; else a2 = b.yx; a = phi(a1, a2) ... = a then we would rewrite it to if (...) a1 = b.yx; else a2 = b.yx; ... = a1 by picking a random phi source, which in this case is invalid because the source doesn't dominate the phi. Instead, we need to change it to: if (...) a1 = b.yx; else a2 = b.yx; a3 = b.yx; ... = a3; Fixes 12 CTS tests: ES31-CTS.functional.tessellation.invariance.outer_edge_symmetry.quads* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir_visitor.h')
0 files changed, 0 insertions, 0 deletions