Delete Device::getBuiltIns()

Change-Id: I9d1968dfb2ba4a56020fd17152119add726106e1
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-08-22 13:57:21 +02:00
committed by sys_ocldev
parent 7504536d5d
commit b91c14f70e
65 changed files with 148 additions and 154 deletions

View File

@@ -1254,7 +1254,7 @@ cl_program CL_API_CALL clCreateProgramWithBuiltInKernels(cl_context context,
auto pDev = castToObject<Device>(*deviceList);
validateObject(pDev);
program = pDev->getBuiltIns().createBuiltInProgram(
program = pDev->getExecutionEnvironment()->getBuiltIns()->createBuiltInProgram(
*pContext,
*pDev,
kernelNames,

View File

@@ -65,7 +65,7 @@ SchedulerKernel &BuiltIns::getSchedulerKernel(Context &context) {
auto initializeSchedulerProgramAndKernel = [&] {
cl_int retVal = CL_SUCCESS;
auto src = context.getDevice(0)->getBuiltIns().builtinsLib->getBuiltinCode(EBuiltInOps::Scheduler, BuiltinCode::ECodeType::Any, *context.getDevice(0));
auto src = context.getDevice(0)->getExecutionEnvironment()->getBuiltIns()->builtinsLib->getBuiltinCode(EBuiltInOps::Scheduler, BuiltinCode::ECodeType::Any, *context.getDevice(0));
auto program = Program::createFromGenBinary(*context.getDevice(0)->getExecutionEnvironment(),
&context,
@@ -190,11 +190,11 @@ Program *BuiltIns::createBuiltInProgram(
if (pBuiltInProgram) {
std::unordered_map<std::string, BuiltinDispatchInfoBuilder *> builtinsBuilders;
builtinsBuilders["block_motion_estimate_intel"] =
&device.getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockMotionEstimateIntel, context, device);
&device.getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockMotionEstimateIntel, context, device);
builtinsBuilders["block_advanced_motion_estimate_check_intel"] =
&device.getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateCheckIntel, context, device);
&device.getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateCheckIntel, context, device);
builtinsBuilders["block_advanced_motion_estimate_bidirectional_check_intel"] =
&device.getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateBidirectionalCheckIntel, context, device);
&device.getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateBidirectionalCheckIntel, context, device);
const cl_device_id clDevice = &device;
errcodeRet = pBuiltInProgram->build(
clDevice,

View File

@@ -596,7 +596,7 @@ void CommandQueue::releaseIndirectHeap(IndirectHeap::Type heapType) {
void CommandQueue::dispatchAuxTranslation(MultiDispatchInfo &multiDispatchInfo, BuffersForAuxTranslation &buffersForAuxTranslation,
AuxTranslationDirection auxTranslationDirection) {
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getContext(), getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getContext(), getDevice());
BuiltinDispatchInfoBuilder::BuiltinOpParams dispatchParams;
dispatchParams.buffersForAuxTranslation = &buffersForAuxTranslation;

View File

@@ -86,7 +86,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface *(&surfaces)[surfaceCount
} else {
BuffersForAuxTranslation buffersForAuxTranslation;
if (kernel->isAuxTranslationRequired()) {
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getContext(), getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getContext(), getDevice());
builtInLock.takeOwnership(builder, this->context);
kernel->fillWithBuffersForAuxTranslation(buffersForAuxTranslation);
dispatchAuxTranslation(multiDispatchInfo, buffersForAuxTranslation, AuxTranslationDirection::AuxToNonAux);
@@ -122,7 +122,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface *(&surfaces)[surfaceCount
template <typename GfxFamily>
void CommandQueueHw<GfxFamily>::forceDispatchScheduler(OCLRT::MultiDispatchInfo &multiDispatchInfo) {
BuiltIns &builtIns = getDevice().getBuiltIns();
BuiltIns &builtIns = *getDevice().getExecutionEnvironment()->getBuiltIns();
SchedulerKernel &scheduler = builtIns.getSchedulerKernel(this->getContext());
DispatchInfo dispatchInfo(&scheduler, 1, Vec3<size_t>(scheduler.getGws(), 1, 1), Vec3<size_t>(scheduler.getLws(), 1, 1), Vec3<size_t>(0, 0, 0));
@@ -299,7 +299,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
taskCount,
hwTimeStamps);
BuiltIns &builtIns = getDevice().getBuiltIns();
BuiltIns &builtIns = *getDevice().getExecutionEnvironment()->getBuiltIns();
SchedulerKernel &scheduler = builtIns.getSchedulerKernel(this->getContext());
scheduler.setArgs(devQueueHw->getQueueBuffer(),

View File

@@ -46,8 +46,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyBuffer(
MultiDispatchInfo dispatchInfo;
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;

View File

@@ -48,8 +48,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyBufferRect(
MultiDispatchInfo dispatchInfo;
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
MemObjSurface srcBufferSurf(srcBuffer);

View File

@@ -48,8 +48,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyBufferToImage(
MultiDispatchInfo di;
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
MemObjSurface srcBufferSurf(srcBuffer);

View File

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

View File

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

View File

@@ -61,8 +61,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueFillBuffer(
MultiDispatchInfo dispatchInfo;
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);

View File

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

View File

@@ -92,8 +92,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBuffer(
return CL_SUCCESS;
}
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
void *dstPtr = ptr;

View File

@@ -77,8 +77,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBufferRect(
return CL_SUCCESS;
}
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
size_t hostPtrSize = Buffer::calculateHostPtrSize(hostOrigin, region, hostRowPitch, hostSlicePitch);

View File

@@ -79,8 +79,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadImage(
return CL_SUCCESS;
}
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImage3dToBuffer,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImage3dToBuffer,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);

View File

@@ -191,8 +191,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMemcpy(cl_bool blockingCopy,
MultiDispatchInfo dispatchInfo;
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
@@ -259,8 +259,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMemFill(void *svmPtr,
MultiDispatchInfo dispatchInfo;
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);

View File

@@ -92,8 +92,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteBuffer(
return CL_SUCCESS;
}
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);

View File

@@ -76,8 +76,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteBufferRect(
return CL_SUCCESS;
}
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper builtInLock(builder, this->context);
size_t hostPtrSize = Buffer::calculateHostPtrSize(hostOrigin, region, hostRowPitch, hostSlicePitch);

View File

@@ -76,8 +76,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteImage(
return CL_SUCCESS;
}
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
this->getContext(), this->getDevice());
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
this->getContext(), this->getDevice());
BuiltInOwnershipWrapper lock(builder, this->context);

View File

@@ -236,7 +236,7 @@ LinearStream &getCommandStream(CommandQueue &commandQueue, bool reserveProfiling
expectedSizeCS += EnqueueOperation<GfxFamily>::getSizeRequiredCS(eventType, reserveProfilingCmdsSpace, reservePerfCounterCmdsSpace, commandQueue, dispatchInfo.getKernel());
}
if (parentKernel) {
SchedulerKernel &scheduler = commandQueue.getDevice().getBuiltIns().getSchedulerKernel(parentKernel->getContext());
SchedulerKernel &scheduler = commandQueue.getDevice().getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(parentKernel->getContext());
expectedSizeCS += EnqueueOperation<GfxFamily>::getSizeRequiredCS(eventType, reserveProfilingCmdsSpace, reservePerfCounterCmdsSpace, commandQueue, &scheduler);
}
return commandQueue.getCS(expectedSizeCS);

View File

@@ -366,7 +366,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
if (dispatchFlags.preemptionMode == PreemptionMode::MidThread || device.isSourceLevelDebuggerActive()) {
auto sipType = SipKernel::getSipKernelType(device.getHardwareInfo().pPlatform->eRenderCoreFamily, device.isSourceLevelDebuggerActive());
makeResident(*device.getBuiltIns().getSipKernel(sipType, device).getSipAllocation());
makeResident(*device.getExecutionEnvironment()->getBuiltIns()->getSipKernel(sipType, device).getSipAllocation());
}
if (experimentalCmdBuffer.get() != nullptr) {

View File

@@ -90,7 +90,7 @@ void PreemptionHelper::programPreamble(LinearStream &preambleCmdStream, Device &
auto sip = reinterpret_cast<STATE_SIP *>(preambleCmdStream.getSpace(sizeof(STATE_SIP)));
sip->init();
auto sipType = SipKernel::getSipKernelType(device.getHardwareInfo().pPlatform->eRenderCoreFamily, sourceLevelDebuggerActive);
sip->setSystemInstructionPointer(device.getBuiltIns().getSipKernel(sipType, device).getSipAllocation()->getGpuAddressToPatch());
sip->setSystemInstructionPointer(device.getExecutionEnvironment()->getBuiltIns()->getSipKernel(sipType, device).getSipAllocation()->getGpuAddressToPatch());
}
}

View File

@@ -85,8 +85,6 @@ class Device : public BaseObject<_cl_device_id> {
deviceInfo.force32BitAddressess = value;
}
BuiltIns &getBuiltIns() const;
CommandStreamReceiver &getCommandStreamReceiver();
CommandStreamReceiver *peekCommandStreamReceiver();
@@ -202,8 +200,4 @@ inline GmmHelper *Device::getGmmHelper() const {
return executionEnvironment->getGmmHelper();
}
inline BuiltIns &Device::getBuiltIns() const {
return *executionEnvironment->getBuiltIns();
}
} // namespace OCLRT

View File

@@ -26,7 +26,7 @@
namespace OCLRT {
const SipKernel &initSipKernel(SipKernelType type, Device &device) {
return device.getBuiltIns().getSipKernel(type, device);
return device.getExecutionEnvironment()->getBuiltIns()->getSipKernel(type, device);
}
Program *createProgramForSip(ExecutionEnvironment &executionEnvironment,
Context *context,

View File

@@ -145,7 +145,7 @@ struct KernelCommandsHelper : public PerThreadDataHelper {
}
if (heapType == IndirectHeap::INDIRECT_OBJECT || heapType == IndirectHeap::SURFACE_STATE) {
BuiltIns &builtIns = kernel.getDevice().getBuiltIns();
BuiltIns &builtIns = *kernel.getDevice().getExecutionEnvironment()->getBuiltIns();
SchedulerKernel &scheduler = builtIns.getSchedulerKernel(kernel.getContext());
if (heapType == IndirectHeap::INDIRECT_OBJECT) {

View File

@@ -182,7 +182,7 @@ CompletionStamp &CommandComputeKernel::submit(uint32_t taskLevel, bool terminate
uint32_t taskCount = commandStreamReceiver.peekTaskCount() + 1;
devQueue->setupExecutionModelDispatch(*ssh, *dsh, kernel, kernelCount, taskCount, timestamp);
BuiltIns &builtIns = this->kernel->getDevice().getBuiltIns();
BuiltIns &builtIns = *this->kernel->getDevice().getExecutionEnvironment()->getBuiltIns();
SchedulerKernel &scheduler = builtIns.getSchedulerKernel(commandQueue.getContext());
scheduler.setArgs(devQueue->getQueueBuffer(),

View File

@@ -162,7 +162,7 @@ TEST_F(clCreateProgramWithBuiltInKernelsTests, vmeBlockMotionEstimateKernelHasCo
auto pDev = castToObject<Device>(*devices);
overwriteBuiltInBinaryName(pDev, "media_kernels_backend");
pDev->getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockMotionEstimateIntel, *pContext, *pDev);
pDev->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockMotionEstimateIntel, *pContext, *pDev);
restoreBuiltInBinaryName(pDev);
overwriteBuiltInBinaryName(pDev, "media_kernels_frontend");
@@ -188,7 +188,7 @@ TEST_F(clCreateProgramWithBuiltInKernelsTests, vmeBlockMotionEstimateKernelHasCo
EXPECT_EQ(6U, kernNeo->getKernelArgsNumber());
auto ctxNeo = castToObject<Context>(pContext);
auto &vmeBuilder = pDev->getBuiltIns().getBuiltinDispatchInfoBuilder(OCLRT::EBuiltInOps::VmeBlockMotionEstimateIntel, *ctxNeo, *ctxNeo->getDevice(0));
auto &vmeBuilder = pDev->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(OCLRT::EBuiltInOps::VmeBlockMotionEstimateIntel, *ctxNeo, *ctxNeo->getDevice(0));
EXPECT_EQ(&vmeBuilder, kernNeo->getKernelInfo().builtinDispatchBuilder);
clReleaseKernel(kernel);
@@ -203,7 +203,7 @@ TEST_F(clCreateProgramWithBuiltInKernelsTests, vmeBlockAdvancedMotionEstimateChe
auto pDev = castToObject<Device>(*devices);
overwriteBuiltInBinaryName(pDev, "media_kernels_backend");
pDev->getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateCheckIntel, *pContext, *pDev);
pDev->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateCheckIntel, *pContext, *pDev);
restoreBuiltInBinaryName(pDev);
overwriteBuiltInBinaryName(pDev, "media_kernels_frontend");
@@ -229,7 +229,7 @@ TEST_F(clCreateProgramWithBuiltInKernelsTests, vmeBlockAdvancedMotionEstimateChe
EXPECT_EQ(15U, kernNeo->getKernelArgsNumber());
auto ctxNeo = castToObject<Context>(pContext);
auto &vmeBuilder = pDev->getBuiltIns().getBuiltinDispatchInfoBuilder(OCLRT::EBuiltInOps::VmeBlockAdvancedMotionEstimateCheckIntel, *ctxNeo, *ctxNeo->getDevice(0));
auto &vmeBuilder = pDev->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(OCLRT::EBuiltInOps::VmeBlockAdvancedMotionEstimateCheckIntel, *ctxNeo, *ctxNeo->getDevice(0));
EXPECT_EQ(&vmeBuilder, kernNeo->getKernelInfo().builtinDispatchBuilder);
clReleaseKernel(kernel);
@@ -244,7 +244,7 @@ TEST_F(clCreateProgramWithBuiltInKernelsTests, vmeBlockAdvancedMotionEstimateBid
auto pDev = castToObject<Device>(*devices);
overwriteBuiltInBinaryName(pDev, "media_kernels_backend");
pDev->getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateBidirectionalCheckIntel, *pContext, *pDev);
pDev->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateBidirectionalCheckIntel, *pContext, *pDev);
restoreBuiltInBinaryName(pDev);
overwriteBuiltInBinaryName(pDev, "media_kernels_frontend");
@@ -270,7 +270,7 @@ TEST_F(clCreateProgramWithBuiltInKernelsTests, vmeBlockAdvancedMotionEstimateBid
EXPECT_EQ(20U, kernNeo->getKernelArgsNumber());
auto ctxNeo = castToObject<Context>(pContext);
auto &vmeBuilder = pDev->getBuiltIns().getBuiltinDispatchInfoBuilder(OCLRT::EBuiltInOps::VmeBlockAdvancedMotionEstimateBidirectionalCheckIntel, *ctxNeo, *ctxNeo->getDevice(0));
auto &vmeBuilder = pDev->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(OCLRT::EBuiltInOps::VmeBlockAdvancedMotionEstimateBidirectionalCheckIntel, *ctxNeo, *ctxNeo->getDevice(0));
EXPECT_EQ(&vmeBuilder, kernNeo->getKernelInfo().builtinDispatchBuilder);
clReleaseKernel(kernel);

View File

@@ -46,7 +46,7 @@ GEN10TEST_F(GEN10AUBParentKernelFixture, DISABLED_EnqueueParentKernel) {
properties[0],
retVal);
auto &builtIns = pDevice->getBuiltIns();
auto &builtIns = *pDevice->getExecutionEnvironment()->getBuiltIns();
SchedulerKernel &scheduler = builtIns.getSchedulerKernel(pCmdQ->getContext());
// Aub execution takes huge time for bigger GWS
scheduler.setGws(24);

View File

@@ -47,7 +47,7 @@ GEN8TEST_F(GEN8AUBParentKernelFixture, EnqueueParentKernel) {
properties[0],
retVal));
auto &builtIns = pDevice->getBuiltIns();
auto &builtIns = *pDevice->getExecutionEnvironment()->getBuiltIns();
SchedulerKernel &scheduler = builtIns.getSchedulerKernel(pCmdQ->getContext());
// Aub execution takes huge time for bigger GWS
scheduler.setGws(24);

View File

@@ -44,7 +44,7 @@ GEN9TEST_F(AUBParentKernelFixture, EnqueueParentKernel) {
properties[0],
retVal);
BuiltIns &builtIns = pDevice->getBuiltIns();
BuiltIns &builtIns = *pDevice->getExecutionEnvironment()->getBuiltIns();
SchedulerKernel &scheduler = builtIns.getSchedulerKernel(pCmdQ->getContext());
// Aub execution takes huge time for bigger GWS
scheduler.setGws(24);

View File

@@ -655,7 +655,7 @@ HWTEST_F(BuiltInTests, getSchedulerKernelForSecondTimeDoesNotCreateNewKernel) {
}
TEST_F(BuiltInTests, BuiltinDispatchInfoBuilderReturnFalseIfUnsupportedBuildType) {
auto &bs = pDevice->getBuiltIns();
auto &bs = *pDevice->getExecutionEnvironment()->getBuiltIns();
BuiltinDispatchInfoBuilder bdib{bs};
MultiDispatchInfo multiDispatchInfo;
BuiltinDispatchInfoBuilder::BuiltinOpParams params;
@@ -670,14 +670,14 @@ TEST_F(BuiltInTests, BuiltinDispatchInfoBuilderReturnFalseIfUnsupportedBuildType
}
TEST_F(BuiltInTests, GeivenDefaultBuiltinDispatchInfoBuilderWhendValidateDispatchIsCalledThenClSuccessIsReturned) {
auto &bs = pDevice->getBuiltIns();
auto &bs = *pDevice->getExecutionEnvironment()->getBuiltIns();
BuiltinDispatchInfoBuilder bdib{bs};
auto ret = bdib.validateDispatch(nullptr, 1, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
EXPECT_EQ(CL_SUCCESS, ret);
}
TEST_F(BuiltInTests, BuiltinDispatchInfoBuilderReturnTrueIfExplicitKernelArgNotTakenCareOfInBuiltinDispatchBInfoBuilder) {
auto &bs = pDevice->getBuiltIns();
auto &bs = *pDevice->getExecutionEnvironment()->getBuiltIns();
BuiltinDispatchInfoBuilder bdib{bs};
MultiDispatchInfo multiDispatchInfo;
BuiltinDispatchInfoBuilder::BuiltinOpParams params;
@@ -1701,7 +1701,7 @@ TEST_F(BuiltInTests, createBuiltInProgramForInvalidBuiltinKernelName) {
const char *kernelNames = "invalid_kernel";
cl_int retVal = CL_SUCCESS;
cl_program program = pDevice->getBuiltIns().createBuiltInProgram(
cl_program program = pDevice->getExecutionEnvironment()->getBuiltIns()->createBuiltInProgram(
*pContext,
*pDevice,
kernelNames,
@@ -1738,7 +1738,7 @@ TEST_F(BuiltInTests, getSipKernelReturnsProgramCreatedOutOfIsaAcquiredFromCompil
}
TEST_F(BuiltInTests, givenSipKernelWhenItIsCreatedThenItHasGraphicsAllocationForKernel) {
const SipKernel &sipKern = pDevice->getBuiltIns().getSipKernel(SipKernelType::Csr, *pContext->getDevice(0));
const SipKernel &sipKern = pDevice->getExecutionEnvironment()->getBuiltIns()->getSipKernel(SipKernelType::Csr, *pContext->getDevice(0));
auto sipAllocation = sipKern.getSipAllocation();
EXPECT_NE(nullptr, sipAllocation);
}

View File

@@ -150,7 +150,7 @@ TEST(DebugSip, DISABLED_givenBuiltInsWhenDbgCsrSipIsRequestedThanCorrectSipKerne
igcDebugVars.fileName = builtInGenFile;
gEnvironment->igcPushDebugVars(igcDebugVars);
auto &builtins = mockDevice->getBuiltIns();
auto &builtins = *mockDevice->getExecutionEnvironment()->getBuiltIns();
auto &sipKernel = builtins.getSipKernel(SipKernelType::DbgCsr, *mockDevice);
EXPECT_NE(nullptr, &sipKernel);

View File

@@ -762,7 +762,7 @@ HWTEST_F(CommandQueueHwTest, GivenBuiltinKernelWhenBuiltinDispatchInfoBuilderIsP
CommandQueueHw<FamilyType> *cmdQHw = static_cast<CommandQueueHw<FamilyType> *>(this->pCmdQ);
MockKernelWithInternals mockKernelToUse(*pDevice);
MockBuilder builder(pDevice->getBuiltIns());
MockBuilder builder(*pDevice->getExecutionEnvironment()->getBuiltIns());
builder.paramsToUse.gws.x = 11;
builder.paramsToUse.elws.x = 13;
builder.paramsToUse.offset.x = 17;

View File

@@ -171,8 +171,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueCopyBufferRectTest, 2D_addsIndirectData) {
// Extract the kernel used
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;

View File

@@ -145,8 +145,8 @@ HWTEST_F(EnqueueCopyBufferTest, addsIndirectData) {
enqueueCopyBuffer();
MultiDispatchInfo multiDispatchInfo;
auto &builder = pDevice->getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pDevice->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -238,8 +238,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueCopyBufferTest, argumentZeroShouldMatchSource
// Extract the kernel used
MultiDispatchInfo multiDispatchInfo;
auto &builder = pDevice->getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pDevice->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -265,8 +265,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueCopyBufferTest, argumentOneShouldMatchDestAdd
// Extract the kernel used
MultiDispatchInfo multiDispatchInfo;
auto &builder = pDevice->getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pDevice->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;

View File

@@ -202,7 +202,7 @@ typedef EnqueueCopyBufferToImageMipMapTest MipMapCopyBufferToImageTest;
HWTEST_P(MipMapCopyBufferToImageTest, GivenImageWithMipLevelNonZeroWhenCopyBufferToImageIsCalledThenProperMipLevelIsSet) {
auto image_type = (cl_mem_object_type)GetParam();
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &origBuilder = builtIns.getBuiltinDispatchInfoBuilder(
EBuiltInOps::CopyBufferToImage3d,
pCmdQ->getContext(),

View File

@@ -212,7 +212,7 @@ typedef EnqueueCopyImageMipMapTest MipMapCopyImageTest;
HWTEST_P(MipMapCopyImageTest, GivenImagesWithNonZeroMipLevelsWhenCopyImageIsCalledThenProperMipLevelsAreSet) {
cl_mem_object_type srcImageType, dstImageType;
std::tie(srcImageType, dstImageType) = GetParam();
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &origBuilder = builtIns.getBuiltinDispatchInfoBuilder(
EBuiltInOps::CopyImageToImage3d,
pCmdQ->getContext(),

View File

@@ -203,7 +203,7 @@ typedef EnqueueCopyImageToBufferMipMapTest MipMapCopyImageToBufferTest;
HWTEST_P(MipMapCopyImageToBufferTest, GivenImageWithMipLevelNonZeroWhenCopyImageToBufferIsCalledThenProperMipLevelIsSet) {
auto image_type = (cl_mem_object_type)GetParam();
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &origBuilder = builtIns.getBuiltinDispatchInfoBuilder(
EBuiltInOps::CopyImage3dToBuffer,
pCmdQ->getContext(),

View File

@@ -106,7 +106,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, addsIndirectData) {
EnqueueFillBufferHelper<>::enqueueFillBuffer(pCmdQ, buffer);
MultiDispatchInfo multiDispatchInfo;
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &builder = builtIns.getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
@@ -138,7 +138,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, FillBufferRightLeftover) {
EnqueueFillBufferHelper<>::enqueueFillBuffer(pCmdQ, buffer);
MultiDispatchInfo mdi;
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &builder = builtIns.getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
@@ -165,7 +165,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, FillBufferMiddle) {
EnqueueFillBufferHelper<>::enqueueFillBuffer(pCmdQ, buffer);
MultiDispatchInfo mdi;
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &builder = builtIns.getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
@@ -192,7 +192,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, FillBufferLeftLeftover) {
EnqueueFillBufferHelper<>::enqueueFillBuffer(pCmdQ, buffer);
MultiDispatchInfo mdi;
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &builder = builtIns.getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
@@ -285,7 +285,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueFillBufferCmdTests, argumentZeroShouldMatchDe
// Extract the kernel used
MultiDispatchInfo multiDispatchInfo;
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &builder = builtIns.getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
@@ -321,7 +321,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueFillBufferCmdTests, DISABLED_argumentOneShoul
// Extract the kernel used
MultiDispatchInfo multiDispatchInfo;
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &builder = builtIns.getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
@@ -354,7 +354,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueFillBufferCmdTests, argumentTwoShouldMatchPat
// Extract the kernel used
MultiDispatchInfo multiDispatchInfo;
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &builder = builtIns.getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);

View File

@@ -903,7 +903,7 @@ TEST_F(EnqueueKernelTest, GivenKernelWithBuiltinDispatchInfoBuilderWhenBeingDisp
mutable bool wasValidateDispatchCalled = false;
};
MockBuiltinDispatchBuilder mockNuiltinDispatchBuilder(pCmdQ->getDevice().getBuiltIns());
MockBuiltinDispatchBuilder mockNuiltinDispatchBuilder(*pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns());
MockKernelWithInternals mockKernel(*pDevice);
mockKernel.kernelInfo.builtinDispatchBuilder = &mockNuiltinDispatchBuilder;

View File

@@ -183,8 +183,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueReadBufferRectTest, 2D_addsIndirectData) {
// Extract the kernel used
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;

View File

@@ -149,8 +149,8 @@ HWTEST_F(EnqueueReadBufferTypeTest, addsIndirectData) {
EnqueueReadBufferHelper<>::enqueueReadBuffer(pCmdQ, srcBuffer.get(), CL_TRUE);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;

View File

@@ -536,7 +536,7 @@ HWTEST_F(EnqueueReadImageTest, GivenNonZeroCopyImage2DAndImageShareTheSameStorag
typedef EnqueueReadImageMipMapTest MipMapReadImageTest;
HWTEST_P(MipMapReadImageTest, GivenImageWithMipLevelNonZeroWhenReadImageIsCalledThenProperMipLevelIsSet) {
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto image_type = (cl_mem_object_type)GetParam();
auto &origBuilder = builtIns.getBuiltinDispatchInfoBuilder(

View File

@@ -64,7 +64,7 @@ struct EnqueueSvmMemCopyTest : public DeviceFixture,
};
HWTEST_F(EnqueueSvmMemCopyTest, givenEnqueueSVMMemcpyWhenUsingCopyBufferToBufferBuilderThenItConfiguredWithBuiltinOpsAndProducesDispatchInfo) {
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
// retrieve original builder
auto &origBuilder = builtIns.getBuiltinDispatchInfoBuilder(

View File

@@ -76,7 +76,7 @@ HWTEST_P(EnqueueSvmMemFillTest, givenEnqueueSVMMemFillWhenUsingFillBufferBuilder
size_t patternSize;
};
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
// retrieve original builder
auto &origBuilder = builtIns.getBuiltinDispatchInfoBuilder(

View File

@@ -157,8 +157,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueWriteBufferRectTest, 2D_addsIndirectData) {
enqueueWriteBufferRect2D<FamilyType>();
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;

View File

@@ -148,8 +148,8 @@ HWTEST_F(EnqueueWriteBufferTypeTest, addsIndirectData) {
EnqueueWriteBufferHelper<>::enqueueWriteBuffer(pCmdQ, srcBuffer.get(), EnqueueWriteBufferTraits::blocking);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;

View File

@@ -523,7 +523,7 @@ typedef EnqueueWriteImageMipMapTest MipMapWriteImageTest;
HWTEST_P(MipMapWriteImageTest, GivenImageWithMipLevelNonZeroWhenReadImageIsCalledThenProperMipLevelIsSet) {
auto image_type = (cl_mem_object_type)GetParam();
auto &builtIns = pCmdQ->getDevice().getBuiltIns();
auto &builtIns = *pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns();
auto &origBuilder = builtIns.getBuiltinDispatchInfoBuilder(
EBuiltInOps::CopyBufferToImage3d,
pCmdQ->getContext(),

View File

@@ -91,8 +91,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, GetSizeRequiredBufferTest, enqueueFillBuffer) {
EXPECT_EQ(CL_SUCCESS, retVal);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -143,8 +143,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, GetSizeRequiredBufferTest, enqueueCopyBuffer) {
EXPECT_EQ(CL_SUCCESS, retVal);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -196,8 +196,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, GetSizeRequiredBufferTest, enqueueReadBufferNonBlock
CL_FALSE);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -249,8 +249,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, GetSizeRequiredBufferTest, enqueueReadBufferBlocking
CL_TRUE);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -302,8 +302,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, GetSizeRequiredBufferTest, enqueueWriteBufferNonBloc
EXPECT_EQ(CL_SUCCESS, retVal);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -352,8 +352,8 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueWriteBufferBlocking) {
EXPECT_EQ(CL_SUCCESS, retVal);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;

View File

@@ -82,8 +82,8 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueCopyImage) {
EXPECT_EQ(CL_SUCCESS, retVal);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -185,8 +185,8 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueReadImageNonBlocking) {
EXPECT_EQ(CL_SUCCESS, retVal);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImage3dToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImage3dToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -239,8 +239,8 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueReadImageBlocking) {
EXPECT_EQ(CL_SUCCESS, retVal);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImage3dToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImage3dToBuffer,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -293,8 +293,8 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueWriteImageNonBlocking) {
EXPECT_EQ(CL_SUCCESS, retVal);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -347,8 +347,8 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueWriteImageBlocking) {
EXPECT_EQ(CL_SUCCESS, retVal);
MultiDispatchInfo multiDispatchInfo;
auto &builder = pCmdQ->getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
pCmdQ->getContext(), pCmdQ->getDevice());
auto &builder = pCmdQ->getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
pCmdQ->getContext(), pCmdQ->getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;

View File

@@ -203,7 +203,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndMidThread
*pDevice);
auto cmdBuffer = mockedSubmissionsAggregator->peekCommandBuffers().peekHead();
auto sipAllocation = pDevice->getBuiltIns().getSipKernel(SipKernelType::Csr, *pDevice).getSipAllocation();
auto sipAllocation = pDevice->getExecutionEnvironment()->getBuiltIns()->getSipKernel(SipKernelType::Csr, *pDevice).getSipAllocation();
bool found = false;
for (auto allocation : cmdBuffer->surfaces) {
if (allocation == sipAllocation) {
@@ -233,7 +233,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInDefaultModeAndMidThreadP
dispatchFlags,
*pDevice);
auto sipAllocation = pDevice->getBuiltIns().getSipKernel(SipKernelType::Csr, *pDevice).getSipAllocation();
auto sipAllocation = pDevice->getExecutionEnvironment()->getBuiltIns()->getSipKernel(SipKernelType::Csr, *pDevice).getSipAllocation();
bool found = false;
for (auto allocation : mockCsr->copyOfAllocations) {
if (allocation == sipAllocation) {

View File

@@ -249,7 +249,7 @@ TEST(Device_GetCaps, givenDeviceWithMidThreadPreemptionWhenDeviceIsCreatedThenSi
auto executionEnvironment = new ExecutionEnvironment();
executionEnvironment->builtins.reset(builtIns);
auto device = std::unique_ptr<Device>(MockDevice::createWithExecutionEnvironment<MockDevice>(platformDevices[0], executionEnvironment));
ASSERT_EQ(builtIns, &device->getBuiltIns());
ASSERT_EQ(builtIns, device->getExecutionEnvironment()->getBuiltIns());
EXPECT_TRUE(builtIns->getSipKernelCalled);
}
}

View File

@@ -223,7 +223,7 @@ HWTEST_F(ParentKernelCommandStreamFixture, GivenDispatchInfoWithParentKernelWhen
size_t rest = MemoryConstants::pageSize - (numOfKernels * size);
SchedulerKernel &scheduler = device->getBuiltIns().getSchedulerKernel(*mockParentKernel->getContext());
SchedulerKernel &scheduler = device->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*mockParentKernel->getContext());
size_t schedulerSize = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, false, false, *pCmdQ, &scheduler);
while (rest >= schedulerSize) {

View File

@@ -59,7 +59,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchScheduler) {
if (pDevice->getSupportedClVersion() >= 20) {
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
SchedulerKernel &scheduler = pDevice->getBuiltIns().getSchedulerKernel(*context);
SchedulerKernel &scheduler = pDevice->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
auto *executionModelDshAllocation = pDevQueueHw->getDshBuffer();
auto *dshHeap = pDevQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
@@ -183,7 +183,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchSchedulerDoe
if (pDevice->getSupportedClVersion() >= 20) {
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
SchedulerKernel &scheduler = pDevice->getBuiltIns().getSchedulerKernel(*context);
SchedulerKernel &scheduler = pDevice->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
size_t minRequiredSizeForSchedulerSSH = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
// Setup heaps in pCmdQ
@@ -216,7 +216,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, dispatchSchedulerWi
ASSERT_NE(nullptr, igilQueue);
igilQueue->m_controls.m_SchedulerEarlyReturn = 1;
SchedulerKernel &scheduler = device->getBuiltIns().getSchedulerKernel(*context);
SchedulerKernel &scheduler = device->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
size_t minRequiredSizeForSchedulerSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(scheduler);
// Setup heaps in pCmdQ

View File

@@ -34,7 +34,7 @@ BuiltInFixture::BuiltInFixture() : pBuiltIns(nullptr) {
void BuiltInFixture::SetUp(Device *pDevice) {
// create an instance of the builtins
pBuiltIns = &pDevice->getBuiltIns();
pBuiltIns = pDevice->getExecutionEnvironment()->getBuiltIns();
pBuiltIns->setCacheingEnableState(false);
// set mock compiler to return expected kernel...

View File

@@ -101,7 +101,7 @@ GEN10TEST_F(Gen10PreemptionTests, whenMidThreadPreemptionIsAvailableThenPrograms
auto stateSipCmd = hwParsePreamble.getCommand<STATE_SIP>();
ASSERT_NE(nullptr, stateSipCmd);
EXPECT_EQ(device->getBuiltIns().getSipKernel(SipKernelType::Csr, *device).getSipAllocation()->getGpuAddressToPatch(), stateSipCmd->getSystemInstructionPointer());
EXPECT_EQ(device->getExecutionEnvironment()->getBuiltIns()->getSipKernel(SipKernelType::Csr, *device).getSipAllocation()->getGpuAddressToPatch(), stateSipCmd->getSystemInstructionPointer());
}
GEN10TEST_F(Gen10ThreadGroupPreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreemptionRequestThenDontReprogram) {

View File

@@ -43,7 +43,7 @@ BDWTEST_F(BdwSchedulerTest, givenCallToDispatchSchedulerWhenPipeControlWithCSSta
if (pDevice->getSupportedClVersion() >= 20) {
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
SchedulerKernel &scheduler = pDevice->getBuiltIns().getSchedulerKernel(*context);
SchedulerKernel &scheduler = pDevice->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
size_t minRequiredSizeForSchedulerSSH = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);

View File

@@ -62,7 +62,7 @@ GEN9TEST_F(UltCommandStreamReceiverTest, givenNotSentPreambleAndMidThreadPreempt
StackVec<char, 4096> preemptionBuffer;
preemptionBuffer.resize(cmdSizePreambleMidThread);
LinearStream preambleStream(&*preemptionBuffer.begin(), preemptionBuffer.size());
auto sipAllocation = pDevice->getBuiltIns().getSipKernel(SipKernelType::Csr, *pDevice).getSipAllocation();
auto sipAllocation = pDevice->getExecutionEnvironment()->getBuiltIns()->getSipKernel(SipKernelType::Csr, *pDevice).getSipAllocation();
commandStreamReceiver.programPreamble(preambleStream, *pDevice, dispatchFlags, newL3Config);
this->parseCommands<FamilyType>(preambleStream);
@@ -76,7 +76,7 @@ GEN9TEST_F(UltCommandStreamReceiverTest, givenNotSentPreambleAndMidThreadPreempt
GEN9TEST_F(UltCommandStreamReceiverTest, givenNotSentPreambleAndKernelDebuggingActiveWhenPreambleIsProgrammedThenCorrectSipKernelGpuAddressIsProgrammed) {
using STATE_SIP = typename FamilyType::STATE_SIP;
auto &builtIns = pDevice->getBuiltIns();
auto &builtIns = *pDevice->getExecutionEnvironment()->getBuiltIns();
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
commandStreamReceiver.isPreambleSent = false;
size_t minCsrSize = pDevice->getHardwareInfo().pSysInfo->CsrSizeInMb * MemoryConstants::megaByte;

View File

@@ -49,7 +49,7 @@ GEN9TEST_F(gen9SipTests, DISABLED_givenDebugCsrSipKernelWithLocalMemoryWhenAsked
igcDebugVars.fileName = builtInGenFile;
gEnvironment->igcPushDebugVars(igcDebugVars);
auto &builtins = mockDevice->getBuiltIns();
auto &builtins = *mockDevice->getExecutionEnvironment()->getBuiltIns();
auto &sipKernel = builtins.getSipKernel(SipKernelType::DbgCsrLocal, *mockDevice);
EXPECT_NE(nullptr, &sipKernel);

View File

@@ -101,7 +101,7 @@ GEN9TEST_F(Gen9PreemptionTests, whenMidThreadPreemptionIsAvailableThenProgramsPr
auto stateSipCmd = hwParsePreamble.getCommand<STATE_SIP>();
ASSERT_NE(nullptr, stateSipCmd);
EXPECT_EQ(device->getBuiltIns().getSipKernel(SipKernelType::Csr, *device).getSipAllocation()->getGpuAddressToPatch(), stateSipCmd->getSystemInstructionPointer());
EXPECT_EQ(device->getExecutionEnvironment()->getBuiltIns()->getSipKernel(SipKernelType::Csr, *device).getSipAllocation()->getGpuAddressToPatch(), stateSipCmd->getSystemInstructionPointer());
}
GEN9TEST_F(Gen9ThreadGroupPreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreemptionRequestThenDontReprogramThreadGroupNoWa) {

View File

@@ -33,7 +33,7 @@ const SipKernel &initSipKernel(SipKernelType type, Device &device) {
device.getExecutionEnvironment()->compilerInterface.reset(mockCompilerInterface);
mockCompilerInterface->sipKernelBinaryOverride = mockCompilerInterface->getDummyGenBinary();
return device.getBuiltIns().getSipKernel(type, device);
return device.getExecutionEnvironment()->getBuiltIns()->getSipKernel(type, device);
}
Program *createProgramForSip(ExecutionEnvironment &executionEnvironment,
Context *context,

View File

@@ -80,8 +80,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, programInterfaceDescriptorDataRe
ASSERT_NE(nullptr, dstImage.get());
MultiDispatchInfo multiDispatchInfo;
auto &builder = pDevice->getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
cmdQ.getContext(), cmdQ.getDevice());
auto &builder = pDevice->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
cmdQ.getContext(), cmdQ.getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -152,8 +152,8 @@ HWTEST_F(KernelCommandsTest, sendCrossThreadDataResourceUsage) {
ASSERT_NE(nullptr, dstImage.get());
MultiDispatchInfo multiDispatchInfo;
auto &builder = pDevice->getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
cmdQ.getContext(), cmdQ.getDevice());
auto &builder = pDevice->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
cmdQ.getContext(), cmdQ.getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -280,8 +280,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, sendIndirectStateResourceUsage)
ASSERT_NE(nullptr, dstImage.get());
MultiDispatchInfo multiDispatchInfo;
auto &builder = pDevice->getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
cmdQ.getContext(), cmdQ.getDevice());
auto &builder = pDevice->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
cmdQ.getContext(), cmdQ.getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -459,8 +459,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, whenSendingIndirectStateThenKern
std::unique_ptr<Image> img(Image2dHelper<>::create(pContext));
MultiDispatchInfo multiDispatchInfo;
auto &builder = cmdQ.getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
cmdQ.getContext(), cmdQ.getDevice());
auto &builder = cmdQ.getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
cmdQ.getContext(), cmdQ.getDevice());
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
dc.srcMemObj = img.get();
@@ -528,8 +528,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, usedBindingTableStatePointer) {
ASSERT_NE(nullptr, dstImage.get());
MultiDispatchInfo multiDispatchInfo;
auto &builder = pDevice->getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
cmdQ.getContext(), cmdQ.getDevice());
auto &builder = pDevice->getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
cmdQ.getContext(), cmdQ.getDevice());
ASSERT_NE(nullptr, &builder);
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;
@@ -1038,7 +1038,7 @@ HWTEST_P(ParentKernelCommandsFromBinaryTest, getSizeRequiredForExecutionModelFor
totalSize += maxBindingTableCount * sizeof(BINDING_TABLE_STATE) * DeviceQueue::interfaceDescriptorEntries;
BuiltIns &builtIns = pDevice->getBuiltIns();
BuiltIns &builtIns = *pDevice->getExecutionEnvironment()->getBuiltIns();
auto &scheduler = builtIns.getSchedulerKernel(*pContext);
auto schedulerSshSize = scheduler.getSurfaceStateHeapSize();
totalSize += schedulerSshSize + ((schedulerSshSize != 0) ? BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE : 0);
@@ -1055,7 +1055,7 @@ HWTEST_P(ParentKernelCommandsFromBinaryTest, getSizeRequiredForExecutionModelFor
if (std::string(pPlatform->getDevice(0)->getDeviceInfo().clVersion).find("OpenCL 2.") != std::string::npos) {
EXPECT_TRUE(pKernel->isParentKernel);
BuiltIns &builtIns = pDevice->getBuiltIns();
BuiltIns &builtIns = *pDevice->getExecutionEnvironment()->getBuiltIns();
auto &scheduler = builtIns.getSchedulerKernel(*pContext);
size_t totalSize = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(scheduler);

View File

@@ -2162,7 +2162,7 @@ TEST(KernelTest, setKernelArgUsesBuiltinDispatchInfoBuilderIfAvailable) {
kernel.kernelInfo.resizeKernelArgInfoAndRegisterParameter(1);
kernel.mockKernel->initialize();
MockBuiltinDispatchBuilder mockBuilder(device->getBuiltIns());
MockBuiltinDispatchBuilder mockBuilder(*device->getExecutionEnvironment()->getBuiltIns());
kernel.kernelInfo.builtinDispatchBuilder = &mockBuilder;
mockBuilder.valueToReturn = false;

View File

@@ -61,7 +61,7 @@ HWTEST_F(CommandStreamReceiverWithActiveDebuggerTest, givenCsrWithActiveDebugger
*device);
auto sipType = SipKernel::getSipKernelType(device->getHardwareInfo().pPlatform->eRenderCoreFamily, true);
auto sipAllocation = device->getBuiltIns().getSipKernel(sipType, *device.get()).getSipAllocation();
auto sipAllocation = device->getExecutionEnvironment()->getBuiltIns()->getSipKernel(sipType, *device.get()).getSipAllocation();
bool found = false;
for (auto allocation : mockCsr->copyOfAllocations) {
if (allocation == sipAllocation) {

View File

@@ -63,7 +63,7 @@ TEST(DeviceCreation, givenDeviceWithMidThreadPreemptionAndDebuggingActiveWhenDev
exeEnv->builtins.reset(builtIns);
auto device = std::unique_ptr<MockDevice>(MockDevice::create<MockDeviceWithDebuggerActive>(nullptr, exeEnv));
ASSERT_EQ(builtIns, &device->getBuiltIns());
ASSERT_EQ(builtIns, device->getExecutionEnvironment()->getBuiltIns());
EXPECT_TRUE(builtIns->getSipKernelCalled);
EXPECT_LE(SipKernelType::DbgCsr, builtIns->getSipKernelType);
}
@@ -82,7 +82,7 @@ TEST(DeviceCreation, givenDeviceWithDisabledPreemptionAndDebuggingActiveWhenDevi
exeEnv->builtins.reset(builtIns);
auto device = std::unique_ptr<MockDevice>(MockDevice::create<MockDeviceWithDebuggerActive>(nullptr, exeEnv));
ASSERT_EQ(builtIns, &device->getBuiltIns());
ASSERT_EQ(builtIns, device->getExecutionEnvironment()->getBuiltIns());
EXPECT_TRUE(builtIns->getSipKernelCalled);
EXPECT_LE(SipKernelType::DbgCsr, builtIns->getSipKernelType);
}

View File

@@ -48,7 +48,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenMidThreadPreemptionAndDebu
auto sipAddress = stateSipCmd->getSystemInstructionPointer();
auto sipType = SipKernel::getSipKernelType(mockDevice->getHardwareInfo().pPlatform->eRenderCoreFamily, mockDevice->isSourceLevelDebuggerActive());
EXPECT_EQ(mockDevice->getBuiltIns().getSipKernel(sipType, *mockDevice).getSipAllocation()->getGpuAddressToPatch(), sipAddress);
EXPECT_EQ(mockDevice->getExecutionEnvironment()->getBuiltIns()->getSipKernel(sipType, *mockDevice).getSipAllocation()->getGpuAddressToPatch(), sipAddress);
}
template <typename GfxFamily>
@@ -77,7 +77,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenMidThreadPreemptionAndDisa
auto sipAddress = stateSipCmd->getSystemInstructionPointer();
auto sipType = SipKernel::getSipKernelType(mockDevice->getHardwareInfo().pPlatform->eRenderCoreFamily, mockDevice->isSourceLevelDebuggerActive());
EXPECT_EQ(mockDevice->getBuiltIns().getSipKernel(sipType, *mockDevice).getSipAllocation()->getGpuAddressToPatch(), sipAddress);
EXPECT_EQ(mockDevice->getExecutionEnvironment()->getBuiltIns()->getSipKernel(sipType, *mockDevice).getSipAllocation()->getGpuAddressToPatch(), sipAddress);
}
template <typename GfxFamily>
@@ -106,7 +106,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenPreemptionDisabledAndDebug
auto sipAddress = stateSipCmd->getSystemInstructionPointer();
auto sipType = SipKernel::getSipKernelType(mockDevice->getHardwareInfo().pPlatform->eRenderCoreFamily, mockDevice->isSourceLevelDebuggerActive());
EXPECT_EQ(mockDevice->getBuiltIns().getSipKernel(sipType, *mockDevice).getSipAllocation()->getGpuAddressToPatch(), sipAddress);
EXPECT_EQ(mockDevice->getExecutionEnvironment()->getBuiltIns()->getSipKernel(sipType, *mockDevice).getSipAllocation()->getGpuAddressToPatch(), sipAddress);
}
template <typename GfxFamily>