From 271ae7165915cf9910e2de0224159ea0fdd8ce72 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Mon, 3 Apr 2023 11:46:03 +0800 Subject: Fix several silently failing tests (#2767) * Add missing expected.txt for test * Diagnostics -> StdWriters in render test * Allow specifying several test prefixes to run `slang-test -- tests/foo tests/bar` * Squash warnings in some tests * Enable gfx debug layer in gfx test util Makes this issue present consistently: https://github.com/shader-slang/slang/issues/2766 * Allow DebugDevice to return interfaces instantiated by the debugged object * Check that we actaully have a shader cache for shader cache tests --------- Co-authored-by: Yong He --- tools/render-test/slang-support.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/render-test') diff --git a/tools/render-test/slang-support.cpp b/tools/render-test/slang-support.cpp index 5b2d69bf4..54f1b94a1 100644 --- a/tools/render-test/slang-support.cpp +++ b/tools/render-test/slang-support.cpp @@ -10,6 +10,7 @@ #include #include "../../source/core/slang-string-util.h" +#include "../../source/core/slang-test-tool-util.h" namespace renderer_test { using namespace Slang; @@ -199,7 +200,7 @@ void ShaderCompilerUtil::Output::reset() if (auto diagnostics = spGetDiagnosticOutput(slangRequest)) { - fprintf(stderr, "%s", diagnostics); + StdWriters::getError().print("%s", diagnostics); } SLANG_RETURN_ON_FAIL(res); -- cgit v1.2.3