Simplify Memory Manager API [2/n]

- make AllocationData a protected structure
- use AllocationProperties instead of AllocationFlags
- refactor methods: allocateGraphicsMemory64kb, allocateGraphicsMemoryForSVM
- call AllocateGraphicsMemoryInPreferredPool in AllocateGraphicsMemory
  where there is no host ptr

Change-Id: Ie9ca47b1bccacd00f8486e7d1bf6fb3985e5cb12
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2018-12-06 15:03:06 +01:00
committed by sys_ocldev
parent 7e397b0132
commit a6be6533ea
36 changed files with 229 additions and 265 deletions

View File

@@ -255,7 +255,7 @@ cl_int Kernel::initialize() {
retVal = CL_OUT_OF_RESOURCES;
break;
}
privateSurface = device.getMemoryManager()->allocateGraphicsMemoryInPreferredPool(AllocationFlags(true), 0, nullptr, static_cast<size_t>(privateSurfaceSize), GraphicsAllocation::AllocationType::PRIVATE_SURFACE);
privateSurface = device.getMemoryManager()->allocateGraphicsMemoryInPreferredPool(AllocationProperties(true, static_cast<size_t>(privateSurfaceSize)), 0, nullptr, GraphicsAllocation::AllocationType::PRIVATE_SURFACE);
if (privateSurface == nullptr) {
retVal = CL_OUT_OF_RESOURCES;
break;