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

@@ -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>