This patch implements system values via specially-crafted uniforms. While we previously had an ad hoc system for passing the viewport into the vertex shader, this commit generalizes the system to allow for arbitrary system values to be added to both shader stages. While we're at it, we clean up uniform handling code (which was considerably muddied to handle the ad hoc viewport uniform).
This commit serves as both a cleanup of the existing codebase and the precursor to new functionality, like implementing textureSize().
Concurrent with these changes is respecting the depth transform, which was not possible with the old fixed uniform system and here serves as a proof-of-correctness test (as well as justifying the NIR changes).
7e8de5a707f panfrost: Implement system values
src/gallium/drivers/panfrost/meson.build | 1 +
src/gallium/drivers/panfrost/midgard/helpers.h | 4 -
.../drivers/panfrost/midgard/midgard_compile.c | 272 +++++++++++----------
.../drivers/panfrost/midgard/midgard_compile.h | 27 +-
src/gallium/drivers/panfrost/pan_assemble.c | 5 +
src/gallium/drivers/panfrost/pan_context.c | 103 ++++----
src/gallium/drivers/panfrost/pan_context.h | 5 +
7 files changed, 229 insertions(+), 188 deletions(-)