diff options
| author | jarcherNV <jarcher@nvidia.com> | 2025-06-12 19:14:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-12 19:14:49 -0700 |
| commit | 9c8fab83a53c43e345566c35f87c16fe7b815e01 (patch) | |
| tree | d7d487050656b927a48de9bd6473cf757c6dc94d /tools | |
| parent | 60b66c309075e91824aef69a153e304561ca6041 (diff) | |
Fix API changes from separate debugging support (#7397)
Recent separate debugging support added two new functions which broke
backwards compatibility. This change restores the old API and moves the
new functions to an IComponentType2 interface which can be used if
separate debug files are needed.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/slang-unit-test/unit-test-separate-debug.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/slang-unit-test/unit-test-separate-debug.cpp b/tools/slang-unit-test/unit-test-separate-debug.cpp index 42ada97a5..6ce849b0d 100644 --- a/tools/slang-unit-test/unit-test-separate-debug.cpp +++ b/tools/slang-unit-test/unit-test-separate-debug.cpp @@ -106,8 +106,13 @@ SLANG_UNIT_TEST(separateDebug) ComPtr<slang::IMetadata> metadata; const char* debugBuildIdentifier = nullptr; + // IComponentType2 is a separate interface from IComponentType, so we need + // to query for it, and then use it to get the results. ComPtr<slang::ICompileResult> compileResult; - auto result = linkedProgram->getEntryPointCompileResult( + ComPtr<slang::IComponentType2> linkedProgram2; + SLANG_CHECK( + linkedProgram->queryInterface(SLANG_IID_PPV_ARGS(linkedProgram2.writeRef())) == SLANG_OK); + auto result = linkedProgram2->getEntryPointCompileResult( 0, 0, compileResult.writeRef(), |
