freedreno/ir3: don't DCE ij_pix if used for pre-fs-texture-fetch
authorRob Clark <robdclark@chromium.org>
Fri, 11 Oct 2019 18:50:22 +0000 (11:50 -0700)
committerRob Clark <robdclark@gmail.com>
Fri, 18 Oct 2019 21:11:54 +0000 (21:11 +0000)
commit11e467c378212e5aefaaa5246839d72764a54ea2
tree7c430addb672fa1400b92bec9269d624997190a4
parentaf817a44c15a387c920ec13a7f70aee4bd4a1a8c
freedreno/ir3: don't DCE ij_pix if used for pre-fs-texture-fetch

When we enable pre-dispatch texture fetch, we could have a scenario
where the barycentric i/j coord sysval is not used in the shader, but
only used for the varying fetch for the pre-dispatch texture fetch.
In this case we need to take care not to DCE this sysval.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/freedreno/ir3/ir3.h
src/freedreno/ir3/ir3_compiler_nir.c
src/freedreno/ir3/ir3_depth.c