radeonsi: make use of ac_are_tessfactors_def_in_all_invocs()
authorTimothy Arceri <tarceri@itsqueeze.com>
Sat, 15 Dec 2018 04:27:01 +0000 (15:27 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 1 Jan 2019 23:01:31 +0000 (10:01 +1100)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader_nir.c

index bb7c3d71dc07ce08cf175f239f0169e1a6487943..37fa81f3f40da7741bd9633d9be351b052cb2f39 100644 (file)
@@ -285,14 +285,8 @@ void si_nir_scan_tess_ctrl(const struct nir_shader *nir,
        if (nir->info.stage != MESA_SHADER_TESS_CTRL)
                return;
 
-       /* Initial value = true. Here the pass will accumulate results from
-        * multiple segments surrounded by barriers. If tess factors aren't
-        * written at all, it's a shader bug and we don't care if this will be
-        * true.
-        */
-       out->tessfactors_are_def_in_all_invocs = true;
-
-       /* TODO: Implement scanning of tess factors, see tgsi backend. */
+       out->tessfactors_are_def_in_all_invocs =
+               ac_are_tessfactors_def_in_all_invocs(nir);
 }
 
 void si_nir_scan_shader(const struct nir_shader *nir,