radeonsi: don't fetch 8 dwords for samplerBuffer and imageBuffer
authorMarek Olšák <marek.olsak@amd.com>
Mon, 28 Nov 2016 00:37:42 +0000 (01:37 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 29 Nov 2016 22:52:31 +0000 (23:52 +0100)
commit662b9c24d0bfcabb2b78dec787ab899a97643330
treec873d1ecb2516cd636fcfc91b459be7c43895d30
parentdbbdc6bb5a500a810b3ab38c255b16bf470c51b1
radeonsi: don't fetch 8 dwords for samplerBuffer and imageBuffer

The compiler doesn't shrink s_load_dwordx8, so we always wasted 4 SGPRs.
Also, the extraction of the descriptor created some really ugly asm code
with lots of VALU bitwise ops and v_readfirstlane.

Totals from *affected* shaders:
SGPRS: 13880 -> 13253 (-4.52 %)
VGPRS: 15200 -> 15088 (-0.74 %)
Code Size: 499864 -> 459816 (-8.01 %) bytes
Max Waves: 1554 -> 1564 (0.64 %)

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader.c