[Mesa-dev] [PATCH v2 41/52] intel/compiler: Call nir_lower_system_values in brw_preprocess_nir

Jason Ekstrand jason at jlekstrand.net
Fri Oct 13 05:48:07 UTC 2017


---
 src/intel/compiler/brw_nir.c            | 2 ++
 src/intel/vulkan/anv_pipeline.c         | 2 --
 src/mesa/drivers/dri/i965/brw_program.c | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index a04f4af..0a41768 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -635,6 +635,8 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir)
    /* Lower a bunch of stuff */
    OPT(nir_lower_var_copies);
 
+   OPT(nir_lower_system_values);
+
    OPT(nir_lower_clip_cull_distance_arrays);
 
    nir_variable_mode indirect_mask = 0;
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 1fd54dc..491d640 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -194,8 +194,6 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
 
    nir = brw_preprocess_nir(compiler, nir);
 
-   NIR_PASS_V(nir, nir_lower_system_values);
-
    if (stage == MESA_SHADER_FRAGMENT)
       NIR_PASS_V(nir, anv_nir_lower_input_attachments);
 
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index ebb6998..6925121 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -89,8 +89,6 @@ brw_create_nir(struct brw_context *brw,
 
    nir = brw_preprocess_nir(brw->screen->compiler, nir);
 
-   NIR_PASS_V(nir, nir_lower_system_values);
-
    if (stage == MESA_SHADER_FRAGMENT) {
       static const struct nir_lower_wpos_ytransform_options wpos_options = {
          .state_tokens = {STATE_INTERNAL, STATE_FB_WPOS_Y_TRANSFORM, 0, 0, 0},
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list