diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-08-03 17:10:46 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-03 17:10:46 -0400 |
| commit | e43ef82e288afe486f45ef2736d378e88f40cc90 (patch) | |
| tree | 356841a992263d6a5d03e9d6704868c2cc12190c /source/slang/slang-module-library.h | |
| parent | e81a5fe56f3177fc3c7040e2320ae083e3746eb7 (diff) | |
Improvements around Artifact (#2346)
* #include an absolute path didn't work - because paths were taken to always be relative.
* WIP with hierarchical enums.
* Some small fixes and improvements around artifact desc related types.
* Improvements around hierarchical enum.
* Fixes to get Artifact types refactor to be able to execute tests.
* Attempt to better categorize PTX.
* Work around for potentially unused function warning.
* Typo fix.
* Simplify Artifact header.
* Small improvements around Artifact kind/payload/style.
* Added IDestroyable/ICastable
* Add IArtifactList.
* First impl of IArtifactUtil.
* Use the ICastable interface for IArtifactRepresentation.
* Added IArtifactRepresentation & IArtifactAssociated.
* Add SLANG_OVERRIDE to avoid gcc/clang warning.
* Fix calling convention issue on win32.
* Fix missing SLANG_OVERRIDE.
Diffstat (limited to 'source/slang/slang-module-library.h')
| -rw-r--r-- | source/slang/slang-module-library.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/slang/slang-module-library.h b/source/slang/slang-module-library.h index 7b65dad9e..58d10bfc3 100644 --- a/source/slang/slang-module-library.h +++ b/source/slang/slang-module-library.h @@ -10,7 +10,7 @@ namespace Slang { // Class to hold information serialized in from a -r slang-lib/slang-module -class ModuleLibrary : public ComObject, public IArtifactInstance +class ModuleLibrary : public ComObject, public IArtifactRepresentation { public: @@ -18,14 +18,18 @@ public: SLANG_CLASS_GUID(0x2f7412bd, 0x6154, 0x40a9, { 0x89, 0xb3, 0x62, 0xe0, 0x24, 0x17, 0x24, 0xa1 }); - // IArtifactInstance + // ICastable + virtual SLANG_NO_THROW void* SLANG_MCALL castAs(const Guid& guid) SLANG_OVERRIDE; + + // IArtifactRepresentation virtual SLANG_NO_THROW SlangResult SLANG_MCALL writeToBlob(ISlangBlob** blob) SLANG_OVERRIDE { SLANG_UNUSED(blob); return SLANG_E_NOT_IMPLEMENTED; } - virtual SLANG_NO_THROW void* SLANG_MCALL queryObject(const Guid& classGuid) SLANG_OVERRIDE { return classGuid == getTypeGuid() ? this : nullptr; } + virtual SLANG_NO_THROW bool SLANG_MCALL exists() SLANG_OVERRIDE { return true; } List<FrontEndCompileRequest::ExtraEntryPointInfo> m_entryPoints; List<RefPtr<IRModule>> m_modules; void* getInterface(const Guid& uuid); + void* getObject(const Guid& uuid); }; SlangResult loadModuleLibrary(const Byte* inBytes, size_t bytesCount, EndToEndCompileRequest* req, RefPtr<ModuleLibrary>& module); |
