panfrost: Implement Midgard shader toolchain

Graphics / Mesa 3D Graphics Library / Mesa - Alyssa Rosenzweig [rosenzweig.io] - 5 February 2019 01:26 EST

This patch implements the free Midgard shader toolchain: the assembler, the disassembler, and the NIR-based compiler. The assembler is a standalone inaccessible Python script for reference purposes. The disassembler and the compiler are implemented in C, accessible via the standalone `midgard_compiler` binary. Later patches will use these interfaces from the driver for online compilation.

e67e0726372 panfrost: Implement Midgard shader toolchain
src/gallium/drivers/panfrost/meson.build | 44 +-
src/gallium/drivers/panfrost/midgard/assemble.py | 643 ++++
src/gallium/drivers/panfrost/midgard/cmdline.c | 145 +
src/gallium/drivers/panfrost/midgard/cppwrap.cpp | 9 +
src/gallium/drivers/panfrost/midgard/disassemble.c | 986 ++++++
src/gallium/drivers/panfrost/midgard/disassemble.h | 2 +
src/gallium/drivers/panfrost/midgard/helpers.h | 236 ++
.../drivers/panfrost/midgard/midgard-parse.h | 70 +
src/gallium/drivers/panfrost/midgard/midgard.h | 473 +++
.../drivers/panfrost/midgard/midgard_compile.c | 3621 ++++++++++++++++++++
.../drivers/panfrost/midgard/midgard_compile.h | 80 +
src/gallium/drivers/panfrost/midgard/midgard_nir.h | 5 +
.../panfrost/midgard/midgard_nir_algebraic.py | 71 +
13 files changed, 6383 insertions(+), 2 deletions(-)

Upstream: cgit.freedesktop.org


  • Share