radv: improve gathering of load_push_constants with dynamic bindings
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 22 Jan 2019 18:30:20 +0000 (19:30 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 23 Jan 2019 08:43:53 +0000 (09:43 +0100)
commit698afa177ec52220b3f0045f6488d91e5405ab3d
tree5894c2dc0de738c4f80b09500d9bfc81c53ef0f6
parente0485a1dd7f0df90fb7049c23425aa693a284bad
radv: improve gathering of load_push_constants with dynamic bindings

For example, if a pipeline has two stages VS and FS. And if only
the fragment stage needs dynamic bindings, we shouldn't allocate
an extra user SGPR for the vertex stage. Of course, if the vertex
stage loads constants, it needs an user SGPR.

This should reduce the number of SET_SH_REG packets that are emitted.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_descriptor_set.c
src/amd/vulkan/radv_descriptor_set.h
src/amd/vulkan/radv_shader_info.c