[Mesa-dev] [PATCH 00/23] gallium, radeonsi: GS fixes and cleanups for multiple vertex streams

Nicolai Hähnle nhaehnle at gmail.com
Wed Nov 30 13:35:02 UTC 2016


Hi all,

Most of this series was triggered by me getting confused by the GSVS ring
memory layout while trying to track down a bug.

It consists roughly of three parts:

Patches 1-5: Common code changes to add the associated vertex stream for
all GS output components to the TGSI code.

Patches 6-7: Two simple GS bug fixes for radeonsi.

Patches 8-23: Make use of the vertex stream information to reduce the data
that is written by the GS and read by the GS copy shader when multiple
vertex streams are present. Pack the components for each vertex stream
tightly together on the GSVS ring. In the theoretical extreme case where
four vertex streams are used simultaneously, this ends up saving a factor 4
in memory and bandwidth. In practice, nobody really uses multiple vertex
streams, so aside from finally doing the Right Thing here, the impact is
small.

Please review!

Thanks,
Nicolai
---
 src/compiler/glsl/ir.h                       |   3 +
 src/compiler/glsl/ir_print_visitor.cpp       |  14 +-
 src/compiler/glsl/lower_packed_varyings.cpp  |   9 +
 src/gallium/auxiliary/tgsi/tgsi_build.c      |  18 +-
 src/gallium/auxiliary/tgsi/tgsi_dump.c       |  13 +
 src/gallium/auxiliary/tgsi/tgsi_scan.c       |   9 +
 src/gallium/auxiliary/tgsi/tgsi_scan.h       |   2 +
 src/gallium/auxiliary/tgsi/tgsi_text.c       |  48 +++
 src/gallium/auxiliary/tgsi/tgsi_ureg.c       |  16 +-
 src/gallium/auxiliary/tgsi/tgsi_ureg.h       |   1 +
 src/gallium/drivers/radeonsi/si_pipe.h       |   1 -
 src/gallium/drivers/radeonsi/si_shader.c     | 367 ++++++++++++-----
 src/gallium/drivers/radeonsi/si_state.h      |   6 +-
 .../drivers/radeonsi/si_state_shaders.c      |  77 ++--
 src/gallium/include/pipe/p_shader_tokens.h   |   5 +-
 src/gallium/include/pipe/p_state.h           |  21 +-
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp   |  10 +
 17 files changed, 443 insertions(+), 177 deletions(-)



More information about the mesa-dev mailing list