diff --git a/src/panfrost/vulkan/panvk_descriptor_set_layout.h b/src/panfrost/vulkan/panvk_descriptor_set_layout.h index 26612d5be5e..add79c03918 100644 --- a/src/panfrost/vulkan/panvk_descriptor_set_layout.h +++ b/src/panfrost/vulkan/panvk_descriptor_set_layout.h @@ -13,6 +13,7 @@ #include #include "vk_descriptor_set_layout.h" +#include "vk_util.h" #include "util/mesa-blake3.h" diff --git a/src/panfrost/vulkan/panvk_vX_descriptor_set.c b/src/panfrost/vulkan/panvk_vX_descriptor_set.c index 239ce495b3d..6bcf3bd3f98 100644 --- a/src/panfrost/vulkan/panvk_vX_descriptor_set.c +++ b/src/panfrost/vulkan/panvk_vX_descriptor_set.c @@ -33,13 +33,6 @@ #include "panvk_priv_bo.h" #include "panvk_sampler.h" -static inline const bool -is_dynamic_buffer(VkDescriptorType type) -{ - return type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC || - type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC; -} - static void * get_desc_slot_ptr(struct panvk_descriptor_set *set, uint32_t binding, uint32_t elem, VkDescriptorType type) @@ -246,7 +239,7 @@ panvk_per_arch(CreateDescriptorPool)( uint32_t desc_count = 0; for (unsigned i = 0; i < pCreateInfo->poolSizeCount; ++i) { - if (!is_dynamic_buffer(pCreateInfo->pPoolSizes[i].type)) + if (!vk_descriptor_type_is_dynamic(pCreateInfo->pPoolSizes[i].type)) desc_count += panvk_get_desc_stride(pCreateInfo->pPoolSizes[i].type) * pCreateInfo->pPoolSizes[i].descriptorCount; } @@ -329,7 +322,7 @@ panvk_desc_pool_allocate_set(struct panvk_descriptor_pool *pool, if ((layout->bindings[last_binding].flags & VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT) && - !is_dynamic_buffer(layout->bindings[last_binding].type)) { + !vk_descriptor_type_is_dynamic(layout->bindings[last_binding].type)) { uint32_t desc_stride = panvk_get_desc_stride(layout->bindings[last_binding].type);