| @@ -96,6 +96,7 @@ typedef struct VulkanDevicePriv { · 95 unmodified lines |
| 96 | 96 | VkPhysicalDeviceVulkan12Features device_features_1_2; |
| 97 | 97 | VkPhysicalDeviceVulkan13Features device_features_1_3; |
| 98 | 98 | VkPhysicalDeviceDescriptorBufferFeaturesEXT desc_buf_features; |
| 99 | + VkPhysicalDeviceShaderAtomicFloatFeaturesEXT atomic_float_features; |
| 99 | 100 | |
| 100 | 101 | /* Queues */ |
| 101 | 102 | pthread_mutex_t **qf_mutex; |
| @@ -401,6 +402,7 @@ static const VulkanOptExtension optional_device_exts[] = { · 299 unmodified lines |
| 401 | 402 | { VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, |
| 402 | 403 | { VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME, FF_VK_EXT_DESCRIPTOR_BUFFER, }, |
| 403 | 404 | { VK_EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME, FF_VK_EXT_DEVICE_DRM }, |
| 405 | + { VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME, FF_VK_EXT_ATOMIC_FLOAT }, |
| 404 | 406 | |
| 405 | 407 | /* Imports/exports */ |
| 406 | 408 | { VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, FF_VK_EXT_EXTERNAL_FD_MEMORY }, |
| @@ -1195,9 +1197,13 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, · 788 unmodified lines |
| 1195 | 1197 | VkPhysicalDeviceTimelineSemaphoreFeatures timeline_features = { |
| 1196 | 1198 | .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, |
| 1197 | 1199 | }; |
| 1200 | + VkPhysicalDeviceShaderAtomicFloatFeaturesEXT atomic_float_features = { |
| 1201 | + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT, |
| 1202 | + .pNext = &timeline_features, |
| 1203 | + }; |
| 1198 | 1204 | VkPhysicalDeviceDescriptorBufferFeaturesEXT desc_buf_features = { |
| 1199 | 1205 | .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT, |
| 1200 | | − .pNext = &timeline_features, |
| 1206 | + .pNext = &atomic_float_features, |
| 1201 | 1207 | }; |
| 1202 | 1208 | VkPhysicalDeviceVulkan13Features dev_features_1_3 = { |
| 1203 | 1209 | .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES, |
| @@ -1229,6 +1235,10 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, · 25 unmodified lines |
| 1229 | 1235 | p->device_features_1_3.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES; |
| 1230 | 1236 | p->device_features_1_3.pNext = &p->desc_buf_features; |
| 1231 | 1237 | p->desc_buf_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT; |
| 1238 | + p->desc_buf_features.pNext = &p->atomic_float_features; |
| 1239 | + p->atomic_float_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT; |
| 1240 | + p->atomic_float_features.pNext = NULL; |
| 1241 | + |
| 1232 | 1242 | ctx->free = vulkan_device_free; |
| 1233 | 1243 | |
| 1234 | 1244 | /* Create an instance if not given one */ |
| @@ -1286,6 +1296,9 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, · 51 unmodified lines |
| 1286 | 1296 | p->desc_buf_features.descriptorBuffer = desc_buf_features.descriptorBuffer; |
| 1287 | 1297 | p->desc_buf_features.descriptorBufferPushDescriptors = desc_buf_features.descriptorBufferPushDescriptors; |
| 1288 | 1298 | |
| 1299 | + p->atomic_float_features.shaderBufferFloat32Atomics = atomic_float_features.shaderBufferFloat32Atomics; |
| 1300 | + p->atomic_float_features.shaderBufferFloat32AtomicAdd = atomic_float_features.shaderBufferFloat32AtomicAdd; |
| 1301 | + |
| 1289 | 1302 | dev_info.pNext = &hwctx->device_features; |
| 1290 | 1303 | |
| 1291 | 1304 | /* Setup queue family */ |