mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
panvk: count iubs correctly when checking if layout is supported
For inline uniform blocks, the descriptor count given in the binding is
a byte size. Convert the size into a descriptor count and use that when
checking if a descriptor set layout is supported.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Fixes: 0440d1dd03 ("panvk: Advertise VK_EXT_inline_uniform_block")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545>
This commit is contained in:
parent
3e9dc4f777
commit
5023feb0f7
1 changed files with 5 additions and 1 deletions
|
|
@ -290,7 +290,11 @@ panvk_per_arch(GetDescriptorSetLayoutSupport)(
|
|||
};
|
||||
|
||||
unsigned stride = panvk_get_desc_stride(&layout);
|
||||
unsigned count = stride * binding->descriptorCount;
|
||||
unsigned binding_desc_count = binding->descriptorCount;
|
||||
unsigned count = type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
|
||||
? panvk_get_iub_desc_count(binding_desc_count)
|
||||
: stride * binding_desc_count;
|
||||
|
||||
desc_count += count;
|
||||
if (flags & VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT)
|
||||
variable_stride = stride;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue