freedreno/ir3: fix issue w/ glamor composite shaders
authorRob Clark <robdclark@gmail.com>
Sat, 31 Mar 2018 18:36:37 +0000 (14:36 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 31 Mar 2018 20:25:13 +0000 (16:25 -0400)
commitafde9294b54c60212d12292d21dd5a4f067c4e8b
tree17f37ccd77ffa51f3dab356f0f4656acefc24e94
parent2191a18e757e62593af176afad140cc32e85dc09
freedreno/ir3: fix issue w/ glamor composite shaders

Fixes an issue that became possible when we started lowering phi webs to
regs (a7ea2b4e) (although was not really seen until we also switched to
using peephole select pass (ec8bc54a) instead of lowering *all* if/else
to select).

If texture coord (or anything else that uses create_collect() to collect
scalar values in a sequence of scalar registers) was consuming a value
produced on either side of an if/else (ie. a phi lowered to nir reg,
which in ir3 is an "array" of length 1) then register allocation would
happen incorrectly and we'd end up sampling from garbage coordinates.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
src/gallium/drivers/freedreno/ir3/ir3_cp.c