diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-07-06 16:48:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-06 16:48:08 -0400 |
| commit | 9261c7a23ddf061fe9f5bfc3376f09f3c0513bff (patch) | |
| tree | a32be032de237909689d2a63cea03ecf11edc0c6 | |
| parent | 0bf899a5f8110fbea97272bdda03b68b91745e51 (diff) | |
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.
| -rw-r--r-- | tests/hlsl-intrinsic/matrix-double.slang | 5 | ||||
| -rw-r--r-- | tests/hlsl-intrinsic/scalar-double.slang | 5 | ||||
| -rw-r--r-- | tools/slang-test/slang-test-main.cpp | 18 |
3 files changed, 26 insertions, 2 deletions
diff --git a/tests/hlsl-intrinsic/matrix-double.slang b/tests/hlsl-intrinsic/matrix-double.slang index 060c2f4ad..b9e36bef8 100644 --- a/tests/hlsl-intrinsic/matrix-double.slang +++ b/tests/hlsl-intrinsic/matrix-double.slang @@ -4,7 +4,10 @@ // More complicated functions (like say sin) can also be written, if not available on a target, but requires significant // care. -//TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute -output-using-type +// TODO(JS): +// NOTE! war-double-host-callable category is a work around for issues with x86 & host-callable + +//TEST(compute, war-double-host-callable):COMPARE_COMPUTE_EX:-cpu -compute -output-using-type //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -output-using-type //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -output-using-type //DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -output-using-type -render-feature double diff --git a/tests/hlsl-intrinsic/scalar-double.slang b/tests/hlsl-intrinsic/scalar-double.slang index cdf08e7b4..cf4517fa1 100644 --- a/tests/hlsl-intrinsic/scalar-double.slang +++ b/tests/hlsl-intrinsic/scalar-double.slang @@ -1,6 +1,9 @@ // It doesn't look like fxc, dxc, vk support double versions of many of the intrinsics, so they are disabled here. -//TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute +// TODO(JS): +// NOTE! war-double-host-callable category is a work around for issues with x86 & host-callable + +//TEST(compute, war-double-host-callable):COMPARE_COMPUTE_EX:-cpu -compute //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 //DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -render-feature double 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() |
