Move dispatch builder to seperate file

Change-Id: I309986902fda41a389e9facbf186bc8b2740af7a
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2020-02-21 11:37:14 +01:00
committed by sys_ocldev
parent 1a126a443a
commit 13e59b26b5
45 changed files with 936 additions and 910 deletions

View File

@@ -108,7 +108,7 @@ void CommandQueueHw<Family>::dispatchAuxTranslationBuiltin(MultiDispatchInfo &mu
return;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getDevice());
auto &auxTranslationBuilder = static_cast<BuiltInOp<EBuiltInOps::AuxTranslation> &>(builder);
BuiltinOpParams dispatchParams;

View File

@@ -61,7 +61,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface *(&surfaces)[surfaceCount
forceDispatchScheduler(multiDispatchInfo);
} else {
if (kernel->isAuxTranslationRequired()) {
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getDevice());
builtInLock.takeOwnership(builder, this->context);
kernel->fillWithBuffersForAuxTranslation(memObjsForAuxTranslation);
multiDispatchInfo.setMemObjsForAuxTranslation(memObjsForAuxTranslation);

View File

@@ -36,8 +36,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyBuffer(
eBuiltInOpsType = EBuiltInOps::CopyBufferToBufferStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(eBuiltInOpsType,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(eBuiltInOpsType,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);

View File

@@ -37,8 +37,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyBufferRect(
eBuiltInOps = EBuiltInOps::CopyBufferRectStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
MemObjSurface srcBufferSurf(srcBuffer);

View File

@@ -35,8 +35,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyBufferToImage(
eBuiltInOpsType = EBuiltInOps::CopyBufferToImage3dStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(eBuiltInOpsType,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(eBuiltInOpsType,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
MemObjSurface srcBufferSurf(srcBuffer);

View File

@@ -33,8 +33,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyImage(
MultiDispatchInfo di;
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
MemObjSurface srcImgSurf(srcImage);

View File

@@ -34,8 +34,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyImageToBuffer(
if (forceStateless(dstBuffer->getSize())) {
eBuiltInOpsType = EBuiltInOps::CopyImage3dToBufferStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(eBuiltInOpsType,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(eBuiltInOpsType,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
MemObjSurface srcImgSurf(srcImage);

View File

@@ -49,8 +49,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueFillBuffer(
eBuiltInOps = EBuiltInOps::FillBufferStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);

View File

@@ -31,8 +31,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueFillImage(
MultiDispatchInfo di;
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::FillImage3d,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(EBuiltInOps::FillImage3d,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
MemObjSurface dstImgSurf(image);

View File

@@ -75,8 +75,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBuffer(
if (forceStateless(buffer->getSize())) {
eBuiltInOps = EBuiltInOps::CopyBufferToBufferStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
void *dstPtr = ptr;

View File

@@ -50,8 +50,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBufferRect(
if (forceStateless(buffer->getSize())) {
eBuiltInOps = EBuiltInOps::CopyBufferRectStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
size_t hostPtrSize = Buffer::calculateHostPtrSize(hostOrigin, region, hostRowPitch, hostSlicePitch);

View File

@@ -54,8 +54,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadImage(
numEventsInWaitList, eventWaitList, event);
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImage3dToBuffer,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImage3dToBuffer,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);

View File

@@ -106,8 +106,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMap(cl_bool blockingMap,
}
MultiDispatchInfo dispatchInfo;
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
GeneralSurface dstSurface(svmData->cpuAllocation);
@@ -199,8 +199,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMUnmap(void *svmPtr,
svmData->gpuAllocation->setTbxWritable(true, GraphicsAllocation::defaultBank);
MultiDispatchInfo dispatchInfo;
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
GeneralSurface dstSurface(svmData->gpuAllocation);
@@ -334,8 +334,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMemcpy(cl_bool blockingCopy,
builtInType = EBuiltInOps::CopyBufferToBufferStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(builtInType,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(builtInType,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
MultiDispatchInfo dispatchInfo;
BuiltinOpParams operationParams;
@@ -476,8 +476,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMemFill(void *svmPtr,
builtInType = EBuiltInOps::FillBufferStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(builtInType,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(builtInType,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);

View File

@@ -71,8 +71,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteBuffer(
if (forceStateless(buffer->getSize())) {
eBuiltInOps = EBuiltInOps::CopyBufferToBufferStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);

View File

@@ -49,8 +49,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteBufferRect(
if (forceStateless(buffer->getSize())) {
eBuiltInOps = EBuiltInOps::CopyBufferRectStateless;
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(eBuiltInOps,
this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
size_t hostPtrSize = Buffer::calculateHostPtrSize(hostOrigin, region, hostRowPitch, hostSlicePitch);

View File

@@ -45,8 +45,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteImage(
return enqueueMarkerForReadWriteOperation(dstImage, const_cast<void *>(ptr), CL_COMMAND_WRITE_IMAGE, blockingWrite,
numEventsInWaitList, eventWaitList, event);
}
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
this->getDevice());
auto &builder = BuiltInDispatchBuilderOp::getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
this->getDevice());
BuiltInOwnershipWrapper lock(builder, this->context);