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 /include | |
| 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 'include')
| -rw-r--r-- | include/slang.h | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/include/slang.h b/include/slang.h index 9797ea00c..b9fe732c0 100644 --- a/include/slang.h +++ b/include/slang.h @@ -4408,16 +4408,6 @@ struct IComponentType : public ISlangUnknown SlangInt targetIndex, IMetadata** outMetadata, IBlob** outDiagnostics = nullptr) = 0; - - virtual SLANG_NO_THROW SlangResult SLANG_MCALL getTargetCompileResult( - SlangInt targetIndex, - ICompileResult** outCompileResult, - IBlob** outDiagnostics = nullptr) = 0; - virtual SLANG_NO_THROW SlangResult SLANG_MCALL getEntryPointCompileResult( - SlangInt entryPointIndex, - SlangInt targetIndex, - ICompileResult** outCompileResult, - IBlob** outDiagnostics = nullptr) = 0; }; #define SLANG_UUID_IComponentType IComponentType::getTypeGuid() @@ -4436,6 +4426,35 @@ struct ITypeConformance : public IComponentType }; #define SLANG_UUID_ITypeConformance ITypeConformance::getTypeGuid() +/** IComponentType2 is a component type used for getting separate debug data. + +This interface is used for getting separate debug data, introduced here to +avoid breaking backwards compatibility of the IComponentType interface. + +The `getTargetCompileResult` and `getEntryPointCompileResult` functions +are used to get the base and debug spirv, and metadata containing the +debug build identifier. +*/ +struct IComponentType2 : public ISlangUnknown +{ + SLANG_COM_INTERFACE( + 0x9c2a4b3d, + 0x7f68, + 0x4e91, + {0xa5, 0x2c, 0x8b, 0x19, 0x3e, 0x45, 0x7a, 0x9f}) + + virtual SLANG_NO_THROW SlangResult SLANG_MCALL getTargetCompileResult( + SlangInt targetIndex, + ICompileResult** outCompileResult, + IBlob** outDiagnostics = nullptr) = 0; + virtual SLANG_NO_THROW SlangResult SLANG_MCALL getEntryPointCompileResult( + SlangInt entryPointIndex, + SlangInt targetIndex, + ICompileResult** outCompileResult, + IBlob** outDiagnostics = nullptr) = 0; +}; + #define SLANG_UUID_IComponentType2 IComponentType2::getTypeGuid() + /** A module is the granularity of shader code compilation and loading. In most cases a module corresponds to a single compile "translation unit." |
