mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Reuse heaps for immediate cmd lists
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
54faccb53e
commit
3f5ac0b4d0
@@ -175,8 +175,12 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDis
|
||||
auto heap = container.getIndirectHeap(HeapType::INDIRECT_OBJECT);
|
||||
UNRECOVERABLE_IF(!heap);
|
||||
heap->align(WALKER_TYPE::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
||||
|
||||
auto ptr = container.getHeapSpaceAllowGrow(HeapType::INDIRECT_OBJECT, iohRequiredSize);
|
||||
void *ptr = nullptr;
|
||||
if (args.isKernelDispatchedFromImmediateCmdList) {
|
||||
ptr = container.getHeapWithRequiredSizeAndAlignment(HeapType::INDIRECT_OBJECT, iohRequiredSize, WALKER_TYPE::INDIRECTDATASTARTADDRESS_ALIGN_SIZE)->getSpace(iohRequiredSize);
|
||||
} else {
|
||||
ptr = container.getHeapSpaceAllowGrow(HeapType::INDIRECT_OBJECT, iohRequiredSize);
|
||||
}
|
||||
UNRECOVERABLE_IF(!ptr);
|
||||
offsetThreadData = (is64bit ? heap->getHeapGpuStartOffset() : heap->getHeapGpuBase()) + static_cast<uint64_t>(heap->getUsed() - sizeThreadData);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user