summaryrefslogtreecommitdiffstats
path: root/tools/render-test
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-01-17 08:58:57 -0800
committerGitHub <noreply@github.com>2025-01-17 08:58:57 -0800
commitf68d493d55eddd03d5eb5faad05c4628a2af2d91 (patch)
tree5bad9ee397007c9779986704c6cdadb8a26e9e42 /tools/render-test
parentddc4a1799a9d21084604cc2bf334d5d91cb329e3 (diff)
Avoid using the backend validation when using test server (#6094)
* Avoid using the backend validation when using test server Currently with a debug build, the backend validation such as Vulkan-Validation-Layer or DXC validation is enabled all the time. It means there is a higher chance that we see warning messages while running slang-test with a debug build. However, those warning messages incorrectly treated as the testing result when using test-server. This is mainly because of the fact that the Slang implemention for the RPC commucation expects only one time output result. As soon as any warning is printed, the testing process is incorrectly considered as completed even though it might be still in the middle of initializing the device. This commit disables the backend validation when using the test-server. * format code (#31) Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
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;