radeonsi: use slot indexes for bindless handles
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 3 Jul 2017 14:06:44 +0000 (16:06 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 22 Aug 2017 09:34:29 +0000 (11:34 +0200)
commitc2dfa9b1114db660547eca8bcdf32374313b6a04
tree4886bae62ed5b2f0eb612954083933d790e27d07
parent50349f404d3e4153c364f21ddc24a57060020003
radeonsi: use slot indexes for bindless handles

Using VRAM address as bindless handles is not a good idea because
we have to use LLVMIntToPTr and the LLVM CSE pass can't optimize
because it has no information about the pointer.

Instead, use slots indexes like the existing descriptors. Note
that we use fixed 16-dword slots for both samplers and images.
This doesn't really matter because no real apps use image handles.

This improves performance with DOW3 by +7%.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c