Add support for stateless read buffer.

Change-Id: Iadf46a6d8651de3fd6bb07efc0eda278e04c86f6
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-3314
This commit is contained in:
Kamil Kopryk
2019-11-04 14:30:00 +01:00
committed by sys_ocldev
parent 8631e93c69
commit 2599a712fe
2 changed files with 63 additions and 3 deletions

View File

@@ -55,10 +55,14 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBuffer(
numEventsInWaitList, eventWaitList, event);
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getContext(), this->getDevice());
auto eBuiltInOps = EBuiltInOps::CopyBufferToBuffer;
if (forceStateless(size)) {
eBuiltInOps = EBuiltInOps::CopyBufferToBufferStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getContext(),
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
MultiDispatchInfo dispatchInfo;
void *dstPtr = ptr;
@@ -93,6 +97,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBuffer(
dc.srcOffset = {offset, 0, 0};
dc.size = {size, 0, 0};
dc.transferAllocation = mapAllocation ? mapAllocation : hostPtrSurf.getAllocation();
MultiDispatchInfo dispatchInfo;
builder.buildDispatchInfos(dispatchInfo, dc);
if (context->isProvidingPerformanceHints()) {