nir/lower_io_arrays: Fix xfb_offset bug

I noticed this once I started gathering xfb_info after
nir_lower_io_arrays_to_elements_no_indirect.

Fixes: b2bbd978d0 ("nir: fix lowering arrays to elements for XFB outputs")
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6514>
This commit is contained in:
Connor Abbott 2020-08-21 15:51:47 +02:00 committed by Marge Bot
parent df955ce6b6
commit 5a88db682e
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ get_io_offset(nir_builder *b, nir_deref_instr *deref, nir_variable *var,
unsigned size = glsl_count_attribute_slots((*p)->type, false);
offset += size * index;
xfb_offset += index * glsl_get_component_slots((*p)->type) * 4;
*xfb_offset += index * glsl_get_component_slots((*p)->type) * 4;
unsigned num_elements = glsl_type_is_array((*p)->type) ?
glsl_get_aoa_size((*p)->type) : 1;