Remove platformDevices from os_interface, platform, program, sharings

and source_level_debugger

Related-To: NEO-4499
Change-Id: I09c28e8c167b00b80eaff8f86c8e58cea78ed3b1
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-03-24 17:52:43 +01:00
committed by sys_ocldev
parent 7d37c5a5d9
commit 25aea40e84
24 changed files with 56 additions and 56 deletions

View File

@ -21,7 +21,7 @@ using namespace ::testing;
namespace NEO {
TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenCorrectExtensionsAreSet) {
auto hwInfo = *platformDevices;
auto hwInfo = defaultHwInfo.get();
auto pDevice = MockDevice::createWithNewExecutionEnvironment<Device>(hwInfo);
auto pClDevice = new ClDevice{*pDevice, platform()};
@ -39,7 +39,7 @@ TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenCo
}
TEST(DeviceOsTest, supportedSimultaneousInterops) {
auto pDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(*platformDevices));
auto pDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
std::vector<unsigned int> expected = {CL_GL_CONTEXT_KHR,
CL_WGL_HDC_KHR,
@ -57,7 +57,7 @@ TEST(DeviceOsTest, supportedSimultaneousInterops) {
}
TEST(DeviceOsTest, DeviceCreationFail) {
auto hwInfo = *platformDevices;
auto hwInfo = defaultHwInfo.get();
auto pDevice = MockDevice::createWithNewExecutionEnvironment<FailDevice>(hwInfo);
EXPECT_THAT(pDevice, nullptr);
@ -66,7 +66,7 @@ TEST(DeviceOsTest, DeviceCreationFail) {
TEST(DeviceOsTest, DeviceCreationFailMidThreadPreemption) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.ForcePreemptionMode.set(static_cast<int32_t>(PreemptionMode::MidThread));
auto pDevice = MockDevice::createWithNewExecutionEnvironment<FailDeviceAfterOne>(*platformDevices);
auto pDevice = MockDevice::createWithNewExecutionEnvironment<FailDeviceAfterOne>(defaultHwInfo.get());
EXPECT_THAT(pDevice, nullptr);
}

View File

@ -39,7 +39,7 @@ CommandStreamReceiver *createMockCommandStreamReceiver(bool withAubDump, Executi
class DriverInfoDeviceTest : public ::testing::Test {
public:
void SetUp() {
hwInfo = platformDevices[0];
hwInfo = defaultHwInfo.get();
commandStreamReceiverCreateFunc = commandStreamReceiverFactory[hwInfo->platform.eRenderCoreFamily];
commandStreamReceiverFactory[hwInfo->platform.eRenderCoreFamily] = createMockCommandStreamReceiver;
}

View File

@ -18,7 +18,7 @@ OsLibrary *setAdapterInfo(const PLATFORM *platform, const GT_SYSTEM_INFO *gtSyst
struct GdiDllFixture {
virtual void SetUp() {
const HardwareInfo *hwInfo = platformDevices[0];
const HardwareInfo *hwInfo = defaultHwInfo.get();
mockGdiDll.reset(setAdapterInfo(&hwInfo->platform, &hwInfo->gtSystemInfo, hwInfo->capabilityTable.gpuAddressSpace));
setSizesFcn = reinterpret_cast<decltype(&MockSetSizes)>(mockGdiDll->getProcAddress("MockSetSizes"));

View File

@ -128,7 +128,7 @@ TEST(WddmDiscoverDevices, WhenAdapterDescriptionContainsVirtualRenderThenAdapter
TEST(Wddm20EnumAdaptersTest, expectTrue) {
const HardwareInfo *hwInfo = platformDevices[0];
const HardwareInfo *hwInfo = defaultHwInfo.get();
std::unique_ptr<OsLibrary> mockGdiDll(setAdapterInfo(&hwInfo->platform,
&hwInfo->gtSystemInfo,
hwInfo->capabilityTable.gpuAddressSpace));
@ -144,7 +144,7 @@ TEST(Wddm20EnumAdaptersTest, expectTrue) {
}
TEST(Wddm20EnumAdaptersTest, givenEmptyHardwareInfoWhenEnumAdapterIsCalledThenCapabilityTableIsSet) {
const HardwareInfo *hwInfo = platformDevices[0];
const HardwareInfo *hwInfo = defaultHwInfo.get();
std::unique_ptr<OsLibrary> mockGdiDll(setAdapterInfo(&hwInfo->platform,
&hwInfo->gtSystemInfo,
hwInfo->capabilityTable.gpuAddressSpace));

View File

@ -350,7 +350,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenNonZeroFenceValueOnSingleEngineRegister
TEST_F(WddmMemoryManagerSimpleTest, givenNonZeroFenceValuesOnMultipleEnginesRegisteredWhenHandleFenceCompletionIsCalledThenWaitOnCpuForEachEngine) {
executionEnvironment->prepareRootDeviceEnvironments(2u);
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(*platformDevices);
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
}
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(*executionEnvironment, 1u));
@ -383,7 +383,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenNonZeroFenceValuesOnMultipleEnginesRegi
TEST_F(WddmMemoryManagerSimpleTest, givenNonZeroFenceValueOnSomeOfMultipleEnginesRegisteredWhenHandleFenceCompletionIsCalledThenWaitOnCpuForTheseEngines) {
executionEnvironment->prepareRootDeviceEnvironments(2u);
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(*platformDevices);
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
}
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(*executionEnvironment, 1u));
@ -692,7 +692,7 @@ HWTEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWhenTiledImageIsBeingCreat
GTEST_SKIP();
}
auto device = std::make_unique<MockClDevice>(MockDevice::createWithExecutionEnvironment<MockDevice>(*platformDevices, executionEnvironment, 0u));
auto device = std::make_unique<MockClDevice>(MockDevice::createWithExecutionEnvironment<MockDevice>(defaultHwInfo.get(), executionEnvironment, 0u));
MockContext context(device.get());
context.memoryManager = memoryManager.get();
@ -1450,7 +1450,7 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerAnd32bitBuildThenSvmPartitio
TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWithRegisteredOsContextWhenCallingIsMemoryBudgetExhaustedThenReturnFalse) {
executionEnvironment->prepareRootDeviceEnvironments(3u);
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(*platformDevices);
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
}
executionEnvironment->initializeMemoryManager();
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
@ -1475,7 +1475,7 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWithRegisteredOsContextWhenC
TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWithRegisteredOsContextWithExhaustedMemoryBudgetWhenCallingIsMemoryBudgetExhaustedThenReturnTrue) {
executionEnvironment->prepareRootDeviceEnvironments(3u);
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(*platformDevices);
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
}
executionEnvironment->initializeMemoryManager();
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {