Aux translation [4/n]: Lock BuiltIn Kernel + refactor BuiltIns locking

Change-Id: Ic7dc9b86a4aa5f93f1c4bcdf80b9598ecdff9713
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2018-08-13 12:24:17 +02:00
committed by sys_ocldev
parent d3d8b6f905
commit a5950500a3
21 changed files with 152 additions and 77 deletions

View File

@@ -194,7 +194,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMemcpy(cl_bool blockingCopy,
auto &builder = BuiltIns::getInstance().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getContext(), this->getDevice());
builder.takeOwnership(this->context);
BuiltInOwnershipWrapper builtInLock(builder, this->context);
BuiltinDispatchInfoBuilder::BuiltinOpParams operationParams;
operationParams.srcPtr = const_cast<void *>(srcPtr);
@@ -217,8 +217,6 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMemcpy(cl_bool blockingCopy,
eventWaitList,
event);
builder.releaseOwnership();
return CL_SUCCESS;
}
@@ -264,7 +262,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMemFill(void *svmPtr,
auto &builder = BuiltIns::getInstance().getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
this->getContext(), this->getDevice());
builder.takeOwnership(this->context);
BuiltInOwnershipWrapper builtInLock(builder, this->context);
BuiltinDispatchInfoBuilder::BuiltinOpParams operationParams;
MemObj patternMemObj(this->context, 0, 0, alignUp(patternSize, 4), patternAllocation->getUnderlyingBuffer(),
@@ -290,8 +288,6 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMemFill(void *svmPtr,
memoryManager->storeAllocation(std::unique_ptr<GraphicsAllocation>(patternAllocation), REUSABLE_ALLOCATION, taskCount);
builder.releaseOwnership();
return CL_SUCCESS;
}