diff options
Diffstat (limited to 'tools/render-test/render-test-main.cpp')
| -rw-r--r-- | tools/render-test/render-test-main.cpp | 11 |
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; |
