radeonsi/nir: remove dead function temps
authorMarek Olšák <marek.olsak@amd.com>
Sat, 9 Nov 2019 01:16:20 +0000 (20:16 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 15 Nov 2019 19:34:49 +0000 (14:34 -0500)
glxgears has dead temps after lowering color inputs to load intrinsics.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/gallium/drivers/radeonsi/si_shader_nir.c

index 463ec0b5421a3d752bf407522b04337ee18daf7f..c11032ba8001b7fc5dfaa1367c218c845fcf1442 100644 (file)
@@ -1013,6 +1013,7 @@ static void si_lower_nir(struct si_screen *sscreen, struct nir_shader *nir)
        si_nir_opts(nir);
 
        NIR_PASS_V(nir, nir_lower_bool_to_int32);
+       NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_function_temp);
 }
 
 void si_finalize_nir(struct pipe_screen *screen, void *nirptr, bool optimize)