summaryrefslogtreecommitdiff
path: root/source/slang/slang-compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-compiler.cpp')
-rw-r--r--source/slang/slang-compiler.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index d0fca1ab5..65c48d2f2 100644
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -196,6 +196,16 @@ namespace Slang
// EntryPoint
//
+ static const Guid IID_IEntryPoint = SLANG_UUID_IEntryPoint;
+
+ ISlangUnknown* EntryPoint::getInterface(const Guid& guid)
+ {
+ if(guid == IID_IEntryPoint)
+ return static_cast<slang::IEntryPoint*>(this);
+
+ return Super::getInterface(guid);
+ }
+
RefPtr<EntryPoint> EntryPoint::create(
Linkage* linkage,
DeclRef<FuncDecl> funcDeclRef,
@@ -2059,6 +2069,15 @@ SlangResult dissassembleDXILUsingDXC(
if( result.format != ResultFormat::None )
return result;
+ // If we haven't yet computed a layout for this target
+ // program, we need to make sure that is done before
+ // code generation.
+ //
+ if( !getOrCreateIRModuleForLayout(sink) )
+ {
+ return result;
+ }
+
RefPtr<BackEndCompileRequest> backEndRequest = new BackEndCompileRequest(
m_program->getLinkage(),
sink,