mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 14:33:04 +08:00
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:
committed by
Compute-Runtime-Automation
parent
c124bfbc6c
commit
4a246534ca
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user