mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 21:42:53 +08:00
Add support for stateless write buffer
Change-Id: Ie5d5abc9fac268c3467cafed5741828d84b13795 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com> Related-To: NEO-3314
This commit is contained in:
@@ -50,11 +50,15 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteBuffer(
|
||||
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 *srcPtr = const_cast<void *>(ptr);
|
||||
|
||||
@@ -89,6 +93,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteBuffer(
|
||||
dc.dstOffset = {offset, 0, 0};
|
||||
dc.size = {size, 0, 0};
|
||||
dc.transferAllocation = mapAllocation ? mapAllocation : hostPtrSurf.getAllocation();
|
||||
|
||||
MultiDispatchInfo dispatchInfo;
|
||||
builder.buildDispatchInfos(dispatchInfo, dc);
|
||||
|
||||
enqueueHandler<CL_COMMAND_WRITE_BUFFER>(
|
||||
|
||||
Reference in New Issue
Block a user