Module: Mesa Branch: master Commit: 2f92479ffcfc9119729b55d1f49217c90993bf06 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f92479ffcfc9119729b55d1f49217c90993bf06
Author: Alyssa Rosenzweig <[email protected]> Date: Thu Aug 15 09:53:25 2019 -0700 pan/midgard: Add mir_foreach_src This is repeated often enough. Signed-off-by: Alyssa Rosenzweig <[email protected]> --- src/panfrost/midgard/compiler.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 6f953d48cb8..217ab317090 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -381,6 +381,9 @@ mir_next_op(struct midgard_instruction *ins) _entry_##v = _mesa_set_next_entry(blk->predecessors, _entry_##v), \ v = (struct midgard_block *) (_entry_##v ? _entry_##v->key : NULL)) +#define mir_foreach_src(ins, v) \ + for (unsigned v = 0; v < ARRAY_SIZE(ins->ssa_args.src); ++v) + static inline midgard_instruction * mir_last_in_block(struct midgard_block *block) { _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
