vk: Enable deferred descriptor updates via descriptor-indexing

This commit is contained in:
kd-11 2021-09-23 22:54:50 +03:00 committed by kd-11
parent 381c7544fa
commit ba2a8ebf2e
10 changed files with 164 additions and 66 deletions

View file

@ -326,6 +326,7 @@ namespace vk
if (pgpu->descriptor_indexing_support)
{
requested_extensions.push_back(VK_KHR_MAINTENANCE3_EXTENSION_NAME);
requested_extensions.push_back(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME);
}
@ -460,6 +461,17 @@ namespace vk
rsx_log.notice("GPU/driver lacks support for float16 data types. All float16_t arithmetic will be emulated with float32_t.");
}
VkPhysicalDeviceDescriptorIndexingFeatures indexing_features{};
if (pgpu->descriptor_indexing_support)
{
indexing_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT;
indexing_features.descriptorBindingUniformTexelBufferUpdateAfterBind = VK_TRUE;
indexing_features.descriptorBindingUniformBufferUpdateAfterBind = VK_TRUE;
indexing_features.descriptorBindingStorageBufferUpdateAfterBind = VK_TRUE;
indexing_features.descriptorBindingSampledImageUpdateAfterBind = VK_TRUE;
device.pNext = &indexing_features;
}
CHECK_RESULT_EX(vkCreateDevice(*pgpu, &device, nullptr, &dev), message_on_error);
// Initialize queues