diff options
author | Iago Toral Quiroga <[email protected]> | 2015-06-18 13:52:21 +0200 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-08-03 09:40:47 -0700 |
commit | 01f6235020f9f0c2bc1a6e6ea9bd15c22fb2bcf5 (patch) | |
tree | 5b975529153843f332d18ef7fc4b37658d7f7b24 /src/mesa/drivers/dri/i965/brw_nir.c | |
parent | 5e839727ed2378a01d3b657bad83abd4728e8da6 (diff) |
nir/nir_lower_io: Add vec4 support
The current implementation operates in scalar mode only, so add a vec4
mode where types are padded to vec4 sizes.
This will be useful in the i965 driver for its vec4 nir backend
(and possbly other drivers that have vec4-based shaders).
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_nir.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_nir.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index 4aa893aff50..8700cb71ad4 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.c +++ b/src/mesa/drivers/dri/i965/brw_nir.c @@ -101,13 +101,15 @@ brw_create_nir(struct brw_context *brw, /* Get rid of split copies */ nir_optimize(nir); - nir_assign_var_locations_scalar_direct_first(nir, &nir->uniforms, - &nir->num_direct_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_assign_var_locations_direct_first(nir, &nir->uniforms, + &nir->num_direct_uniforms, + &nir->num_uniforms, + is_scalar); + nir_assign_var_locations(&nir->inputs, &nir->num_inputs, is_scalar); + nir_assign_var_locations(&nir->outputs, &nir->num_outputs, is_scalar); + + nir_lower_io(nir, is_scalar); - nir_lower_io(nir); nir_validate_shader(nir); nir_remove_dead_variables(nir); |