summaryrefslogtreecommitdiffstats
path: root/tools/render-test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/render-test')
-rw-r--r--tools/render-test/options.cpp4
-rw-r--r--tools/render-test/options.h2
-rw-r--r--tools/render-test/render-test-main.cpp4
3 files changed, 9 insertions, 1 deletions
diff --git a/tools/render-test/options.cpp b/tools/render-test/options.cpp
index beacad1a8..ce438046a 100644
--- a/tools/render-test/options.cpp
+++ b/tools/render-test/options.cpp
@@ -249,6 +249,10 @@ static rhi::DeviceType _toRenderType(Slang::RenderApiType apiType)
{
SLANG_RETURN_ON_FAIL(reader.expectArg(outOptions.entryPointName));
}
+ else if (argValue == "-enable-backend-validation")
+ {
+ outOptions.enableBackendValidation = true;
+ }
else
{
// Lookup
diff --git a/tools/render-test/options.h b/tools/render-test/options.h
index 2497ce782..9a30030f7 100644
--- a/tools/render-test/options.h
+++ b/tools/render-test/options.h
@@ -87,6 +87,8 @@ struct Options
bool generateSPIRVDirectly = true;
+ bool enableBackendValidation = false;
+
Options() { downstreamArgs.addName("slang"); }
static SlangResult parse(
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp
index b1f957551..812a753e3 100644
--- a/tools/render-test/render-test-main.cpp
+++ b/tools/render-test/render-test-main.cpp
@@ -1367,10 +1367,12 @@ static SlangResult _innerMain(
#if _DEBUG
desc.enableValidation = true;
- desc.enableBackendValidation = true;
desc.debugCallback = &debugCallback;
#endif
+ if (options.enableBackendValidation)
+ desc.enableBackendValidation = true;
+
desc.slang.lineDirectiveMode = SLANG_LINE_DIRECTIVE_MODE_NONE;
if (options.generateSPIRVDirectly)
desc.slang.targetFlags = SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY;