Mesa (master): pan/bit: Interpret BI_SELECT
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Apr 27 15:06:57 UTC 2020
Module: Mesa
Branch: master
Commit: 23ffaa16c7e227cd4d82350c223f965c0c8dac8c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=23ffaa16c7e227cd4d82350c223f965c0c8dac8c
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Fri Apr 24 19:14:21 2020 -0400
pan/bit: Interpret BI_SELECT
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4766>
---
src/panfrost/bifrost/test/bi_interpret.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/panfrost/bifrost/test/bi_interpret.c b/src/panfrost/bifrost/test/bi_interpret.c
index ea0064c0a39..182a012bd78 100644
--- a/src/panfrost/bifrost/test/bi_interpret.c
+++ b/src/panfrost/bifrost/test/bi_interpret.c
@@ -529,8 +529,20 @@ bit_step(struct bit_state *s, bi_instruction *ins, bool FMA)
break;
}
+ case BI_SELECT: {
+ if (ins->dest_type == nir_type_uint16) {
+ for (unsigned c = 0; c < 2; ++c)
+ dest.u16[c] = srcs[c].u16[ins->swizzle[c][0]];
+ } else if (ins->dest_type == nir_type_uint8) {
+ for (unsigned c = 0; c < 4; ++c)
+ dest.u8[c] = srcs[c].u8[ins->swizzle[c][0]];
+ } else {
+ unreachable("Unknown type");
+ }
+ break;
+ }
+
case BI_SHIFT:
- case BI_SELECT:
case BI_ROUND:
unreachable("Unsupported op");
More information about the mesa-commit
mailing list