From 9c8fab83a53c43e345566c35f87c16fe7b815e01 Mon Sep 17 00:00:00 2001 From: jarcherNV Date: Thu, 12 Jun 2025 19:14:49 -0700 Subject: 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. --- tools/slang-unit-test/unit-test-separate-debug.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/slang-unit-test/unit-test-separate-debug.cpp') 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 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 compileResult; - auto result = linkedProgram->getEntryPointCompileResult( + ComPtr linkedProgram2; + SLANG_CHECK( + linkedProgram->queryInterface(SLANG_IID_PPV_ARGS(linkedProgram2.writeRef())) == SLANG_OK); + auto result = linkedProgram2->getEntryPointCompileResult( 0, 0, compileResult.writeRef(), -- cgit v1.2.3