Move logic of copying ISA to separated method

Change-Id: I2c5fd3004fa41ed1bf1cf3d54741756f546f6941
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-03-01 14:25:33 +01:00
committed by sys_ocldev
parent 0939743874
commit 5b2d13765a
6 changed files with 37 additions and 7 deletions

View File

@@ -488,12 +488,7 @@ bool KernelInfo::createKernelAllocation(MemoryManager *memoryManager) {
UNRECOVERABLE_IF(kernelAllocation);
auto kernelIsaSize = heapInfo.pKernelHeader->KernelHeapSize;
kernelAllocation = memoryManager->allocateGraphicsMemoryWithProperties({kernelIsaSize, GraphicsAllocation::AllocationType::KERNEL_ISA});
if (kernelAllocation) {
memcpy_s(kernelAllocation->getUnderlyingBuffer(), kernelIsaSize, heapInfo.pKernelHeap, kernelIsaSize);
} else {
return false;
}
return true;
return memoryManager->copyMemoryToAllocation(kernelAllocation, heapInfo.pKernelHeap, kernelIsaSize);
}
} // namespace OCLRT