mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
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:
committed by
sys_ocldev
parent
0939743874
commit
5b2d13765a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user