radeonsi: fix vertex fetches for 2_10_10_10 formats

Graphics / Mesa 3D Graphics Library / Mesa - Nicolai Hähnle [amd.com] - 4 November 2016 15:30 UTC

The hardware always treats the alpha channel as unsigned, so add a shader workaround. This is rare enough that we'll just build a monolithic vertex shader.

The SINT case cannot actually happen in OpenGL, but I've included it for completeness since it's just a mix of the other cases.

2c87515 radeonsi: fix vertex fetches for 2_10_10_10 formats
src/gallium/drivers/radeonsi/si_shader.c | 54 ++++++++++++++++++++---
src/gallium/drivers/radeonsi/si_shader.h | 11 +++++
src/gallium/drivers/radeonsi/si_state.c | 14 ++++++
src/gallium/drivers/radeonsi/si_state.h | 1 +
src/gallium/drivers/radeonsi/si_state_shaders.c | 4 ++
5 files changed, 78 insertions(+), 6 deletions(-)

Upstream: cgit.freedesktop.org


  • Share