summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_lower_io.c')
-rw-r--r--src/compiler/nir/nir_lower_io.c8
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)