vulkan: Set descriptorBindingStorageBufferUpdateAfterBind
authorBenjamin Otte <otte@redhat.com>
Tue, 20 Jun 2023 13:29:45 +0000 (15:29 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 20 Jun 2023 18:15:12 +0000 (20:15 +0200)
It's necessary now that we use storage buffers for gradients:

[ VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageBufferUpdateAfterBind-03008 ] Object 0: handle = 0x1e72d70, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x943cc552 | vkCreateDescriptorSetLayout(): pBindings[0] can't have VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT for VK_DESCRIPTOR_TYPE_STORAGE_BUFFER since descriptorBindingStorageBufferUpdateAfterBind is not enabled. The Vulkan spec states: If VkPhysicalDeviceDescriptorIndexingFeatures::descriptorBindingStorageBufferUpdateAfterBind is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageBufferUpdateAfterBind-03008)

gdk/gdkvulkancontext.c

index 1dbea45076bc0969c5ca556f37aa52b7900f5551..b6ec40891fb58366e37a2b247da0cbec4c2fc8ef 100644 (file)
@@ -1168,6 +1168,7 @@ gdk_display_create_vulkan_device (GdkDisplay  *display,
                                                       .descriptorBindingPartiallyBound = VK_TRUE,
                                                       .descriptorBindingVariableDescriptorCount = VK_TRUE,
                                                       .descriptorBindingSampledImageUpdateAfterBind = VK_TRUE,
+                                                      .descriptorBindingStorageBufferUpdateAfterBind = VK_TRUE,
                                                     }
                                                 },
                                                 NULL,