st/mesa: clean up atomic vs ssbo code
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 29 Aug 2018 13:35:11 +0000 (15:35 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 5 Sep 2018 04:46:27 +0000 (05:46 +0100)
commit38f0c078de9628bd5d429021d9c6e210b66da0fa
tree6c2e14b0390b50715536361862be94a8e0669fd4
parenta805e4e9de2540ec7a7115efb76337f39826e017
st/mesa: clean up atomic vs ssbo code

This makes the code a bit easier to follow; we first set up
MaxShaderStorageBlocks, then we either set up a dedicated
MaxAtomicBuffers, or we split MaxShaderStorageBlocks in two.

While we're at it, also make the SSBO-splitting code tolerate the
hypothetical case of having an odd number of SSBOs without incorrectly
dropping the last SSBO.

This has the nice result that the SSBOs and atomic buffers are dealt
with almost completely orthogonally, easing some upcoming patches.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
src/mesa/state_tracker/st_extensions.c