vulkan: Use 3 descriptor sets, not 3 bindings
authorBenjamin Otte <otte@redhat.com>
Tue, 20 Jun 2023 13:39:29 +0000 (15:39 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 20 Jun 2023 18:15:12 +0000 (20:15 +0200)
commit17698bfd2e77ec3b6a603d0491d67da3e67357e0
tree2f5cb0f59a61a0fca3e6e5bde4e3d7822dd3165e
parent377592cb627fa8759b4b173336b5b58516123c14
vulkan: Use 3 descriptor sets, not 3 bindings

It turns out variable length is only supported for the last binding in
a set, not for every binding.
So we need to create one set for each of our arrays.

[ VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-03004 ] Object 0: handle = 0x33a9f10, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xd3f353a | vkCreateDescriptorSetLayout(): pBindings[0] has VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT but 0 is the largest value of all the bindings. The Vulkan spec states: If an element of pBindingFlags includes VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, then all other elements of VkDescriptorSetLayoutCreateInfo::pBindings must have a smaller value of binding (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-03004)
gsk/vulkan/gskvulkanrender.c
gsk/vulkan/gskvulkanrenderpass.c
gsk/vulkan/gskvulkanrenderprivate.h
gsk/vulkan/resources/common.frag.glsl