Browse Source

fix: add NCNN_PLATFORM_API macro for VkAndroidHardwareBufferImageAllocator (#5521)

tags/20240820
Xyzhao GitHub 1 year ago
parent
commit
fbd6690d6c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/allocator.cpp

+ 2
- 0
src/allocator.cpp View File

@@ -1933,6 +1933,7 @@ void VkWeightStagingAllocator::fastFree(VkImageMemory* /*ptr*/)
{
}

#if NCNN_PLATFORM_API
#if __ANDROID_API__ >= 26
VkAndroidHardwareBufferImageAllocator::VkAndroidHardwareBufferImageAllocator(const VulkanDevice* _vkdev, AHardwareBuffer* _hb)
: VkAllocator(_vkdev), hb(_hb)
@@ -2171,6 +2172,7 @@ uint64_t VkAndroidHardwareBufferImageAllocator::external_format() const
return bufferFormatProperties.externalFormat;
}
#endif // __ANDROID_API__ >= 26
#endif // NCNN_PLATFORM_API

#endif // NCNN_VULKAN



Loading…
Cancel
Save