mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Add blitter path for memory transfers to kernel allocations
Related-To: NEO-5667 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
01e064d7e4
commit
c84e9ca4f1
@@ -771,7 +771,11 @@ void Kernel::substituteKernelHeap(void *newKernelHeap, size_t newKernelHeapSize)
|
||||
auto currentAllocationSize = pKernelInfo->kernelAllocation->getUnderlyingBufferSize();
|
||||
bool status = false;
|
||||
if (currentAllocationSize >= newKernelHeapSize) {
|
||||
status = memoryManager->copyMemoryToAllocation(pKernelInfo->kernelAllocation, 0, newKernelHeap, newKernelHeapSize);
|
||||
auto &hwInfo = clDevice.getDevice().getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
status = MemoryTransferHelper::transferMemoryToAllocation(hwHelper.isBlitCopyRequiredForLocalMemory(hwInfo, *pKernelInfo->getGraphicsAllocation()),
|
||||
clDevice.getDevice(), pKernelInfo->getGraphicsAllocation(), 0, newKernelHeap,
|
||||
static_cast<size_t>(newKernelHeapSize));
|
||||
} else {
|
||||
memoryManager->checkGpuUsageAndDestroyGraphicsAllocations(pKernelInfo->kernelAllocation);
|
||||
pKernelInfo->kernelAllocation = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user