intel/fs: use nir_opt_ray_query_ranges
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 10 Nov 2022 14:32:50 +0000 (16:32 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Nov 2022 15:17:08 +0000 (15:17 +0000)
Results on DG2 q2rtx shaders:

Totals from 6 (12.24% of 49) affected shaders:
Instrs: 88927 -> 54088 (-39.18%)
Cycles: 4115088 -> 2536902 (-38.35%)
Send messages: 2639 -> 1609 (-39.03%)
Spill count: 1321 -> 613 (-53.60%)
Fill count: 3130 -> 1104 (-64.73%)
Scratch Memory Size: 22528 -> 18432 (-18.18%)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16593>

src/intel/compiler/brw_nir.c

index fcea4b40b54406a4fc664f792a72c811e67bf462..1ab004b68d4f2ad94501f4967e2df2de36508734 100644 (file)
@@ -643,6 +643,7 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
       OPT(nir_opt_combine_stores, nir_var_all);
 
       OPT(nir_opt_ray_queries);
+      OPT(nir_opt_ray_query_ranges);
 
       if (is_scalar) {
          OPT(nir_lower_alu_to_scalar, NULL, NULL);