Module: Mesa
Branch: master
Commit: b60bc59180abbe4277c72fb25b085896ae7744d7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b60bc59180abbe4277c72fb25b085896ae7744d7

Author: Hans-Kristian Arntzen <[email protected]>
Date:   Fri Apr  9 11:57:06 2021 +0200

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 <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10132>

---

 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 {

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to