Mesa (staging/22.1): panfrost: Fix pack_32_2x16 implementation
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 27 19:30:40 UTC 2022
Module: Mesa
Branch: staging/22.1
Commit: 431f07fcd9804f43c1f7570e8c243a70325a77ce
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=431f07fcd9804f43c1f7570e8c243a70325a77ce
Author: Icecream95 <ixn at disroot.org>
Date: Wed Apr 27 10:31:14 2022 +1200
panfrost: Fix pack_32_2x16 implementation
Fixes: 6f0eff548c1 ("pan/bi: Implement packing ops between 32-bit vec1 and 16-bit vec2")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16181>
(cherry picked from commit 76cea8e27b3bb16cf752962ca53da42ab4bf51e4)
Conflicts:
src/panfrost/bifrost/bifrost_compile.c
---
.pick_status.json | 2 +-
src/panfrost/bifrost/bifrost_compile.c | 11 +++++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 9697c7a7442..a911a16a6d4 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -40,7 +40,7 @@
"description": "panfrost: Fix pack_32_2x16 implementation",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "6f0eff548c16c12309edec812b6573c63fdc866d"
},
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 83507f477a0..338fad3f016 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -1982,7 +1982,6 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
* are the exceptions that need to handle swizzles specially. */
switch (instr->op) {
- case nir_op_pack_32_2x16:
case nir_op_vec2:
case nir_op_vec3:
case nir_op_vec4: {
@@ -2027,7 +2026,11 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
bi_mov_i32_to(b, bi_word(dst, 1), bi_word(bi_src_index(&instr->src[0].src), 1));
return;
- case nir_op_mov: {
+
+ case nir_op_mov:
+ case nir_op_pack_32_2x16: {
+ unsigned src_comps = nir_src_num_components(instr->src[0].src);
+
bi_index idx = bi_src_index(&instr->src[0].src);
bi_index unoffset_srcs[4] = { idx, idx, idx, idx };
@@ -2038,8 +2041,8 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
comps > 3 ? instr->src[0].swizzle[3] : 0,
};
- if (sz == 1) sz = 16;
- bi_make_vec_to(b, dst, unoffset_srcs, channels, comps, sz);
+ if (src_sz == 1) src_sz = 16;
+ bi_make_vec_to(b, dst, unoffset_srcs, channels, src_comps, src_sz);
return;
}
More information about the mesa-commit
mailing list