diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/gpu/vulkan/vma_wrapper.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/gpu/vulkan/vma_wrapper.cc')
-rw-r--r-- | chromium/gpu/vulkan/vma_wrapper.cc | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/chromium/gpu/vulkan/vma_wrapper.cc b/chromium/gpu/vulkan/vma_wrapper.cc index 1c8d72f598d..d0541c92ad6 100644 --- a/chromium/gpu/vulkan/vma_wrapper.cc +++ b/chromium/gpu/vulkan/vma_wrapper.cc @@ -18,27 +18,31 @@ VkResult CreateAllocator(VkPhysicalDevice physical_device, VmaAllocator* pAllocator) { auto* function_pointers = gpu::GetVulkanFunctionPointers(); VmaVulkanFunctions functions = { - function_pointers->vkGetPhysicalDevicePropertiesFn.get(), - function_pointers->vkGetPhysicalDeviceMemoryPropertiesFn.get(), - function_pointers->vkAllocateMemoryFn.get(), - function_pointers->vkFreeMemoryFn.get(), - function_pointers->vkMapMemoryFn.get(), - function_pointers->vkUnmapMemoryFn.get(), - function_pointers->vkFlushMappedMemoryRangesFn.get(), - function_pointers->vkInvalidateMappedMemoryRangesFn.get(), - function_pointers->vkBindBufferMemoryFn.get(), - function_pointers->vkBindImageMemoryFn.get(), - function_pointers->vkGetBufferMemoryRequirementsFn.get(), - function_pointers->vkGetImageMemoryRequirementsFn.get(), - function_pointers->vkCreateBufferFn.get(), - function_pointers->vkDestroyBufferFn.get(), - function_pointers->vkCreateImageFn.get(), - function_pointers->vkDestroyImageFn.get(), - function_pointers->vkCmdCopyBufferFn.get(), - function_pointers->vkGetBufferMemoryRequirements2Fn.get(), - function_pointers->vkGetImageMemoryRequirements2Fn.get(), + function_pointers->vkGetPhysicalDeviceProperties.get(), + function_pointers->vkGetPhysicalDeviceMemoryProperties.get(), + function_pointers->vkAllocateMemory.get(), + function_pointers->vkFreeMemory.get(), + function_pointers->vkMapMemory.get(), + function_pointers->vkUnmapMemory.get(), + function_pointers->vkFlushMappedMemoryRanges.get(), + function_pointers->vkInvalidateMappedMemoryRanges.get(), + function_pointers->vkBindBufferMemory.get(), + function_pointers->vkBindImageMemory.get(), + function_pointers->vkGetBufferMemoryRequirements.get(), + function_pointers->vkGetImageMemoryRequirements.get(), + function_pointers->vkCreateBuffer.get(), + function_pointers->vkDestroyBuffer.get(), + function_pointers->vkCreateImage.get(), + function_pointers->vkDestroyImage.get(), + function_pointers->vkCmdCopyBuffer.get(), + function_pointers->vkGetBufferMemoryRequirements2.get(), + function_pointers->vkGetImageMemoryRequirements2.get(), + function_pointers->vkBindBufferMemory2.get(), + function_pointers->vkBindImageMemory2.get(), + function_pointers->vkGetPhysicalDeviceMemoryProperties2.get(), }; + static_assert(kVulkanRequiredApiVersion >= VK_API_VERSION_1_1, ""); VmaAllocatorCreateInfo allocator_info = { .flags = VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, .physicalDevice = physical_device, @@ -51,6 +55,7 @@ VkResult CreateAllocator(VkPhysicalDevice physical_device, .preferredLargeHeapBlockSize = 4 * 1024 * 1024, .pVulkanFunctions = &functions, .instance = instance, + .vulkanApiVersion = kVulkanRequiredApiVersion, }; return vmaCreateAllocator(&allocator_info, pAllocator); @@ -113,18 +118,18 @@ void FreeMemory(VmaAllocator allocator, VmaAllocation allocation) { vmaFreeMemory(allocator, allocation); } -void FlushAllocation(VmaAllocator allocator, - VmaAllocation allocation, - VkDeviceSize offset, - VkDeviceSize size) { - vmaFlushAllocation(allocator, allocation, offset, size); +VkResult FlushAllocation(VmaAllocator allocator, + VmaAllocation allocation, + VkDeviceSize offset, + VkDeviceSize size) { + return vmaFlushAllocation(allocator, allocation, offset, size); } -void InvalidateAllocation(VmaAllocator allocator, - VmaAllocation allocation, - VkDeviceSize offset, - VkDeviceSize size) { - vmaInvalidateAllocation(allocator, allocation, offset, size); +VkResult InvalidateAllocation(VmaAllocator allocator, + VmaAllocation allocation, + VkDeviceSize offset, + VkDeviceSize size) { + return vmaInvalidateAllocation(allocator, allocation, offset, size); } void GetAllocationInfo(VmaAllocator allocator, |