radv: Never try to create more than max_sets descriptor sets.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 16 Feb 2017 19:52:24 +0000 (20:52 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 17 Feb 2017 08:28:14 +0000 (09:28 +0100)
commitf4487016226c3337fa5fb2244c75ce298093c3ce
treef9d19221d53754a3f3898e06dcc7b6ec6c254be9
parentfccbad73effc88011b2236e042ad749c8bc15abd
radv: Never try to create more than max_sets descriptor sets.

We only use the freed ones after all free space has been used. If
the app only allocates small descriptor sets, we might go over
max_sets before the memory is full.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
CC: <mesa-stable@lists.freedesktop.org>
Fixes: f4e499ec79147f4172f3669ae9dafd941aaeeb65
src/amd/vulkan/radv_descriptor_set.c
src/amd/vulkan/radv_private.h