[Mesa-dev] [PATCH 0/2] Implement coordinate transformation
Alyssa Rosenzweig
alyssa at rosenzweig.io
Sun Apr 7 16:41:11 UTC 2019
This adds a lowering pass for transforming gl_Position to screenspace.
Previously, the pass lived inside the Panfrost (Midgard) compiler, but
now that Lima is en route to the tree, it's best we share it (Lima
developed a separate machine-IR-based transform, but we can share the
code as NIR).
We're careful to vectorize everything as well (related to last week's
sysval patch), to ensure good performance on Midgard (a vector arch).
This might be helpful for either GPUs too; I'm not sure.
Alyssa Rosenzweig (2):
nir: Add nir_lower_viewport_transform
panfrost/midgard: Use shared nir_lower_viewport_transform
src/compiler/nir/meson.build | 1 +
src/compiler/nir/nir.h | 1 +
.../nir/nir_lower_viewport_transform.c | 126 ++++++++++++++++++
.../panfrost/midgard/midgard_compile.c | 99 +-------------
4 files changed, 130 insertions(+), 97 deletions(-)
create mode 100644 src/compiler/nir/nir_lower_viewport_transform.c
--
2.20.1
More information about the mesa-dev
mailing list