mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 09:58:55 +08:00
[2/n] Move Hardware Info to Execution Environment
- remove hwInfo from the csr functions where it was passed as a parameter, now csr functions have access to hwInfo by Execution Environment Change-Id: I756ae63d9728c9c963571147bab97f9e1c15797b Signed-off-by: Adam Stefanowski <adam.stefanowski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
ca4b47f7f4
commit
16aee8cc46
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "runtime/command_stream/aub_command_stream_receiver.h"
|
||||
|
||||
#include "runtime/execution_environment/execution_environment.h"
|
||||
#include "runtime/helpers/debug_helpers.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/helpers/options.h"
|
||||
@@ -42,19 +43,20 @@ std::string AUBCommandStreamReceiver::createFullFilePath(const HardwareInfo &hwI
|
||||
return filePath;
|
||||
}
|
||||
|
||||
CommandStreamReceiver *AUBCommandStreamReceiver::create(const HardwareInfo &hwInfo, const std::string &baseName, bool standalone, ExecutionEnvironment &executionEnvironment) {
|
||||
std::string filePath = AUBCommandStreamReceiver::createFullFilePath(hwInfo, baseName);
|
||||
CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseName, bool standalone, ExecutionEnvironment &executionEnvironment) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
std::string filePath = AUBCommandStreamReceiver::createFullFilePath(*hwInfo, baseName);
|
||||
if (DebugManager.flags.AUBDumpCaptureFileName.get() != "unk") {
|
||||
filePath.assign(DebugManager.flags.AUBDumpCaptureFileName.get());
|
||||
}
|
||||
|
||||
if (hwInfo.pPlatform->eRenderCoreFamily >= IGFX_MAX_CORE) {
|
||||
if (hwInfo->pPlatform->eRenderCoreFamily >= IGFX_MAX_CORE) {
|
||||
DEBUG_BREAK_IF(!false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto pCreate = aubCommandStreamReceiverFactory[hwInfo.pPlatform->eRenderCoreFamily];
|
||||
return pCreate ? pCreate(hwInfo, filePath, standalone, executionEnvironment) : nullptr;
|
||||
auto pCreate = aubCommandStreamReceiverFactory[hwInfo->pPlatform->eRenderCoreFamily];
|
||||
return pCreate ? pCreate(filePath, standalone, executionEnvironment) : nullptr;
|
||||
}
|
||||
} // namespace OCLRT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user