From 25db44a84597960a6aea6b252bcf2c3d7e17fc74 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 18 Mar 2015 15:04:15 -0700 Subject: nir/lower_io: Make variable location assignment a manual operation Previously, we just assigned variable locations in nir_lower_io. Now, we force the user to assign variable locations for us. This gives the backend a bit more control over where variables are placed. v2: Rename from _packed to _scalar Reviewed-by: Connor Abbott --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 9431e5dd74e..8ef57af2c48 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -105,6 +105,10 @@ fs_visitor::emit_nir_code() /* Get rid of split copies */ nir_optimize(nir); + nir_assign_var_locations_scalar(&nir->uniforms, &nir->num_uniforms); + nir_assign_var_locations_scalar(&nir->inputs, &nir->num_inputs); + nir_assign_var_locations_scalar(&nir->outputs, &nir->num_outputs); + nir_lower_io(nir); nir_validate_shader(nir); -- cgit v1.2.3