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

@ -7,6 +7,7 @@
#pragma once
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/helpers/string.h"
#include "shared/source/utilities/numeric.h"
@ -110,8 +111,8 @@ ze_result_t SamplerCoreFamily<gfxCoreFamily>::initialize(Device *device, const z
samplerState.setMaxLod(maxLodValue.getRawAccess());
auto &hwInfo = device->getHwInfo();
NEO::HwInfoConfig::get(hwInfo.platform.eProductFamily)->adjustSamplerState(&samplerState, hwInfo);
auto &helper = device->getNEODevice()->getRootDeviceEnvironment().getHelper<NEO::ProductHelper>();
helper.adjustSamplerState(&samplerState, hwInfo);
return ZE_RESULT_SUCCESS;
}