summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2020-08-21 15:51:47 +0200
committerEric Engestrom <eric@engestrom.ch>2020-09-30 11:37:10 +0200
commite1f6000b540c3d48cb573653db6e1bf4e0003050 (patch)
tree50c78473a0c081b48f21f452138fde1655ef771b
parent30b256c21e08d6193da534b4b700cdfeb47a506f (diff)
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: b2bbd978d0b ("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> (cherry picked from commit 5a88db682e08b5e58b40653872569f5b5d77777d)
-rw-r--r--.pick_status.json2
-rw-r--r--src/compiler/nir/nir_lower_io_arrays_to_elements.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 57d4ab82da8..1fce3727bb4 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -211,7 +211,7 @@
"description": "nir/lower_io_arrays: Fix xfb_offset bug",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "b2bbd978d0b1c85919c6f3b5f631b3c6cbaaaf8a"
},
diff --git a/src/compiler/nir/nir_lower_io_arrays_to_elements.c b/src/compiler/nir/nir_lower_io_arrays_to_elements.c
index e49abefc0d4..376326575b0 100644
--- a/src/compiler/nir/nir_lower_io_arrays_to_elements.c
+++ b/src/compiler/nir/nir_lower_io_arrays_to_elements.c
@@ -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;