diff options
author | Timothy Arceri <[email protected]> | 2016-05-23 16:46:46 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-07-07 10:26:43 +1000 |
commit | 0eea6b3297930d36cd510fa6b0e35c91935928f2 (patch) | |
tree | 56e7a427bb8f9efa27a0ddbce202a441ea5defd7 /src/compiler/nir/nir_lower_io.c | |
parent | 771f6db76fd051766bc0c7ad590cd4c9c8ecd8a4 (diff) |
nir: add new intrinsic field for storing component offset
This offset is used for packing.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_io.c')
-rw-r--r-- | src/compiler/nir/nir_lower_io.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index a8399245b0b..72f1b05e675 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -274,6 +274,10 @@ nir_lower_io_block(nir_block *block, nir_intrinsic_set_base(load, intrin->variables[0]->var->data.driver_location); + if (mode == nir_var_shader_in || mode == nir_var_shader_out) { + nir_intrinsic_set_component(load, + intrin->variables[0]->var->data.location_frac); + } if (load->intrinsic == nir_intrinsic_load_uniform) { nir_intrinsic_set_range(load, @@ -322,6 +326,10 @@ nir_lower_io_block(nir_block *block, nir_intrinsic_set_base(store, intrin->variables[0]->var->data.driver_location); + if (mode == nir_var_shader_out) { + nir_intrinsic_set_component(store, + intrin->variables[0]->var->data.location_frac); + } nir_intrinsic_set_write_mask(store, nir_intrinsic_write_mask(intrin)); if (per_vertex) |