radeonsi/nir: call radeonsi nir opts before the scan pass
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 25 Apr 2019 07:02:51 +0000 (17:02 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 30 Apr 2019 23:41:07 +0000 (09:41 +1000)
commit90f3bf7437eb735bf51d8fcbfbb0adeed9cfcf89
tree2f824201611f6476f3bc8774ec9928fb9aab7ae1
parenta004e95dd73119e994cc427a1e3ea6dc11daecf6
radeonsi/nir: call radeonsi nir opts before the scan pass

Some of the opts are not called in the general optimastion loop
in the state trackers glsl -> nir conversion. We need to call
the radeonsi specific optimisation once before scanning over
the nir otherwise we can end up gathering info on code that
is later removed.

Fixes an assert in the piglit test:

./bin/varying-struct-centroid_gles3

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_compute.c
src/gallium/drivers/radeonsi/si_state_shaders.c