From 9261c7a23ddf061fe9f5bfc3376f09f3c0513bff Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 6 Jul 2022 16:48:08 -0400 Subject: WAR for double/host-callable/x86 (#2314) * #include an absolute path didn't work - because paths were taken to always be relative. * Work around for issue with double/x86/llvm. --- tools/slang-test/slang-test-main.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tools') diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index 6391ad3e2..a3749f784 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -4152,6 +4152,24 @@ SlangResult innerMain(int argc, char** argv) out.print("\n"); } + { + SlangSession* session = context.getSession(); + + const bool hasLlvm = SLANG_SUCCEEDED(session->checkPassThroughSupport(SLANG_PASS_THROUGH_LLVM)); + const auto hostCallableCompiler = session->getDownstreamCompilerForTransition(SLANG_CPP_SOURCE, SLANG_SHADER_HOST_CALLABLE); + + if (hasLlvm && hostCallableCompiler == SLANG_PASS_THROUGH_LLVM && SLANG_PROCESSOR_X86) + { + // TODO(JS) + // For some reason host-callable with llvm/double produces different results on x86 + } + else + { + // Special category to mark a test only works for targets that work correctly with double (ie not x86/llvm) + categorySet.add("war-double-host-callable", fullTestCategory); + } + } + // Working out what renderApis is worked on on demand through // _getAvailableRenderApiFlags() -- cgit v1.2.3