radeonsi: fix vertex fetches for 2_10_10_10 formats
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 2 Nov 2016 18:07:40 +0000 (19:07 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 4 Nov 2016 20:30:18 +0000 (21:30 +0100)
commit2c875158e2763d57e5dae8892af96a894bdb7dc9
treedfcb3a05ef6630e6e09e29210a7f3c1032f9865b
parent322483f71b068b3bbf69e5434e888f3fd3f4589e
radeonsi: fix vertex fetches for 2_10_10_10 formats

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.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state.h
src/gallium/drivers/radeonsi/si_state_shaders.c