summaryrefslogtreecommitdiff
path: root/tools/slang-test/slang-test-main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/slang-test/slang-test-main.cpp')
-rw-r--r--tools/slang-test/slang-test-main.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index 72af73cc1..f0a140549 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -3394,6 +3394,11 @@ static void _addRenderTestOptions(const Options& options, CommandLine& ioCmdLine
ioCmdLine.addArg("-capability");
ioCmdLine.addArg(capability);
}
+
+ if (options.enableDebugLayers)
+ {
+ ioCmdLine.addArg("-enable-debug-layers");
+ }
}
static SlangResult _extractProfileTime(const UnownedStringSlice& text, double& timeOut)
@@ -3602,17 +3607,6 @@ TestResult runComputeComparisonImpl(
auto actualOutputFile = outputStem + ".actual.txt";
cmdLine.addArg(actualOutputFile);
-#if _DEBUG
- // When using test server, any validation warning printed from the backend
- // gets misinterpreted as the result from the test.
- // This is due to the limitation that Slang RPC implementation expects only
- // one time communication.
- if (context->options.debugLayerEnabled && input.spawnType != SpawnType::UseTestServer)
- {
- cmdLine.addArg("-enable-debug-layers");
- }
-#endif
-
if (context->isExecuting())
{
// clear the stale actual output file first. This will allow us to detect error if
@@ -4705,7 +4699,7 @@ static SlangResult runUnitTestModule(
unitTestContext.slangGlobalSession = context->getSession();
unitTestContext.workDirectory = "";
unitTestContext.enabledApis = context->options.enabledApis;
- unitTestContext.enableDebugLayers = context->options.debugLayerEnabled;
+ unitTestContext.enableDebugLayers = context->options.enableDebugLayers;
unitTestContext.executableDirectory = context->exeDirectoryPath.getBuffer();
auto testCount = testModule->getTestCount();
@@ -4749,6 +4743,7 @@ static SlangResult runUnitTestModule(
{
TestServerProtocol::ExecuteUnitTestArgs args;
args.enabledApis = context->options.enabledApis;
+ args.enableDebugLayers = context->options.enableDebugLayers;
args.moduleName = moduleName;
args.testName = test.testName;