[Mesa-dev] [PATCH 32/44] i965/program: Move nir_lower_system_values higher up

Jason Ekstrand jason at jlekstrand.net
Tue Sep 5 15:13:24 UTC 2017


We want this to get called before nir_lower_subgroups which is going in
brw_preprocess_nir.  Now that nir_lower_wpos_ytransform can handle
system values, this should be safe to do.
---
 src/mesa/drivers/dri/i965/brw_program.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 9303dc8..be76947 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -90,6 +90,8 @@ brw_create_nir(struct brw_context *brw,
 
    (void)progress;
 
+   NIR_PASS(progress, nir, nir_lower_system_values);
+
    nir = brw_preprocess_nir(brw->screen->compiler, nir);
 
    if (stage == MESA_SHADER_FRAGMENT) {
@@ -104,7 +106,6 @@ brw_create_nir(struct brw_context *brw,
       NIR_PASS(progress, nir, nir_lower_wpos_ytransform, &wpos_options);
    }
 
-   NIR_PASS(progress, nir, nir_lower_system_values);
    NIR_PASS_V(nir, brw_nir_lower_uniforms, is_scalar);
 
    nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list