summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2020-10-02 12:02:36 -0400
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2020-10-02 12:03:53 -0400
commit7cc55df938b16bf2da415933e5ef290101848435 (patch)
tree348b062d21bc5a603ed99c5be6b7ff5b28c369c4
parent447cef4a71d9d8181f15d38370d6199fd0d1ef89 (diff)
pan/bi: Fix assert when writing vertex outputs
Varying stores require us to generate a LEA_ATTR_IMM instruction, which is a load. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Fixes: 0aa08ae2f67 ("nir: Split NIR_INTRINSIC_TYPE into separate src/dest indices") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6985>
-rw-r--r--src/panfrost/bifrost/bifrost_compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 96b4e3874a8..6dda8811ab9 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -189,7 +189,9 @@ bi_load_with_r61(enum bi_class T, nir_intrinsic_instr *instr)
ld.src[2] = BIR_INDEX_REGISTER | 62;
ld.src_types[1] = nir_type_uint32;
ld.src_types[2] = nir_type_uint32;
- ld.format = nir_intrinsic_dest_type(instr);
+ ld.format = instr->intrinsic == nir_intrinsic_store_output ?
+ nir_intrinsic_src_type(instr) :
+ nir_intrinsic_dest_type(instr);
return ld;
}