Refactor graphics memory allocation scheme

- replace createGraphicsAllocationWithRequiredBitness with more general
methodallocateGraphicsMemoryInPreferredPool based on passed
 AllocationData
- proper flags for allocation selected based on AllocationType

- remove allocateGraphicsMemory(size_t size, size_t alignment)
and use allocateGraphicsMemory(size_t size) instead where default
alignment is sufficient, otherwise use full options version:
allocateGraphicsMemory(size_t size, size_t alignment,
 bool forcePin, bool uncacheable)

Change-Id: I2da891f372ee181253cb840568a61b33c0d71fc9
This commit is contained in:
Hoppe, Mateusz
2018-07-09 14:12:32 +02:00
committed by sys_ocldev
parent 4993a94b5b
commit 55a045ebe1
44 changed files with 609 additions and 291 deletions

View File

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