mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
radv: Only allocate supplied number of descriptors when variable.
Fixes: b5e04e9217 "radv: Support allocating variable size descriptor sets."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111019
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
177c35bf13
commit
d7e6541cc7
1 changed files with 7 additions and 1 deletions
|
|
@ -503,7 +503,13 @@ radv_descriptor_set_create(struct radv_device *device,
|
|||
}
|
||||
|
||||
set->layout = layout;
|
||||
uint32_t layout_size = align_u32(layout->size, 32);
|
||||
uint32_t layout_size = layout->size;
|
||||
if (variable_count) {
|
||||
assert(layout->has_variable_descriptors);
|
||||
layout_size = layout->binding[layout->binding_count - 1].offset +
|
||||
*variable_count * layout->binding[layout->binding_count - 1].size;
|
||||
}
|
||||
layout_size = align_u32(layout_size, 32);
|
||||
if (layout_size) {
|
||||
set->size = layout_size;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue