From 94abc53030d684d92e0a6bca6caa29e34c545772 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Tue, 2 Apr 2019 17:29:52 -0700 Subject: [PATCH] intel/fs: Use NIR_PASS_V when lowering CS intrinsics This will make that step visible in NIR_PRINT=1. v2: Also use the macro for the cleanup passes. Reviewed-by: Ian Romanick Reviewed-by: Jason Ekstrand --- src/intel/compiler/brw_fs.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index a637ee3422f..baf5df2c3d1 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -8016,11 +8016,12 @@ compile_cs_to_nir(const struct brw_compiler *compiler, { nir_shader *shader = nir_shader_clone(mem_ctx, src_shader); shader = brw_nir_apply_sampler_key(shader, compiler, &key->tex, true); - brw_nir_lower_cs_intrinsics(shader, dispatch_width); + + NIR_PASS_V(shader, brw_nir_lower_cs_intrinsics, dispatch_width); /* Clean up after the local index and ID calculations. */ - nir_opt_constant_folding(shader); - nir_opt_dce(shader); + NIR_PASS_V(shader, nir_opt_constant_folding); + NIR_PASS_V(shader, nir_opt_dce); return brw_postprocess_nir(shader, compiler, true); } -- 2.30.2