Reduce usage of global gfx core helper getter [4/n]

Related-To: NEO-6853
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-12-15 14:57:31 +00:00
committed by Compute-Runtime-Automation
parent c124bfbc6c
commit 4a246534ca
11 changed files with 18 additions and 16 deletions

View File

@@ -222,10 +222,10 @@ void SipKernel::freeSipKernels(RootDeviceEnvironment *rootDeviceEnvironment, Mem
}
}
void SipKernel::selectSipClassType(std::string &fileName, const HardwareInfo &hwInfo) {
void SipKernel::selectSipClassType(std::string &fileName, const GfxCoreHelper &gfxCoreHelper) {
const std::string unknown("unk");
if (fileName.compare(unknown) == 0) {
SipKernel::classType = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).isSipKernelAsHexadecimalArrayPreferred()
SipKernel::classType = gfxCoreHelper.isSipKernelAsHexadecimalArrayPreferred()
? SipClassType::HexadecimalHeaderFile
: SipClassType::Builtins;
} else {
@@ -235,7 +235,7 @@ void SipKernel::selectSipClassType(std::string &fileName, const HardwareInfo &hw
bool SipKernel::initSipKernelImpl(SipKernelType type, Device &device) {
std::string fileName = DebugManager.flags.LoadBinarySipFromFile.get();
SipKernel::selectSipClassType(fileName, *device.getRootDeviceEnvironment().getHardwareInfo());
SipKernel::selectSipClassType(fileName, device.getGfxCoreHelper());
switch (SipKernel::classType) {
case SipClassType::RawBinaryFromFile:

View File

@@ -18,8 +18,8 @@ namespace NEO {
class Device;
class GraphicsAllocation;
class MemoryManager;
class GfxCoreHelper;
struct HardwareInfo;
struct RootDeviceEnvironment;
class SipKernel {
@@ -65,7 +65,7 @@ class SipKernel {
static std::string createHeaderFilename(const std::string &filename);
static bool initHexadecimalArraySipKernel(SipKernelType type, Device &device);
static void selectSipClassType(std::string &fileName, const HardwareInfo &hwInfo);
static void selectSipClassType(std::string &fileName, const GfxCoreHelper &gfxCoreHelper);
const std::vector<char> stateSaveAreaHeader;
GraphicsAllocation *sipAllocation = nullptr;