diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-05-31 13:17:34 -0400 |
|---|---|---|
| committer | Tim Foley <tfoleyNV@users.noreply.github.com> | 2019-05-31 10:17:34 -0700 |
| commit | b81ff3ef968d1cc4e954b31a1812b3c391d17b02 (patch) | |
| tree | d9669f736c3be30c569b1c0dbd0abfaca6e85a0c /source/slang/type-layout.cpp | |
| parent | d4924f5fc67f56b60d11381bf77d21bc01eb8763 (diff) | |
WIP: Support for other source target language (#971)
* WIP: Setting up C/Cpp source compilation targets.
* WIP: Emitting C/CPP.
* WIP: Split out SourceSink, and use it for source output on emit.
* SourceSink -> SourceStream
* * Made SourceStream use m_ prefixing of members.
* Make all methods use lower camel
* Removed methods from SourceStream interface that are not used externally (use _ prefixing)
* Improvements to documentation
* EmitContext is now effectively empty, so just use SharedEmitContext as EmitContext.
* SharedEmitContext -> EmitContext
* Methods to LowerCamel in emit.cpp
* Split out EmitContext and ExtensionUsageTracker into separate files.
* Split out EmitVisitor into slang-c-like-source-emitter files.
* EmitVisitor -> CLikeSourceEmitter
* Tidy up around CLikeSourceEmitter - simplify header.
* Small tidy up - removing repeated comments that are in header.
* Remove EmitContext paramter threading.
* Small tidy up.
Use prefixed macros for slang-c-like-source-emitter.h
* Small tidy up in slang-c-like-source-emitter.cpp
* First pass at splitting out UnmangleContext.
* MangledNameParser -> MangledLexer.
* WIP making EmitOp (EOp) enum available outside of cpp
* Generating EmitOpInfo from macro.
* Split out emit precedence handling.
Don't use kOp_ style anymore, just use an array indexed by EmitOp.
* Disable C simple test for now.
* Keep g++/clang happy with token pasting.
* Fix win32 narrowing warning.
Diffstat (limited to 'source/slang/type-layout.cpp')
| -rw-r--r-- | source/slang/type-layout.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/slang/type-layout.cpp b/source/slang/type-layout.cpp index ba6085e0a..92f7d6af3 100644 --- a/source/slang/type-layout.cpp +++ b/source/slang/type-layout.cpp @@ -814,6 +814,19 @@ LayoutRulesFamilyImpl* getDefaultLayoutRulesFamilyForTarget(TargetRequest* targe case CodeGenTarget::SPIRVAssembly: return &kGLSLLayoutRulesFamilyImpl; + + case CodeGenTarget::CPPSource: + case CodeGenTarget::CSource: + { + // We just need to decide here what style of layout is appropriate, in terms of memory + // and binding. That in terms of the actual binding that will be injected into functions + // in the form of a BindContext. For now we'll go with HLSL layout - + // that we may want to rethink that with the use of arrays and binding VK style binding might be + // more appropriate in some ways. + + return &kHLSLLayoutRulesFamilyImpl; + } + default: return nullptr; } |
