From 52ceff4beee7cdc7d47eb9292a35e9f610a80bdc Mon Sep 17 00:00:00 2001 From: "YONGH\\yongh" Date: Wed, 25 Oct 2017 17:59:45 -0400 Subject: add new test mode: COMPARE_RENDER_COMPUTE, which runs a input vertex/fragment shader pair, but instead of comparing the resulting framebuffer, it expects the test shader to write results into a UAV, and compares the pixel shader UAV output to the reference output. --- tools/slang-test/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/slang-test') diff --git a/tools/slang-test/main.cpp b/tools/slang-test/main.cpp index cdea6b4dc..de75fa68c 100644 --- a/tools/slang-test/main.cpp +++ b/tools/slang-test/main.cpp @@ -1187,6 +1187,11 @@ TestResult doSlangComputeComparisonTest(TestInput& input) return doComputeComparisonTestRunImpl(input, "-slang -compute", input.outputStem + ".expected.txt"); } +TestResult doSlangRenderComputeComparisonTest(TestInput& input) +{ + return doComputeComparisonTestRunImpl(input, "-slang -gcompute", input.outputStem + ".expected.txt"); +} + TestResult doRenderComparisonTestRun(TestInput& input, char const* langOption, char const* outputKind, String* outOutput) { // TODO: delete any existing files at the output path(s) to avoid stale outputs leading to a false pass @@ -1386,6 +1391,8 @@ TestResult runTest( { "COMPARE_HLSL_CROSS_COMPILE_RENDER", &runHLSLCrossCompileRenderComparisonTest}, { "COMPARE_HLSL_GLSL_RENDER", &runHLSLAndGLSLComparisonTest }, { "COMPARE_COMPUTE", &doSlangComputeComparisonTest}, + { "COMPARE_RENDER_COMPUTE", &doSlangRenderComputeComparisonTest }, + #else { "COMPARE_HLSL", &skipTest }, { "COMPARE_HLSL_RENDER", &skipTest }, -- cgit v1.2.3