mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Simplify Memory Manager API [3/4]
- remove method allocateGraphicsMemory(size_t size) - pass allocation type in allocation properties - set allocation type in allocateGraphicsMemoryInPreferredPool Change-Id: Ia9296d0ab2f711b7d78aff615cb56b3a246b60ec Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
686785ce5d
commit
8ec072d39c
@@ -282,7 +282,7 @@ DrmAllocation *DrmMemoryManager::allocateGraphicsMemory64kb(AllocationData alloc
|
||||
|
||||
GraphicsAllocation *DrmMemoryManager::allocateGraphicsMemoryForImage(ImageInfo &imgInfo, Gmm *gmm) {
|
||||
if (!GmmHelper::allowTiling(*imgInfo.imgDesc)) {
|
||||
auto alloc = MemoryManager::allocateGraphicsMemory(imgInfo.size);
|
||||
auto alloc = MemoryManager::allocateGraphicsMemoryWithProperties({imgInfo.size, GraphicsAllocation::AllocationType::UNDECIDED});
|
||||
if (alloc) {
|
||||
alloc->gmm = gmm;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ WddmMemoryManager::WddmMemoryManager(bool enable64kbPages, bool enableLocalMemor
|
||||
GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryForImage(ImageInfo &imgInfo, Gmm *gmm) {
|
||||
if (!GmmHelper::allowTiling(*imgInfo.imgDesc) && imgInfo.mipCount == 0) {
|
||||
delete gmm;
|
||||
return allocateGraphicsMemory(imgInfo.size);
|
||||
return allocateGraphicsMemoryWithProperties({imgInfo.size, GraphicsAllocation::AllocationType::UNDECIDED});
|
||||
}
|
||||
auto allocation = std::make_unique<WddmAllocation>(nullptr, imgInfo.size, nullptr, MemoryPool::SystemCpuInaccessible, getOsContextCount(), false);
|
||||
allocation->gmm = gmm;
|
||||
|
||||
Reference in New Issue
Block a user