lavapipe: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
This commit is contained in:
committed by
Marge Bot
parent
3df7eda3a8
commit
4de0e11b92
@@ -128,8 +128,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateDescriptorSetLayout(
|
||||
set_layout->binding[b].uniform_block_offset = 0;
|
||||
set_layout->binding[b].uniform_block_size = 0;
|
||||
|
||||
if (binding->descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC ||
|
||||
binding->descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) {
|
||||
if (vk_descriptor_type_is_dynamic(binding->descriptorType)) {
|
||||
set_layout->binding[b].dynamic_index = dynamic_offset_count;
|
||||
dynamic_offset_count += binding->descriptorCount;
|
||||
}
|
||||
|
||||
@@ -1238,8 +1238,7 @@ apply_dynamic_offsets(struct lvp_descriptor_set **out_set, const uint32_t *offse
|
||||
|
||||
for (uint32_t i = 0; i < set->layout->binding_count; i++) {
|
||||
const struct lvp_descriptor_set_binding_layout *binding = &set->layout->binding[i];
|
||||
if (binding->type != VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC &&
|
||||
binding->type != VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)
|
||||
if (!vk_descriptor_type_is_dynamic(binding->type))
|
||||
continue;
|
||||
|
||||
struct lp_descriptor *desc = set->map;
|
||||
|
||||
Reference in New Issue
Block a user