intel/compiler: Call nir_lower_system_values in brw_preprocess_nir
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 2 Sep 2017 05:20:23 +0000 (22:20 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 25 Oct 2017 23:14:09 +0000 (16:14 -0700)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/compiler/brw_nir.c
src/intel/vulkan/anv_pipeline.c
src/mesa/drivers/dri/i965/brw_program.c

index 327216eaaa7cba795c03230e8c3bd4299fafe765..e5ff6deb2f70cec75c2472394aa2ccb7644a16d7 100644 (file)
@@ -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;
index 9863ec334e3fe9b196417d4095e8962904895042..8a2e4f83ca713780c0804b963242db97e8483fa3 100644 (file)
@@ -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);
 
index ebb6998a0029ff2028c9b31d63a13592e6bfb77a..6925121778afad52a1eb01cfa7f096fb5c4b9225 100644 (file)
@@ -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},