mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +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
@@ -433,14 +433,9 @@ bool KernelInfo::createKernelAllocation(const Device &device) {
|
||||
auto &hwInfo = device.getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
|
||||
bool status = false;
|
||||
if (kernelAllocation->isAllocatedInLocalMemoryPool() && hwHelper.isBlitCopyRequiredForLocalMemory(hwInfo)) {
|
||||
status = (BlitHelperFunctions::blitMemoryToAllocation(device, kernelAllocation, 0, heapInfo.pKernelHeap, {kernelIsaSize, 1, 1}) == BlitOperationResult::Success);
|
||||
} else {
|
||||
status = device.getMemoryManager()->copyMemoryToAllocation(kernelAllocation, 0, heapInfo.pKernelHeap, kernelIsaSize);
|
||||
}
|
||||
|
||||
return status;
|
||||
return MemoryTransferHelper::transferMemoryToAllocation(hwHelper.isBlitCopyRequiredForLocalMemory(hwInfo, *kernelAllocation),
|
||||
device, kernelAllocation, 0, heapInfo.pKernelHeap,
|
||||
static_cast<size_t>(kernelIsaSize));
|
||||
}
|
||||
|
||||
void KernelInfo::apply(const DeviceInfoKernelPayloadConstants &constants) {
|
||||
|
||||
Reference in New Issue
Block a user