From b60bc59180abbe4277c72fb25b085896ae7744d7 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Fri, 9 Apr 2021 11:57:06 +0200 Subject: [PATCH] radv: Take image alignment into account when allocating MUTABLE pool. Allocating a descriptor set is aligned to 32 bytes, so just like the other buffer types, bump the descriptor size to 32 bytes when allocating MUTABLE descriptor types from a pool. Fixes: 86644b84b94 ("radv: Implement VK_VALVE_mutable_descriptor_type.") Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_descriptor_set.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c index 25b14939e8f..be8782ddca5 100644 --- a/src/amd/vulkan/radv_descriptor_set.c +++ b/src/amd/vulkan/radv_descriptor_set.c @@ -756,6 +756,8 @@ radv_CreateDescriptorPool(VkDevice _device, const VkDescriptorPoolCreateInfo *pC if (radv_mutable_descriptor_type_size_alignment( &mutable_info->pMutableDescriptorTypeLists[i], &mutable_size, &mutable_alignment)) { + /* 32 as we may need to align for images */ + mutable_size = align(mutable_size, 32); bo_size += mutable_size * pCreateInfo->pPoolSizes[i].descriptorCount; } } else {