Refactor Graphics Allocation paths for Images

Change-Id: Ifa3084b18cac95289bbceeaf3669dd31567fbd3e
This commit is contained in:
Hoppe, Mateusz
2018-12-14 11:24:45 +01:00
committed by sys_ocldev
parent 3dca095ccf
commit f6790c42cf
20 changed files with 452 additions and 82 deletions

View File

@@ -89,7 +89,7 @@ class MemoryManager {
virtual void addAllocationToHostPtrManager(GraphicsAllocation *memory) = 0;
virtual void removeAllocationFromHostPtrManager(GraphicsAllocation *memory) = 0;
GraphicsAllocation *allocateGraphicsMemoryWithProperties(const AllocationProperties &properties) {
MOCKABLE_VIRTUAL GraphicsAllocation *allocateGraphicsMemoryWithProperties(const AllocationProperties &properties) {
return allocateGraphicsMemoryInPreferredPool(properties, 0u, nullptr);
}
@@ -116,7 +116,9 @@ class MemoryManager {
virtual GraphicsAllocation *allocate32BitGraphicsMemory(size_t size, const void *ptr, AllocationOrigin allocationOrigin) = 0;
virtual GraphicsAllocation *allocateGraphicsMemoryForImage(ImageInfo &imgInfo, Gmm *gmm) = 0;
virtual GraphicsAllocation *allocateGraphicsMemoryForImage(ImageInfo &imgInfo, const void *hostPtr) = 0;
GraphicsAllocation *allocateGraphicsMemoryForImageFromHostPtr(ImageInfo &imgInfo, const void *hostPtr);
GraphicsAllocation *allocateGraphicsMemoryInPreferredPool(AllocationProperties properties, DevicesBitfield devicesBitfield, const void *hostPtr);