zink: only use location_frac for deref array indexing for compact variables

not sure why I did this or how it ever worked?

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
This commit is contained in:
Mike Blumenkrantz 2024-04-02 10:18:45 -04:00 committed by Marge Bot
parent 2185da6c89
commit 24197aeb2b
1 changed files with 1 additions and 1 deletions

View File

@ -3677,7 +3677,7 @@ add_derefs_instr(nir_builder *b, nir_intrinsic_instr *intr, void *data)
}
if (glsl_type_is_array(type)) {
/* unroll array derefs */
unsigned idx = frac - var->data.location_frac;
unsigned idx = var->data.compact ? (frac - var->data.location_frac) : 0;
assert(src_offset);
if (var->data.location < VARYING_SLOT_VAR0) {
if (src_offset) {