diff --git a/src/gpu.cpp b/src/gpu.cpp index 6daf45c85127..da26f72f53d3 100644 --- a/src/gpu.cpp +++ b/src/gpu.cpp @@ -366,6 +366,7 @@ class GpuInfoPrivate int support_VK_EXT_descriptor_indexing; int support_VK_EXT_memory_budget; int support_VK_EXT_memory_priority; + int support_VK_EXT_pageable_device_local_memory; int support_VK_EXT_queue_family_foreign; int support_VK_AMD_device_coherent_memory; #if __ANDROID_API__ >= 26 @@ -794,6 +795,11 @@ int GpuInfo::support_VK_EXT_memory_priority() const return d->support_VK_EXT_memory_priority; } +int GpuInfo::support_VK_EXT_pageable_device_local_memory() const +{ + return d->support_VK_EXT_pageable_device_local_memory; +} + int GpuInfo::support_VK_EXT_queue_family_foreign() const { return d->support_VK_EXT_queue_family_foreign; @@ -1695,6 +1701,7 @@ int create_gpu_instance(const char* driver_path) gpu_info.support_VK_EXT_descriptor_indexing = 0; gpu_info.support_VK_EXT_memory_budget = 0; gpu_info.support_VK_EXT_memory_priority = 0; + gpu_info.support_VK_EXT_pageable_device_local_memory = 0; gpu_info.support_VK_EXT_queue_family_foreign = 0; gpu_info.support_VK_AMD_device_coherent_memory = 0; #if __ANDROID_API__ >= 26 @@ -1756,6 +1763,8 @@ int create_gpu_instance(const char* driver_path) gpu_info.support_VK_EXT_memory_budget = exp.specVersion; else if (strcmp(exp.extensionName, "VK_EXT_memory_priority") == 0) gpu_info.support_VK_EXT_memory_priority = exp.specVersion; + else if (strcmp(exp.extensionName, "VK_EXT_pageable_device_local_memory") == 0) + gpu_info.support_VK_EXT_pageable_device_local_memory = exp.specVersion; else if (strcmp(exp.extensionName, "VK_EXT_queue_family_foreign") == 0) gpu_info.support_VK_EXT_queue_family_foreign = exp.specVersion; else if (strcmp(exp.extensionName, "VK_AMD_device_coherent_memory") == 0) @@ -2485,6 +2494,8 @@ VulkanDevice::VulkanDevice(int device_index) enabledExtensions.push_back("VK_EXT_memory_budget"); if (info.support_VK_EXT_memory_priority()) enabledExtensions.push_back("VK_EXT_memory_priority"); + if (info.support_VK_EXT_pageable_device_local_memory()) + enabledExtensions.push_back("VK_EXT_pageable_device_local_memory"); if (info.support_VK_EXT_queue_family_foreign()) enabledExtensions.push_back("VK_EXT_queue_family_foreign"); if (info.support_VK_AMD_device_coherent_memory()) diff --git a/src/gpu.h b/src/gpu.h index a8d7ff91fdfd..696f651ed2b5 100644 --- a/src/gpu.h +++ b/src/gpu.h @@ -303,6 +303,7 @@ class NCNN_EXPORT GpuInfo int support_VK_EXT_descriptor_indexing() const; int support_VK_EXT_memory_budget() const; int support_VK_EXT_memory_priority() const; + int support_VK_EXT_pageable_device_local_memory() const; int support_VK_EXT_queue_family_foreign() const; int support_VK_AMD_device_coherent_memory() const; #if __ANDROID_API__ >= 26