mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
panvk: Track which dynamic buffers are SSBOs
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
This commit is contained in:
parent
12e1f5d0ea
commit
f350a69759
4 changed files with 9 additions and 0 deletions
|
|
@ -63,6 +63,7 @@ struct panvk_descriptor_state {
|
|||
BITSET_DECLARE(dirty_push_sets, MAX_SETS);
|
||||
|
||||
uint32_t dyn_buf_offsets[MAX_SETS][MAX_DYNAMIC_BUFFERS];
|
||||
uint32_t dyn_ssbos[MAX_SETS];
|
||||
};
|
||||
|
||||
#if PAN_ARCH < 9
|
||||
|
|
|
|||
|
|
@ -101,6 +101,9 @@ struct panvk_descriptor_set_layout {
|
|||
unsigned desc_count;
|
||||
unsigned dyn_buf_count;
|
||||
|
||||
/* Bitmask of which dynamic buffers are SSBOs */
|
||||
uint32_t dyn_ssbos;
|
||||
|
||||
/* Number of bindings in this descriptor set */
|
||||
uint32_t binding_count;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ cmd_desc_state_bind_sets(struct panvk_descriptor_state *desc_state,
|
|||
desc_state->dyn_buf_offsets[set_idx][b] =
|
||||
info->pDynamicOffsets[dynoffset_idx++];
|
||||
}
|
||||
desc_state->dyn_ssbos[set_idx] = set->layout->dyn_ssbos;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ panvk_per_arch(CreateDescriptorSetLayout)(
|
|||
|
||||
unsigned desc_idx = 0;
|
||||
unsigned dyn_buf_idx = 0;
|
||||
uint32_t dyn_ssbos = 0;
|
||||
for (unsigned i = 0; i < pCreateInfo->bindingCount; i++) {
|
||||
const VkDescriptorSetLayoutBinding *binding = &bindings[i];
|
||||
struct panvk_descriptor_set_binding_layout *binding_layout =
|
||||
|
|
@ -184,6 +185,8 @@ panvk_per_arch(CreateDescriptorSetLayout)(
|
|||
|
||||
if (vk_descriptor_type_is_dynamic(binding_layout->type)) {
|
||||
binding_layout->desc_idx = dyn_buf_idx;
|
||||
if (binding_layout->type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC)
|
||||
dyn_ssbos |= BITFIELD_RANGE(dyn_buf_idx, binding->descriptorCount);
|
||||
dyn_buf_idx += binding_layout->desc_count;
|
||||
} else {
|
||||
binding_layout->desc_idx = desc_idx;
|
||||
|
|
@ -194,6 +197,7 @@ panvk_per_arch(CreateDescriptorSetLayout)(
|
|||
|
||||
layout->desc_count = desc_idx;
|
||||
layout->dyn_buf_count = dyn_buf_idx;
|
||||
layout->dyn_ssbos = dyn_ssbos;
|
||||
|
||||
struct mesa_blake3 hash_ctx;
|
||||
_mesa_blake3_init(&hash_ctx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue