mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Obtain storage info internally, in allocateGraphicsMemoryInPreferredPool
Related-To: NEO-2860 Change-Id: Id7acb10793f3145238f6b930b4c64c20c87a1021 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
387fdc5682
commit
6e7f82c315
@@ -325,8 +325,9 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo
|
||||
return true;
|
||||
}
|
||||
|
||||
GraphicsAllocation *MemoryManager::allocateGraphicsMemoryInPreferredPool(const AllocationProperties &properties, StorageInfo storageInfo, const void *hostPtr) {
|
||||
GraphicsAllocation *MemoryManager::allocateGraphicsMemoryInPreferredPool(const AllocationProperties &properties, const void *hostPtr) {
|
||||
AllocationData allocationData;
|
||||
auto storageInfo = GraphicsAllocation::createStorageInfoFromProperties(properties);
|
||||
getAllocationData(allocationData, properties, storageInfo, hostPtr);
|
||||
|
||||
AllocationStatus status = AllocationStatus::Error;
|
||||
|
||||
@@ -142,15 +142,14 @@ class MemoryManager {
|
||||
virtual void removeAllocationFromHostPtrManager(GraphicsAllocation *memory) = 0;
|
||||
|
||||
MOCKABLE_VIRTUAL GraphicsAllocation *allocateGraphicsMemoryWithProperties(const AllocationProperties &properties) {
|
||||
return allocateGraphicsMemoryInPreferredPool(properties, GraphicsAllocation::createStorageInfoFromProperties(properties), nullptr);
|
||||
return allocateGraphicsMemoryInPreferredPool(properties, nullptr);
|
||||
}
|
||||
|
||||
MOCKABLE_VIRTUAL GraphicsAllocation *allocateGraphicsMemoryWithProperties(const AllocationProperties &properties, const void *ptr) {
|
||||
return allocateGraphicsMemoryInPreferredPool(properties, GraphicsAllocation::createStorageInfoFromProperties(properties), ptr);
|
||||
return allocateGraphicsMemoryInPreferredPool(properties, ptr);
|
||||
}
|
||||
|
||||
GraphicsAllocation *allocateGraphicsMemoryInPreferredPool(const AllocationProperties &properties,
|
||||
StorageInfo storageInfo, const void *hostPtr);
|
||||
GraphicsAllocation *allocateGraphicsMemoryInPreferredPool(const AllocationProperties &properties, const void *hostPtr);
|
||||
|
||||
virtual GraphicsAllocation *createGraphicsAllocationFromSharedHandle(osHandle handle, const AllocationProperties &properties, bool requireSpecificBitness) = 0;
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ Image *D3DSurface::create(Context *context, cl_dx9_surface_info_khr *surfaceInfo
|
||||
AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(&imgInfo, true);
|
||||
allocProperties.allocationType = GraphicsAllocation::AllocationType::SHARED_RESOURCE_COPY;
|
||||
|
||||
alloc = context->getMemoryManager()->allocateGraphicsMemoryInPreferredPool(allocProperties, {}, nullptr);
|
||||
alloc = context->getMemoryManager()->allocateGraphicsMemoryInPreferredPool(allocProperties, nullptr);
|
||||
|
||||
imgDesc.image_row_pitch = imgInfo.rowPitch;
|
||||
imgDesc.image_slice_pitch = imgInfo.slicePitch;
|
||||
|
||||
Reference in New Issue
Block a user