Move hwInfoConfig ownership to RootDeviceEnvironment 2/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>

Use RootDeviceEnvironment getHelper<ProductHelper> for
- adjustSamplerState
- adjustPlatformForProductFamily.
This commit is contained in:
Kamil Kopryk
2022-11-10 00:05:51 +00:00
committed by Compute-Runtime-Automation
parent 77b6918f30
commit 4aa1697e3c
20 changed files with 121 additions and 77 deletions

View File

@@ -39,6 +39,15 @@ void HwInfoConfigTestWindows::TearDown() {
HwInfoConfigTest::TearDown();
}
template <typename HelperType>
HelperType &HwInfoConfigTestWindows::getHelper() const {
auto &helper = rootDeviceEnvironment->getHelper<HelperType>();
return helper;
}
template ProductHelper &HwInfoConfigTestWindows::getHelper() const;
template CoreHelper &HwInfoConfigTestWindows::getHelper() const;
TEST_F(HwInfoConfigTestWindows, givenCorrectParametersWhenConfiguringHwInfoThenReturnSuccess) {
int ret = hwConfig.configureHwInfoWddm(&pInHwInfo, &outHwInfo, osInterface.get());
EXPECT_EQ(0, ret);

View File

@@ -29,6 +29,9 @@ struct HwInfoConfigTestWindows : public HwInfoConfigTest {
MockHwInfoConfigHw<IGFX_UNKNOWN> hwConfig;
std::unique_ptr<MockExecutionEnvironment> executionEnvironment;
std::unique_ptr<RootDeviceEnvironment> rootDeviceEnvironment;
template <typename HelperType>
HelperType &getHelper() const;
};
} // namespace NEO