[Mesa-dev] [PATCH 0/6] panfrost: Add support for TXS instructions
Boris Brezillon
boris.brezillon at collabora.com
Mon Jun 17 10:49:22 UTC 2019
Hello,
TXS is needed to support the OpenGL textureSize() function but not only.
TXS instructions are also used by nir_lower_tex() to lower a RECT
texture sampling into a 2D one, which I wanted to have working to test
gallium-hud on panfrost.
Note that I decided to add a new generic lowering step to
nir_lower_tex() to lower a TXS(LOD) instruction into
max(1, TXS(0) >> LOD), which is what V3D is doing internally and would
be duplicated in the panfrost driver if we go for a non-generic
approach (see patch 2 for more details).
Let me know if you think that's preferable to have this logic moved to
the panfrost driver.
Regards,
Boris
Boris Brezillon (6):
nir/builder: Add the nir_imm_ivec3() helper
nir/lower_tex: Add a way to lower TXS(non-0-LOD) instructions
panfrost: Control texop value earlier
panfrost: Make the sysval logic more generic
panfrost: Move sysval upload logic out of panfrost_emit_for_draw()
panfrost: Add support for TXS instructions
src/compiler/nir/nir.h | 6 +
src/compiler/nir/nir_builder.h | 13 +++
src/compiler/nir/nir_lower_tex.c | 49 ++++++++
.../panfrost/midgard/midgard_compile.c | 106 ++++++++++++++----
.../panfrost/midgard/midgard_compile.h | 12 +-
src/gallium/drivers/panfrost/pan_context.c | 96 +++++++++++++---
6 files changed, 241 insertions(+), 41 deletions(-)
--
2.20.1
More information about the mesa-dev
mailing list