[Mesa-stable] [Mesa-dev] [PATCH] radv: fix descriptor pool allocation size

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Sep 14 12:59:10 UTC 2018


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Fri, Sep 14, 2018 at 2:55 PM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> The size has to be multiplied by the number of sets.
>
> This gets rid of the OUT_OF_POOL_KHR error and fixes
> the Tangrams demo.
>
> CC: 18.1 18.2 <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/vulkan/radv_descriptor_set.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c
> index c4341f6ac5..49d0811bb0 100644
> --- a/src/amd/vulkan/radv_descriptor_set.c
> +++ b/src/amd/vulkan/radv_descriptor_set.c
> @@ -569,9 +569,10 @@ VkResult radv_CreateDescriptorPool(
>         }
>
>         if (!(pCreateInfo->flags & VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT)) {
> -               uint64_t host_size = pCreateInfo->maxSets * sizeof(struct radv_descriptor_set);
> +               uint64_t host_size = sizeof(struct radv_descriptor_set);
>                 host_size += sizeof(struct radeon_winsys_bo*) * bo_count;
>                 host_size += sizeof(struct radv_descriptor_range) * range_count;
> +               host_size *= pCreateInfo->maxSets;
>                 size += host_size;
>         } else {
>                 size += sizeof(struct radv_descriptor_pool_entry) * pCreateInfo->maxSets;
> --
> 2.19.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list