diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-05-17 17:27:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-17 17:27:12 -0400 |
| commit | 05c4c2679ae979cfcb61e4c2acdb432c34384ddb (patch) | |
| tree | da146d2f90a28319a32bcb27ea33acec21537265 /source/slang/slang-emit-c-like.cpp | |
| parent | 39fb45484996f9d71b6551239dbf55eaaaf8db1f (diff) | |
Refactor prelude emit (#2236)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Refactor how prelude output works in emit.
* Small improvement to emit output.
* Move around comment on target specific language directives based on review.
Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index a6edc0a1f..895421783 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -106,6 +106,11 @@ SlangResult CLikeSourceEmitter::init() return SLANG_OK; } +void CLikeSourceEmitter::emitFrontMatterImpl(TargetRequest* targetReq) +{ + SLANG_UNUSED(targetReq); +} + // // Types // @@ -534,26 +539,6 @@ UInt CLikeSourceEmitter::getBindingSpace(EmitVarChain* chain, LayoutResourceKind return space; } -void CLikeSourceEmitter::emitLayoutDirectives(TargetRequest* targetReq) -{ - // We are going to emit the target-language-specific directives - // needed to get the default matrix layout to match what was requested - // for the given target. - // - // Note: we do not rely on the defaults for the target language, - // because a user could take the HLSL/GLSL generated by Slang and pass - // it to another compiler with non-default options specified on - // the command line, leading to all kinds of trouble. - // - // TODO: We need an approach to "global" layout directives that will work - // in the presence of multiple modules. If modules A and B were each - // compiled with different assumptions about how layout is performed, - // then types/variables defined in those modules should be emitted in - // a way that is consistent with that layout... - - emitLayoutDirectivesImpl(targetReq); -} - UInt CLikeSourceEmitter::allocateUniqueID() { return m_uniqueIDCounter++; |
