Move GfxCoreHelper ownership to RootDeviceEnvironment

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2023-01-09 14:59:10 +00:00
committed by Compute-Runtime-Automation
parent d32a7ee7d0
commit eb63f36108
35 changed files with 207 additions and 113 deletions

View File

@@ -1210,7 +1210,7 @@ class MyMockGfxCoreHelper : public GfxCoreHelperHw<GfxFamily> {
HWTEST_F(DeviceGetCapsTest, givenDeviceWhenInitializingCapsThenPlanarYuvHeightIsTakenFromHelper) {
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
RAIIGfxCoreHelperFactory<MyMockGfxCoreHelper<FamilyType>> gfxCoreHelperBackup{device->getHardwareInfo().platform.eRenderCoreFamily};
RAIIGfxCoreHelperFactory<MyMockGfxCoreHelper<FamilyType>> gfxCoreHelperBackup{*device->executionEnvironment->rootDeviceEnvironments[0]};
DriverInfoMock *driverInfoMock = new DriverInfoMock();
device->driverInfo.reset(driverInfoMock);
@@ -1218,7 +1218,7 @@ HWTEST_F(DeviceGetCapsTest, givenDeviceWhenInitializingCapsThenPlanarYuvHeightIs
EXPECT_TRUE(getPlanarYuvHeightCalled);
getPlanarYuvHeightCalled = false;
const auto &caps = device->getDeviceInfo();
EXPECT_EQ(gfxCoreHelperBackup.mockGfxCoreHelper.dummyPlanarYuvValue, caps.planarYuvMaxHeight);
EXPECT_EQ(gfxCoreHelperBackup.mockGfxCoreHelper->dummyPlanarYuvValue, caps.planarYuvMaxHeight);
}
TEST_F(DeviceGetCapsTest, givenSystemWithNoDriverInfoWhenGettingNameAndVersionThenReturnDefaultValues) {