Remove platformDevices from shared, fixtures and mocks

Related-To: NEO-4499
Change-Id: If835ad7a3f21682bce8abe446867857c4e42cadc
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-03-24 17:04:08 +01:00
committed by sys_ocldev
parent 94bd9af6e2
commit fb0f74dc5a
11 changed files with 16 additions and 16 deletions

View File

@ -20,7 +20,7 @@ struct DispatchFlagsTests : public ::testing::Test {
template <typename CsrType>
void SetUpImpl() {
environmentWrapper.setCsrType<CsrType>();
device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(*platformDevices));
device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
context = std::make_unique<MockContext>(device.get());
}

View File

@ -133,7 +133,7 @@ struct ImageClearColorFixture : ::testing::Test {
return surfaceState;
}
NEO::HardwareInfo hardwareInfo = **NEO::platformDevices;
NEO::HardwareInfo hardwareInfo = *NEO::defaultHwInfo;
MockContext context;
std::unique_ptr<Image> image;
};

View File

@ -24,8 +24,8 @@ class MemoryAllocatorFixture : public MemoryManagementFixture {
MemoryManagementFixture::SetUp();
executionEnvironment = new ExecutionEnvironment();
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(*platformDevices);
device.reset(MockDevice::createWithExecutionEnvironment<MockDevice>(*platformDevices, executionEnvironment, 0u));
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
device.reset(MockDevice::createWithExecutionEnvironment<MockDevice>(defaultHwInfo.get(), executionEnvironment, 0u));
memoryManager = new MockMemoryManager(false, false, *executionEnvironment);
executionEnvironment->memoryManager.reset(memoryManager);
csr = &device->getGpgpuCommandStreamReceiver();

View File

@ -18,7 +18,7 @@ using namespace NEO;
void MemoryManagerWithCsrFixture::SetUp() {
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(*platformDevices);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
csr = std::make_unique<MockCommandStreamReceiver>(this->executionEnvironment, 0);
memoryManager = new MockMemoryManager(executionEnvironment);
executionEnvironment.memoryManager.reset(memoryManager);

View File

@ -33,7 +33,7 @@ struct MockAubCenterFixture {
}
static void setMockAubCenter(RootDeviceEnvironment &rootDeviceEnvironment, CommandStreamReceiverType commandStreamReceiverType) {
if (testMode != TestMode::AubTests && testMode != TestMode::AubTestsWithTbx) {
auto mockAubCenter = std::make_unique<MockAubCenter>(platformDevices[0], false, "", commandStreamReceiverType);
auto mockAubCenter = std::make_unique<MockAubCenter>(defaultHwInfo.get(), false, "", commandStreamReceiverType);
mockAubCenter->aubManager = std::make_unique<MockAubManager>();
rootDeviceEnvironment.aubCenter.reset(mockAubCenter.release());
}