mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Extract creating aub file name to separate function
Change-Id: Ie0506f1847684cc3aabd8bee153c944b2f49bdb8 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
25a93d4f85
commit
6ea2d8c2a9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -18,14 +18,14 @@
|
||||
namespace OCLRT {
|
||||
AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
|
||||
|
||||
CommandStreamReceiver *AUBCommandStreamReceiver::create(const HardwareInfo &hwInfo, const std::string &baseName, bool standalone, ExecutionEnvironment &executionEnvironment) {
|
||||
std::string AUBCommandStreamReceiver::createFullFilePath(const HardwareInfo &hwInfo, const std::string &filename) {
|
||||
std::string hwPrefix = hardwarePrefix[hwInfo.pPlatform->eProductFamily];
|
||||
|
||||
// Generate the full filename
|
||||
const auto >SystemInfo = *hwInfo.pSysInfo;
|
||||
std::stringstream strfilename;
|
||||
uint32_t subSlicesPerSlice = gtSystemInfo.SubSliceCount / gtSystemInfo.SliceCount;
|
||||
strfilename << hwPrefix << "_" << gtSystemInfo.SliceCount << "x" << subSlicesPerSlice << "x" << gtSystemInfo.MaxEuPerSubSlice << "_" << baseName << ".aub";
|
||||
strfilename << hwPrefix << "_" << gtSystemInfo.SliceCount << "x" << subSlicesPerSlice << "x" << gtSystemInfo.MaxEuPerSubSlice << "_" << filename << ".aub";
|
||||
|
||||
// clean-up any fileName issues because of the file system incompatibilities
|
||||
auto fileName = strfilename.str();
|
||||
@@ -37,6 +37,11 @@ CommandStreamReceiver *AUBCommandStreamReceiver::create(const HardwareInfo &hwIn
|
||||
filePath.append(Os::fileSeparator);
|
||||
filePath.append(fileName);
|
||||
|
||||
return filePath;
|
||||
}
|
||||
|
||||
CommandStreamReceiver *AUBCommandStreamReceiver::create(const HardwareInfo &hwInfo, const std::string &baseName, bool standalone, ExecutionEnvironment &executionEnvironment) {
|
||||
std::string filePath = AUBCommandStreamReceiver::createFullFilePath(hwInfo, baseName);
|
||||
if (DebugManager.flags.AUBDumpCaptureFileName.get() != "unk") {
|
||||
filePath.assign(DebugManager.flags.AUBDumpCaptureFileName.get());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -16,6 +16,7 @@ class ExecutionEnvironment;
|
||||
|
||||
struct AUBCommandStreamReceiver {
|
||||
static CommandStreamReceiver *create(const HardwareInfo &hwInfo, const std::string &filename, bool standalone, ExecutionEnvironment &executionEnvironment);
|
||||
static std::string createFullFilePath(const HardwareInfo &hwInfo, const std::string &filename);
|
||||
|
||||
using AubFileStream = AubMemDump::AubFileStream;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user