Mesa (staging/20.1): nir/lower_io_arrays: Fix xfb_offset bug
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Sep 30 09:37:59 UTC 2020
Module: Mesa
Branch: staging/20.1
Commit: e1f6000b540c3d48cb573653db6e1bf4e0003050
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e1f6000b540c3d48cb573653db6e1bf4e0003050
Author: Connor Abbott <cwabbott0 at gmail.com>
Date: Fri Aug 21 15:51:47 2020 +0200
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 at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6514>
(cherry picked from commit 5a88db682e08b5e58b40653872569f5b5d77777d)
---
.pick_status.json | 2 +-
src/compiler/nir/nir_lower_io_arrays_to_elements.c | 2 +-
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;
More information about the mesa-commit
mailing list