mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Refactor: Common helper for Blit and CPU memory transfers
Change-Id: Icc61f82517e75e3066e441494af3bf9a7ffbbeef Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
33ce6910c5
commit
27f9a95af2
@@ -110,18 +110,9 @@ void KernelImmutableData::initialize(NEO::KernelInfo *kernelInfo, NEO::MemoryMan
|
||||
auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
|
||||
if (kernelInfo->heapInfo.pKernelHeap != nullptr) {
|
||||
bool doCpuIsaCopy = true;
|
||||
|
||||
if (allocation->isAllocatedInLocalMemoryPool() && hwHelper.isBlitCopyRequiredForLocalMemory(hwInfo)) {
|
||||
auto status = NEO::BlitHelperFunctions::blitMemoryToAllocation(*device, allocation, 0, kernelInfo->heapInfo.pKernelHeap, {kernelIsaSize, 1, 1});
|
||||
UNRECOVERABLE_IF(status == NEO::BlitOperationResult::Fail);
|
||||
|
||||
doCpuIsaCopy = (status == NEO::BlitOperationResult::Unsupported);
|
||||
}
|
||||
|
||||
if (doCpuIsaCopy) {
|
||||
memoryManager.copyMemoryToAllocation(allocation, 0, kernelInfo->heapInfo.pKernelHeap, kernelIsaSize);
|
||||
}
|
||||
NEO::MemoryTransferHelper::transferMemoryToAllocation(hwHelper.isBlitCopyRequiredForLocalMemory(hwInfo, *allocation),
|
||||
*device, allocation, 0, kernelInfo->heapInfo.pKernelHeap,
|
||||
static_cast<size_t>(kernelIsaSize));
|
||||
}
|
||||
|
||||
isaGraphicsAllocation.reset(allocation);
|
||||
|
||||
Reference in New Issue
Block a user