mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 10:20:20 +01:00
nvk: Stash descriptor set sizes
To save space in the root descriptor table, we put these in the CPU-only descriptor structure instead. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
This commit is contained in:
parent
107a09e7dd
commit
af3e7ba105
2 changed files with 3 additions and 0 deletions
|
|
@ -582,6 +582,7 @@ nvk_CmdBindDescriptorSets(VkCommandBuffer commandBuffer,
|
|||
|
||||
if (desc->sets[set_idx] != set) {
|
||||
desc->root.sets[set_idx] = nvk_descriptor_set_addr(set);
|
||||
desc->set_sizes[set_idx] = set->size;
|
||||
desc->sets[set_idx] = set;
|
||||
desc->sets_dirty |= BITFIELD_BIT(set_idx);
|
||||
|
||||
|
|
@ -703,6 +704,7 @@ nvk_cmd_buffer_flush_push_descriptors(struct nvk_cmd_buffer *cmd,
|
|||
}
|
||||
|
||||
desc->root.sets[set_idx] = push_set_addr;
|
||||
desc->set_sizes[set_idx] = sizeof(push_set->data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ struct nvk_root_descriptor_table {
|
|||
|
||||
struct nvk_descriptor_state {
|
||||
struct nvk_root_descriptor_table root;
|
||||
uint32_t set_sizes[NVK_MAX_SETS];
|
||||
struct nvk_descriptor_set *sets[NVK_MAX_SETS];
|
||||
uint32_t sets_dirty;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue