[Mesa-dev] [RFC 7/7] i965: Lower large local arrays to scratch

Jason Ekstrand jason at jlekstrand.net
Mon Dec 5 19:59:58 UTC 2016


---
 src/mesa/drivers/dri/i965/brw_nir.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c
index 8768cee..f75db4d 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.c
+++ b/src/mesa/drivers/dri/i965/brw_nir.c
@@ -485,6 +485,9 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir)
    /* Lower a bunch of stuff */
    OPT_V(nir_lower_var_copies);
 
+   OPT(nir_lower_vars_to_scratch, nir_var_local, 16, true,
+                                  type_size_scalar_bytes);
+
    nir_variable_mode indirect_mask = 0;
    if (compiler->glsl_compiler_options[nir->stage].EmitNoIndirectInput)
       indirect_mask |= nir_var_shader_in;
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list