Skip to content

Commit b042946

Browse files
elvinw-inteligcbot
authored andcommitted
Change name ShaderDumpFilter to ShaderDumpRegexFilter
To avoid confusion of using file globing, we add everything w/ "Regex"
1 parent 95b40f6 commit b042946

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

Diff for: IGC/AdaptorCommon/customApi.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ namespace IGC
495495
{
496496
static std::mutex m;
497497
std::lock_guard<std::mutex> lck(m);
498-
if(g_shaderOutputFolder != "" && doesRegexMatch(g_shaderOutputFolder, IGC_GET_REGKEYSTRING(ShaderDumpFilter)))
498+
if(g_shaderOutputFolder != "" && doesRegexMatch(g_shaderOutputFolder, IGC_GET_REGKEYSTRING(ShaderDumpRegexFilter)))
499499
{
500500
return g_shaderOutputFolder.c_str();
501501
}
@@ -526,7 +526,7 @@ namespace IGC
526526
sprintf_s(dumpPath, "%sunknownProcess_%d\\", dumpPath, _getpid());
527527
}
528528

529-
if (needMkDir() && doesRegexMatch(dumpPath, IGC_GET_REGKEYSTRING(ShaderDumpFilter)))
529+
if (needMkDir() && doesRegexMatch(dumpPath, IGC_GET_REGKEYSTRING(ShaderDumpRegexFilter)))
530530
{
531531
if (GetFileAttributesA(dumpPath) != FILE_ATTRIBUTE_DIRECTORY)
532532
{
@@ -558,7 +558,7 @@ namespace IGC
558558
#elif defined __linux__
559559
if (!IGC_IS_FLAG_ENABLED(DumpToCurrentDir) && g_shaderOutputFolder == "" && !IGC_IS_FLAG_ENABLED(DumpToCustomDir))
560560
{
561-
bool needMkdir = needMkDir() && doesRegexMatch(GetBaseIGCOutputFolder(), IGC_GET_REGKEYSTRING(ShaderDumpFilter));
561+
bool needMkdir = needMkDir() && doesRegexMatch(GetBaseIGCOutputFolder(), IGC_GET_REGKEYSTRING(ShaderDumpRegexFilter));
562562

563563
char path[MAX_PATH] = { 0 };
564564
bool pidEnabled = IGC_IS_FLAG_DISABLED(ShaderDumpPidDisable);

Diff for: IGC/AdaptorOCL/dllInterfaceCompute.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ void DumpShaderFile(
389389
<< ext;
390390
std::string fullFilePathStr = dstDir + fileName.str();
391391

392-
if (doesRegexMatch(fileName.str(), IGC_GET_REGKEYSTRING(ShaderDumpFilter)))
392+
if (doesRegexMatch(fileName.str(), IGC_GET_REGKEYSTRING(ShaderDumpRegexFilter)))
393393
{
394394
FILE* pFile = NULL;
395395
fopen_s(&pFile, fullFilePathStr.c_str(), "wb");

Diff for: IGC/Compiler/CISACodeGen/CISABuilder.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -4768,9 +4768,9 @@ namespace IGC
47684768
SaveOption(vISA_Compaction, false);
47694769
}
47704770

4771-
if (auto *regex = IGC_GET_REGKEYSTRING(ShaderDumpFilter))
4771+
if (auto *regex = IGC_GET_REGKEYSTRING(ShaderDumpRegexFilter))
47724772
{
4773-
SaveOption(vISA_ShaderDumpFilter, regex);
4773+
SaveOption(vISA_ShaderDumpRegexFilter, regex);
47744774
}
47754775

47764776
auto *forceSpillVaraibles = IGC_GET_REGKEYSTRING(ForceSpillVariables);

Diff for: IGC/common/debug/Dump.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ std::string DumpName::RelativePath() const
429429

430430
bool DumpName::allow() const
431431
{
432-
return doesRegexMatch(RelativePath(), IGC_GET_REGKEYSTRING(ShaderDumpFilter));
432+
return doesRegexMatch(RelativePath(), IGC_GET_REGKEYSTRING(ShaderDumpRegexFilter));
433433
}
434434

435435
namespace {

Diff for: IGC/common/igc_flags.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ DECLARE_IGC_REGKEY(DWORD, ShaderDumpEnableG4, false, "same as ShaderDu
410410
DECLARE_IGC_REGKEY(DWORD, ShaderDumpEnableIGAJSON, false, "adds IGA JSON output to shader dumps (0 = off, 1 = enabled, 2 = include def/use info but causes longer compile times)", 0)
411411
DECLARE_IGC_REGKEY(bool, ShaderDumpEnableRAMetadata, false, "adds RA Metadata file to shader dumps", true)
412412
DECLARE_IGC_REGKEY(bool, ShaderDumpInstNamer, false, "dump all unnamed LLVM IR instruction with variable names 'tmp' which makes easier for shaderoverriding", true)
413-
DECLARE_IGC_REGKEY(debugString, ShaderDumpFilter, 0, "Only dump files matching the given regex", true)
413+
DECLARE_IGC_REGKEY(debugString, ShaderDumpRegexFilter, 0, "Only dump files matching the given regex", true)
414414
DECLARE_IGC_REGKEY(bool, DumpZEInfoToConsole, false, "Dump zeinfo to console", true)
415415
DECLARE_IGC_REGKEY(debugString, ProgbinDumpFileName, 0, "Specify filename to use for dumping progbin file to current dir", true)
416416
DECLARE_IGC_REGKEY(bool, ElfDumpEnable, false, "dump ELF file", true)

Diff for: visa/Common_ISA_framework.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ int CisaInst::createCisaInstruction(ISA_Opcode opcode, unsigned char exec_size,
124124
}
125125

126126
bool allowDump(const Options &options, const std::string &fullPath) {
127-
const char *regex = options.getOptionCstr(vISA_ShaderDumpFilter);
127+
const char *regex = options.getOptionCstr(vISA_ShaderDumpRegexFilter);
128128
if (!regex || *regex == '\0')
129129
return true;
130130

Diff for: visa/include/VISAOptionsDefs.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,8 @@ DEF_VISA_OPTION(vISA_ISAASMToConsole, ET_BOOL, "-isaasmToConsole",
606606
"emit isaasm to stdout instead of file and do early exit", false)
607607
DEF_VISA_OPTION(vISA_DumpIsaVarNames, ET_BOOL, "-dumpisavarnames", UNUSED, true)
608608
DEF_VISA_OPTION(vISA_UniqueLabels, ET_BOOL, "-uniqueLabel", UNUSED, false)
609-
DEF_VISA_OPTION(vISA_ShaderDumpFilter, ET_CSTR, "-shaderDumpFilter",
610-
"USAGE: -shaderDumpFilter <regex>\n", NULL)
609+
DEF_VISA_OPTION(vISA_ShaderDumpRegexFilter, ET_CSTR, "-shaderDumpRegexFilter",
610+
"USAGE: -shaderDumpRegexFilter <regex>\n", NULL)
611611
DEF_VISA_OPTION(vISA_DumpvISA, ET_BOOL, "-dumpvisa",
612612
"-dumpvisa is deprecated and will be removed.", false)
613613
DEF_VISA_OPTION(vISA_StripComments, ET_BOOL, "-stripcomments", UNUSED, false)

0 commit comments

Comments
 (0)