summaryrefslogtreecommitdiff
path: root/slang.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2022-08-22 10:08:25 -0400
committerGitHub <noreply@github.com>2022-08-22 10:08:25 -0400
commit15055d20c143cb398bd3e269541eebf24777390a (patch)
tree81f96a53824765fabc1fbb81d2d588476996eaa9 /slang.h
parentaf70651a4843b16dd24e14b5cedffe399ebeb862 (diff)
Replace DownstreamCompileResult with Artifact (#2369)
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP replacing DownstreamCompileResult. * First attempt at replacing DownstreamCompileResult with IArtifact and associated types. * Small renaming around CharSlice. * ICastable -> ISlangCastable Added IClonable Fix issue with cloning in ArtifactDiagnostics. * Only add the blob if one is defined in DXC. * Guard adding blob representation. * Make cloneInterface available across code base. Set enums backing type for ArtifactDiagnostic. * Added ::create for ArtifactDiagnostics.
Diffstat (limited to 'slang.h')
-rw-r--r--slang.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/slang.h b/slang.h
index 9b6c71cf4..2c3b9ca6d 100644
--- a/slang.h
+++ b/slang.h
@@ -945,7 +945,7 @@ extern "C"
/* An interface to provide a mechanism to cast, that doesn't require ref counting
and doesn't have to return a pointer to a ISlangUnknown derived class */
- class ICastable : public ISlangUnknown
+ class ISlangCastable : public ISlangUnknown
{
SLANG_COM_INTERFACE(0x87ede0e1, 0x4852, 0x44b0, { 0x8b, 0xf2, 0xcb, 0x31, 0x87, 0x4d, 0xe2, 0x39 });
@@ -955,6 +955,17 @@ extern "C"
virtual SLANG_NO_THROW void* SLANG_MCALL castAs(const SlangUUID& guid) = 0;
};
+ class ISlangClonable : public ISlangCastable
+ {
+ SLANG_COM_INTERFACE(0x1ec36168, 0xe9f4, 0x430d, { 0xbb, 0x17, 0x4, 0x8a, 0x80, 0x46, 0xb3, 0x1f });
+
+ /// Note the use of guid is for the desired interface/object.
+ /// The object is returned *not* ref counted. Any type that can implements the interface,
+ /// derives from ICastable, and so (not withstanding some other issue) will always return
+ /// an ICastable interface which other interfaces/types are accessible from via castAs
+ SLANG_NO_THROW virtual void* SLANG_MCALL clone(const SlangUUID& guid) = 0;
+ };
+
/** A "blob" of binary data.
This interface definition is compatible with the `ID3DBlob` and `ID3D10Blob` interfaces.
@@ -1019,7 +1030,7 @@ extern "C"
/** An interface that can be used to encapsulate access to a shared library. An implementation
does not have to implement the library as a shared library
*/
- struct ISlangSharedLibrary : public ICastable
+ struct ISlangSharedLibrary : public ISlangCastable
{
SLANG_COM_INTERFACE(0x70dbc7c4, 0xdc3b, 0x4a07, { 0xae, 0x7e, 0x75, 0x2a, 0xf6, 0xa8, 0x15, 0x55 })
@@ -1276,6 +1287,7 @@ extern "C"
namespace slang {
struct IGlobalSession;
struct ICompileRequest;
+
} // namespace slang
/*!