summaryrefslogtreecommitdiff
path: root/tools/slang-test/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/slang-test/options.cpp')
-rw-r--r--tools/slang-test/options.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/slang-test/options.cpp b/tools/slang-test/options.cpp
index ec30262fc..7a98caec6 100644
--- a/tools/slang-test/options.cpp
+++ b/tools/slang-test/options.cpp
@@ -76,6 +76,7 @@ static bool _isSubCommand(const char* arg)
" -verbose-paths Use verbose paths in output\n"
" -category <name> Only run tests in specified category\n"
" -exclude <name> Exclude tests in specified category\n"
+ " -exclude-prefix <prefix> Exclude tests with specified path prefix\n"
" -api <expr> Enable specific APIs (e.g., 'vk+dx12' or '+dx11')\n"
" -synthesizedTestApi <expr> Set APIs for synthesized tests\n"
" -skip-api-detection Skip API availability detection\n"
@@ -91,6 +92,7 @@ static bool _isSubCommand(const char* arg)
" -capability <name> Compile with the given capability\n"
" -enable-debug-layers [true|false] Enable or disable Validation Layer for Vulkan\n"
" and Debug Device for DX\n"
+ " -cache-rhi-device [true|false] Enable or disable RHI device caching (default: true)\n"
#if _DEBUG
" -disable-debug-layers Disable the debug layers (default enabled in debug "
"build)\n"
@@ -357,6 +359,18 @@ static bool _isSubCommand(const char* arg)
optionsOut->excludeCategories.add(category, category);
}
}
+ else if (strcmp(arg, "-exclude-prefix") == 0)
+ {
+ if (argCursor == argEnd)
+ {
+ stdError.print("error: expected operand for '%s'\n", arg);
+ showHelp(stdError);
+ return SLANG_FAIL;
+ }
+ Slang::StringBuilder sb;
+ Slang::Path::simplify(*argCursor++, Slang::Path::SimplifyStyle::NoRoot, sb);
+ optionsOut->excludePrefixes.add(sb);
+ }
else if (strcmp(arg, "-api") == 0)
{
if (argCursor == argEnd)
@@ -488,6 +502,26 @@ static bool _isSubCommand(const char* arg)
optionsOut->enableDebugLayers = false;
}
}
+ else if (strcmp(arg, "-cache-rhi-device") == 0)
+ {
+ optionsOut->cacheRhiDevice = true;
+
+ if (argCursor == argEnd)
+ {
+ stdError.print("error: expected operand for '%s'\n", arg);
+ showHelp(stdError);
+ return SLANG_FAIL;
+ }
+
+ // Check for false variants
+ const char* value = *argCursor++;
+ if (value[0] == 'f' || value[0] == 'F' || value[0] == 'n' || value[0] == 'N' ||
+ value[0] == '0' ||
+ ((value[0] == 'o' || value[0] == 'O') && (value[1] == 'f' || value[1] == 'F')))
+ {
+ optionsOut->cacheRhiDevice = false;
+ }
+ }
#if _DEBUG
else if (strcmp(arg, "-disable-debug-layers") == 0)
{