mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 21:30:23 +01:00
panvk: use vk_descriptor_type_is_dynamic
No need for our own helper now that we have a generic one. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
This commit is contained in:
parent
ea88898b04
commit
d188856ffd
2 changed files with 3 additions and 9 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include "vk_descriptor_set_layout.h"
|
||||
#include "vk_util.h"
|
||||
|
||||
#include "util/mesa-blake3.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue