|
|
|
@ -91,6 +91,7 @@ typedef struct VulkanDevicePriv { |
|
|
|
|
VkPhysicalDeviceVulkan11Features device_features_1_1; |
|
|
|
|
VkPhysicalDeviceVulkan12Features device_features_1_2; |
|
|
|
|
VkPhysicalDeviceVulkan13Features device_features_1_3; |
|
|
|
|
VkPhysicalDeviceDescriptorBufferFeaturesEXT desc_buf_features; |
|
|
|
|
|
|
|
|
|
/* Queues */ |
|
|
|
|
pthread_mutex_t **qf_mutex; |
|
|
|
@ -351,6 +352,7 @@ static const VulkanOptExtension optional_device_exts[] = { |
|
|
|
|
{ VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, |
|
|
|
|
{ VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, |
|
|
|
|
{ VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, |
|
|
|
|
{ VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME, FF_VK_EXT_DESCRIPTOR_BUFFER, }, |
|
|
|
|
|
|
|
|
|
/* Imports/exports */ |
|
|
|
|
{ VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, FF_VK_EXT_EXTERNAL_FD_MEMORY }, |
|
|
|
@ -1336,9 +1338,13 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, |
|
|
|
|
VkPhysicalDeviceTimelineSemaphoreFeatures timeline_features = { |
|
|
|
|
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, |
|
|
|
|
}; |
|
|
|
|
VkPhysicalDeviceDescriptorBufferFeaturesEXT desc_buf_features = { |
|
|
|
|
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT, |
|
|
|
|
.pNext = &timeline_features, |
|
|
|
|
}; |
|
|
|
|
VkPhysicalDeviceVulkan13Features dev_features_1_3 = { |
|
|
|
|
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES, |
|
|
|
|
.pNext = &timeline_features, |
|
|
|
|
.pNext = &desc_buf_features, |
|
|
|
|
}; |
|
|
|
|
VkPhysicalDeviceVulkan12Features dev_features_1_2 = { |
|
|
|
|
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, |
|
|
|
@ -1364,6 +1370,8 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, |
|
|
|
|
p->device_features_1_2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; |
|
|
|
|
p->device_features_1_2.pNext = &p->device_features_1_3; |
|
|
|
|
p->device_features_1_3.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES; |
|
|
|
|
p->device_features_1_3.pNext = &p->desc_buf_features; |
|
|
|
|
p->desc_buf_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT; |
|
|
|
|
ctx->free = vulkan_device_free; |
|
|
|
|
|
|
|
|
|
/* Create an instance if not given one */ |
|
|
|
@ -1393,8 +1401,11 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, |
|
|
|
|
goto end; |
|
|
|
|
} |
|
|
|
|
p->device_features_1_2.timelineSemaphore = 1; |
|
|
|
|
p->device_features_1_2.bufferDeviceAddress = dev_features_1_2.bufferDeviceAddress; |
|
|
|
|
p->device_features_1_1.samplerYcbcrConversion = dev_features_1_1.samplerYcbcrConversion; |
|
|
|
|
p->device_features_1_3.synchronization2 = dev_features_1_3.synchronization2; |
|
|
|
|
p->desc_buf_features.descriptorBuffer = desc_buf_features.descriptorBuffer; |
|
|
|
|
p->desc_buf_features.descriptorBufferPushDescriptors = desc_buf_features.descriptorBufferPushDescriptors; |
|
|
|
|
|
|
|
|
|
dev_info.pNext = &hwctx->device_features; |
|
|
|
|
|
|
|
|
|