freedreno/ir3: Track whether shader needs derivatives
authorKristian H. Kristensen <hoegsberg@chromium.org>
Mon, 25 Mar 2019 21:12:41 +0000 (14:12 -0700)
committerKristian H. Kristensen <hoegsberg@chromium.org>
Tue, 26 Mar 2019 01:36:48 +0000 (18:36 -0700)
commita752422bd42db4f4c445753657afea2d47988952
tree2525e462901ffe3da87103463346392231d3b29c
parent12f11e6fe690b14cf1855fcf183cf16a14718ae8
freedreno/ir3: Track whether shader needs derivatives

In 1088b788 ("freedreno/ir3: find # of samplers from uniform vars") we
started counting number of samplers based on the uniform vars instead
of number of cat5 instructions.  We used the number of samplers to
determine whether to enable derivatives, but when we only use
derivatives and no samplers, that now breaks.  Track whether we need
derivatives explicitly and use that to enable the state.

Fixes: 1088b788 ("freedreno/ir3: find # of samplers from uniform vars")
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
src/freedreno/ir3/ir3.h
src/freedreno/ir3/ir3_compiler_nir.c
src/freedreno/ir3/ir3_legalize.c
src/freedreno/ir3/ir3_shader.h
src/gallium/drivers/freedreno/a6xx/fd6_compute.c
src/gallium/drivers/freedreno/a6xx/fd6_program.c