mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
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:
committed by
sys_ocldev
parent
d3d8b6f905
commit
a5950500a3
@@ -79,7 +79,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBufferRect(
|
||||
}
|
||||
auto &builder = BuiltIns::getInstance().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
|
||||
this->getContext(), this->getDevice());
|
||||
builder.takeOwnership(this->context);
|
||||
BuiltInOwnershipWrapper builtInLock(builder, this->context);
|
||||
|
||||
size_t hostPtrSize = Buffer::calculateHostPtrSize(hostOrigin, region, hostRowPitch, hostSlicePitch);
|
||||
void *dstPtr = ptr;
|
||||
@@ -93,7 +93,6 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBufferRect(
|
||||
region[2] != 0) {
|
||||
bool status = createAllocationForHostSurface(hostPtrSurf);
|
||||
if (!status) {
|
||||
builder.releaseOwnership();
|
||||
return CL_OUT_OF_RESOURCES;
|
||||
}
|
||||
dstPtr = reinterpret_cast<void *>(hostPtrSurf.getAllocation()->getGpuAddressToPatch());
|
||||
@@ -119,8 +118,6 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBufferRect(
|
||||
eventWaitList,
|
||||
event);
|
||||
|
||||
builder.releaseOwnership();
|
||||
|
||||
if (context->isProvidingPerformanceHints()) {
|
||||
context->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL, CL_ENQUEUE_READ_BUFFER_RECT_REQUIRES_COPY_DATA, static_cast<cl_mem>(buffer), ptr);
|
||||
if (!isL3Capable(ptr, hostPtrSize)) {
|
||||
|
||||
Reference in New Issue
Block a user