mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +00:00
Vulkan: Use the ResourceMemoryAllocator for all resources
This removes the duplication of the memory allocators in preparation for using sub-allocation in the Vulkan backend too. Also renames ResourceMemory to ResourceHeap and MemoryResourceAllocator to ResourceMemoryAllocator, and fixes a number of unused includes. BUG=dawn:27 Change-Id: I1a9e7d41e5efafa5192bda1d89dc06455fa2af40 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12660 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
6da1770507
commit
60a04dd18c
@@ -20,7 +20,7 @@
|
||||
#include "dawn_native/vulkan/AdapterVk.h"
|
||||
#include "dawn_native/vulkan/DeviceVk.h"
|
||||
#include "dawn_native/vulkan/FencedDeleter.h"
|
||||
#include "dawn_native/vulkan/MemoryAllocator.h"
|
||||
#include "dawn_native/vulkan/ResourceMemoryAllocatorVk.h"
|
||||
#include "dawn_native/vulkan/TextureVk.h"
|
||||
#include "utils/DawnHelpers.h"
|
||||
#include "utils/SystemUtils.h"
|
||||
@@ -89,7 +89,8 @@ namespace {
|
||||
externalInfo.pNext = nullptr;
|
||||
externalInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;
|
||||
|
||||
int bestType = deviceVk->GetMemoryAllocator()->FindBestTypeIndex(requirements, false);
|
||||
int bestType = deviceVk->GetResourceMemoryAllocatorForTesting()->FindBestTypeIndex(
|
||||
requirements, false);
|
||||
VkMemoryAllocateInfo allocateInfo;
|
||||
allocateInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
|
||||
allocateInfo.pNext = &externalInfo;
|
||||
|
||||
Reference in New Issue
Block a user