[Mesa-dev] [PATCH 0/3] radeonsi: handle unaligned vertex buffers in hardware

Nicolai Hähnle nhaehnle at gmail.com
Thu Apr 25 11:18:15 UTC 2019


Hi all,

the following patches contain code to implement all vertex fetches
using plain, non-format loads plus explicit shader arithmetic for
format conversion.

This allows us to remove the software workaround for unaligned vertex
buffers on SI, because we can just load individual bytes on the GPU.
CI+ will still use short/dword loads even in the unaligned case.

The format conversion code was tested by running with
radeonsi_vs_fetch_always_opencode=true on both Verde and Vega.

Please review!

Thanks,
Nicolai
--
 src/amd/common/ac_llvm_build.c               | 313 +++++++++++++++++
 src/amd/common/ac_llvm_build.h               |  30 ++
 .../drivers/radeonsi/si_debug_options.h      |   1 +
 src/gallium/drivers/radeonsi/si_get.c        |   2 +-
 src/gallium/drivers/radeonsi/si_pipe.h       |   1 +
 src/gallium/drivers/radeonsi/si_shader.c     | 249 +++++--------
 src/gallium/drivers/radeonsi/si_shader.h     |  46 +--
 src/gallium/drivers/radeonsi/si_state.c      | 233 +++++++-----
 src/gallium/drivers/radeonsi/si_state.h      |  19 +
 .../drivers/radeonsi/si_state_shaders.c      |  37 +-
 10 files changed, 645 insertions(+), 286 deletions(-)




More information about the mesa-dev mailing list