summaryrefslogtreecommitdiff
path: root/src/compiler/nir/nir_gather_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_gather_info.c')
-rw-r--r--src/compiler/nir/nir_gather_info.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c
index 9fe631033d2..02ae72babee 100644
--- a/src/compiler/nir/nir_gather_info.c
+++ b/src/compiler/nir/nir_gather_info.c
@@ -211,7 +211,7 @@ mark_whole_variable(nir_shader *shader, nir_variable *var,
}
const unsigned slots =
- var->data.compact ? DIV_ROUND_UP(glsl_get_length(type), 4)
+ var->data.compact ? DIV_ROUND_UP(var->data.location_frac + glsl_get_length(type), 4)
: glsl_count_attribute_slots(type, false);
set_io_mask(shader, var, 0, slots, deref, is_output_read);
@@ -288,7 +288,7 @@ try_mask_partial_io(nir_shader *shader, nir_variable *var,
return false;
const unsigned slots =
- var->data.compact ? DIV_ROUND_UP(glsl_get_length(type), 4)
+ var->data.compact ? DIV_ROUND_UP(var->data.location_frac + glsl_get_length(type), 4)
: glsl_count_attribute_slots(type, false);
if (offset >= slots) {