[Mesa-dev] [PATCH 00/11] the winding road to ucp/clipdist lowering

Rob Clark robdclark at gmail.com
Sun Sep 13 08:51:47 PDT 2015


From: Rob Clark <robclark at freedesktop.org>

To avoid propagating the tgsi semantic name/index hack further, and
to avoid a generic nir lowering pass knowing about tgsi semantic,
first I needed to switch over to using VERT_ATTRIB_/VARYING_SLOT_/
FRAG_RESULT_.  So I dusted off Eric's patch, split out the vc4
conversion into a separate patch, and converted freedreno/ir3.

Along the way, I realized that shader_enum missed something along
the lines of tgsi_strings.c to give us nice human readable names
for error messages, debug prints, etc.  So I added shader_enums.c
with 'const char * foo_name()' fxns for each of the enums and
wired up nir_print to use that.

For the conversion to using shader_enum's, I also ended up needing
to add a SYSTEM_VALUE_VERTEX_CNT, which is an internal sys-val used
by adreno for calculating where to write stream-out values.

Finally after all that, add nir_lower_clip and wire it up in ir3
and a4xx.  (a3xx still TODO since it has partial support to do
GLES1 style user-clip-planes in hardware, although it will need
the lowering in some cases still.)

And after all that, neverball renders correctly ;-)

Eric Anholt (2):
  gallium/ttn: Convert to using VARYING_SLOT_* / FRAG_RESULT_*.
  vc4: convert from tgsi semantic/index to varying-slot

Rob Clark (9):
  glsl: shader-enum to name debug fxns
  nir/print: print symbolic names from shader-enum
  freedreno/ir3: switch to shader_enums.h interp constants
  glsl: add SYSTEM_VALUE_VERTEX_CNT
  freedreno/ir3: convert from tgsi semantic/index to varying-slot
  nir: add sysval for user-clip-planes
  nir: add lowering stage for user-clip-planes / clipdist
  freedreno/ir3: add support for ucp
  freedreno/a4xx: wire up ucp support

 src/Makefile.am                                    |   1 +
 src/gallium/auxiliary/nir/tgsi_to_nir.c            | 181 ++++++++++-
 src/gallium/auxiliary/nir/tgsi_to_nir.h            |   6 +
 src/gallium/drivers/freedreno/a3xx/fd3_emit.c      |  30 +-
 src/gallium/drivers/freedreno/a3xx/fd3_program.c   |  54 ++--
 src/gallium/drivers/freedreno/a4xx/fd4_draw.c      |   1 +
 src/gallium/drivers/freedreno/a4xx/fd4_emit.c      |  31 +-
 src/gallium/drivers/freedreno/a4xx/fd4_program.c   |  61 ++--
 src/gallium/drivers/freedreno/ir3/ir3_cmdline.c    |   8 +
 .../drivers/freedreno/ir3/ir3_compiler_nir.c       | 209 ++++++-------
 src/gallium/drivers/freedreno/ir3/ir3_shader.c     | 116 +++++--
 src/gallium/drivers/freedreno/ir3/ir3_shader.h     |  91 +++---
 src/gallium/drivers/vc4/vc4_context.h              |   9 +-
 src/gallium/drivers/vc4/vc4_nir_lower_io.c         |  18 +-
 src/gallium/drivers/vc4/vc4_opt_dead_code.c        |   2 +-
 src/gallium/drivers/vc4/vc4_program.c              | 174 +++++------
 src/gallium/drivers/vc4/vc4_qir.c                  |   2 +-
 src/gallium/drivers/vc4/vc4_qir.h                  |  21 +-
 src/glsl/Makefile.sources                          |   1 +
 src/glsl/nir/nir.h                                 |   3 +
 src/glsl/nir/nir_intrinsics.h                      |  23 +-
 src/glsl/nir/nir_lower_clip.c                      | 341 +++++++++++++++++++++
 src/glsl/nir/nir_print.c                           |  73 ++++-
 src/glsl/shader_enums.c                            | 202 ++++++++++++
 src/glsl/shader_enums.h                            |  59 ++++
 src/mesa/Makefile.sources                          |   4 +-
 26 files changed, 1306 insertions(+), 415 deletions(-)
 create mode 100644 src/glsl/nir/nir_lower_clip.c
 create mode 100644 src/glsl/shader_enums.c

-- 
2.4.3



More information about the mesa-dev mailing list