broadcom: Add VC5 NIR compiler

Graphics / Mesa 3D Graphics Library / Mesa - Eric Anholt [anholt.net] - 10 October 2017 14:42 EDT

This is a pretty straightforward fork of VC4's NIR compiler to VC5. The condition codes, registers, and I/O have all changed, making the backend hard to share, though their heritage is still recognizable.

v2: Move to src/broadcom/compiler to match intel's layout, rename more "vc5" to "v3d", rename QIR to VIR ("V3D IR") to avoid symbol conflicts with vc4, use new v3d_debug header, add compiler init/free functions, do texture swizzling in NIR to allow optimization.

ade416d broadcom: Add VC5 NIR compiler.
src/broadcom/Makefile.am | 2 +
src/broadcom/Makefile.sources | 13 +
src/broadcom/Makefile.vc5.am | 1 +
src/broadcom/compiler/nir_to_vir.c | 1963 ++++++++++++++++++++++++
src/broadcom/compiler/qpu_schedule.c | 1362 ++++++++++++++++
src/broadcom/compiler/qpu_validate.c | 208 +++
src/broadcom/compiler/v3d_compiler.c | 43 +
src/broadcom/compiler/v3d_compiler.h | 927 +++++++++++
src/broadcom/compiler/v3d_nir_lower_io.c | 176 +++
src/broadcom/compiler/vir.c | 907 +++++++++++
src/broadcom/compiler/vir_dump.c | 339 ++++
src/broadcom/compiler/vir_live_variables.c | 340 ++++
src/broadcom/compiler/vir_lower_uniforms.c | 209 +++
src/broadcom/compiler/vir_opt_copy_propagate.c | 233 +++
src/broadcom/compiler/vir_opt_dead_code.c | 162 ++
src/broadcom/compiler/vir_register_allocate.c | 254 +++
src/broadcom/compiler/vir_to_qpu.c | 359 +++++
17 files changed, 7498 insertions(+)

Upstream: cgit.freedesktop.org


  • Share