mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 14:28:05 +02:00
radv: Fix interactions between variable descriptor count and inline uniform blocks.
Fixes: d7e6541cc7 "radv: Only allocate supplied number of descriptors when variable."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
11a3679e3a
commit
8a053254b8
1 changed files with 5 additions and 1 deletions
|
|
@ -506,8 +506,12 @@ radv_descriptor_set_create(struct radv_device *device,
|
|||
uint32_t layout_size = layout->size;
|
||||
if (variable_count) {
|
||||
assert(layout->has_variable_descriptors);
|
||||
uint32_t stride = layout->binding[layout->binding_count - 1].size;
|
||||
if (layout->binding[layout->binding_count - 1].type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT)
|
||||
stride = 1;
|
||||
|
||||
layout_size = layout->binding[layout->binding_count - 1].offset +
|
||||
*variable_count * layout->binding[layout->binding_count - 1].size;
|
||||
*variable_count * stride;
|
||||
}
|
||||
layout_size = align_u32(layout_size, 32);
|
||||
if (layout_size) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue