Mesa (master): panfrost/midgard: Refactor schedule/emit pipeline

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 4 20:23:19 UTC 2019


Module: Mesa
Branch: master
Commit: 3c7abbfbe8d031bd8f3248636e94af3c9dbe1a7d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3c7abbfbe8d031bd8f3248636e94af3c9dbe1a7d

Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date:   Wed May 22 04:33:21 2019 +0000

panfrost/midgard: Refactor schedule/emit pipeline

First, this moves the scheduler and emitter out of midgard_compile.c
into their own dedicated files.

More interestingly, this slims down midgard_bundle to be essentially an
array of _pointers_ to midgard_instructions (plus some bundling
metadata), rather than the instructions and packing themselves. The
difference is critical, as it means that (within reason, i.e. as long as
it doesn't affect the schedule) midgard_instrucitons can now be modified
_after_ scheduling while having changes updated in the final binary.

On a more philosophical level, this removes an IR. Previously, the IR
before scheduling (MIR) was separate from the IR after scheduling
(post-schedule MIR), requiring a separate set of utilities to traverse,
using different idioms. There was no good reason for this, and it
restricts our flexibility with the RA. So unify all the things!

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Ryan Houdek <Sonicadvance1 at gmail.com>

---

 src/gallium/drivers/panfrost/meson.build           |   2 +
 src/gallium/drivers/panfrost/midgard/compiler.h    |  16 +-
 src/gallium/drivers/panfrost/midgard/helpers.h     |  20 +
 .../drivers/panfrost/midgard/midgard_compile.c     | 705 +--------------------
 .../drivers/panfrost/midgard/midgard_emit.c        | 229 +++++++
 .../drivers/panfrost/midgard/midgard_schedule.c    | 479 ++++++++++++++
 6 files changed, 744 insertions(+), 707 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=3c7abbfbe8d031bd8f3248636e94af3c9dbe1a7d



More information about the mesa-commit mailing list