Mesa (main): pan/mdg: Only print 2 sources for ALU
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 1 19:43:04 UTC 2022
Module: Mesa
Branch: main
Commit: 0ee24c46e0aad500a4ef90cc03cfd319e11cb342
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ee24c46e0aad500a4ef90cc03cfd319e11cb342
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Tue May 31 08:41:03 2022 -0400
pan/mdg: Only print 2 sources for ALU
..and assert the other sources are null. The one place this might fail in the
future is for real FMA, but we don't support that for GL.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16798>
---
src/panfrost/midgard/midgard_print.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c
index 2a43516dd3c..cac792ae8ac 100644
--- a/src/panfrost/midgard/midgard_print.c
+++ b/src/panfrost/midgard/midgard_print.c
@@ -278,9 +278,15 @@ mir_print_instruction(midgard_instruction *ins)
else
mir_print_src(ins, 1);
- for (unsigned c = 2; c <= 3; ++c) {
- printf(", ");
- mir_print_src(ins, c);
+ if (is_alu) {
+ /* ALU ops are all 2-src */
+ assert(ins->src[2] == ~0);
+ assert(ins->src[3] == ~0);
+ } else {
+ for (unsigned c = 2; c <= 3; ++c) {
+ printf(", ");
+ mir_print_src(ins, c);
+ }
}
if (ins->no_spill)
More information about the mesa-commit
mailing list