summaryrefslogtreecommitdiffstats
path: root/tools/render-test
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2022-11-10 18:38:19 -0500
committerGitHub <noreply@github.com>2022-11-10 15:38:19 -0800
commit3e312b3062ab493c80d7d7eddf43c94ec59ecdb7 (patch)
treeb333332917f6095c39a10b176b8c57368679c214 /tools/render-test
parent0b05fe33c82ee301c134f5b9a87a596aa47121c8 (diff)
Improvements to NVRTC diagnostic parsing (#2504)
* #include an absolute path didn't work - because paths were taken to always be relative. * Float16 support for C++/CPU based targets with f16tof32 and f32tof16. * Small correction around INF/NAN handling for f32tof16 * Small improvement to f16tof32 * Disable CUDA test for now. * Improvements to NVRTC diagnostic parsing. Handle compilerSpecificArgs. Fix issue with terminating nul ending up in diagnostic string. * Improved NVRTC error parsing. f32tof16 and f16tof32 work in principal on CUDA. * Small update to test, although they remain disabled. * Work around SLANG_E_NOT_AVAILABLE being turned into ignored, when a legitimate error is found * A more tightly constrained fallback NVRTC diagnostic parsing. * Remove CharUtil, as not neeed. Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/render-test')
-rw-r--r--tools/render-test/render-test-main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp
index 805f08d10..d3c284132 100644
--- a/tools/render-test/render-test-main.cpp
+++ b/tools/render-test/render-test-main.cpp
@@ -510,7 +510,16 @@ SlangResult RenderTestApp::initialize(
//
ComPtr<ISlangBlob> outDiagnostics;
auto result = device->createProgram(m_compilationOutput.output.desc, m_shaderProgram.writeRef(), outDiagnostics.writeRef());
- SLANG_RETURN_ON_FAIL(result);
+
+ // If there was a failure creating a program, we can't continue
+ // Special case SLANG_E_NOT_AVAILABLE error code to make it a failure,
+ // as it is also used to indicate an attempt setup something failed gracefully (because it couldn't be supported)
+ // but that's not this.
+ if (SLANG_FAILED(result))
+ {
+ result = (result == SLANG_E_NOT_AVAILABLE) ? SLANG_FAIL : result;
+ return result;
+ }
m_device = device;