summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@collabora.com>2022-02-27 15:22:03 -0500
committerMarge Bot <emma+marge@anholt.net>2022-04-07 18:03:57 +0000
commita747708b9d59cbe0f3801cac6f39ae3159023cc1 (patch)
treec3985f4f685317507f8c7cd76d5a27aef2abec9c
parentde37f755544868275d9210868c2eaef2af700ff4 (diff)
pan/bi: Use should_skip in bi_builder generation
To avoid further code duplication. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15187>
-rw-r--r--src/panfrost/bifrost/bi_builder.h.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/panfrost/bifrost/bi_builder.h.py b/src/panfrost/bifrost/bi_builder.h.py
index b3ccafd26e8..81b78b7177e 100644
--- a/src/panfrost/bifrost/bi_builder.h.py
+++ b/src/panfrost/bifrost/bi_builder.h.py
@@ -99,7 +99,7 @@ bi_instr * bi_${opcode.replace('.', '_').lower()}${to_suffix(ops[opcode])}(${sig
I->src[${src}] = src${src};
% endfor
% for mod in ops[opcode]["modifiers"]:
-% if mod[0:-1] not in SKIP and mod not in SKIP:
+% if not should_skip(mod):
I->${mod} = ${mod};
% endif
% endfor
@@ -198,4 +198,6 @@ def arguments(op, temp_dest = True):
modifier_signature(op) +
op["immediates"])
-print(Template(COPYRIGHT + TEMPLATE).render(ops = ir_instructions, modifiers = modifier_lists, signature = signature, arguments = arguments, src_count = src_count, typesize = typesize, SKIP = SKIP))
+print(Template(COPYRIGHT + TEMPLATE).render(ops = ir_instructions, modifiers =
+ modifier_lists, signature = signature, arguments = arguments, src_count =
+ src_count, typesize = typesize, should_skip = should_skip))