summaryrefslogtreecommitdiffstats
path: root/source/slang/type-layout.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-07-09 18:08:22 -0700
committerTim Foley <tfoley@nvidia.com>2017-07-09 18:08:22 -0700
commit064c28f58e845be67a31283cb885b22f32118f49 (patch)
tree559cde481de3dc37ad0e571380367bb0a6ebc3ca /source/slang/type-layout.cpp
parent54364eb1aef3fc6aa87b144ba91ca0a77818e4a4 (diff)
Pick layout rules based on target languge, not source.
The tricky bit here was that the `reflection-json` output format isn't really a code generation target like the others, and we need to be able to have multiple "targets" active to make sense of it. This needs cleaning-up.
Diffstat (limited to 'source/slang/type-layout.cpp')
-rw-r--r--source/slang/type-layout.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/slang/type-layout.cpp b/source/slang/type-layout.cpp
index 10c7327ce..31c8ed607 100644
--- a/source/slang/type-layout.cpp
+++ b/source/slang/type-layout.cpp
@@ -543,15 +543,18 @@ LayoutRulesFamilyImpl* GetLayoutRulesFamilyImpl(LayoutRulesFamily rule)
}
}
-LayoutRulesFamilyImpl* GetLayoutRulesFamilyImpl(SourceLanguage language)
+LayoutRulesFamilyImpl* GetLayoutRulesFamilyImpl(CodeGenTarget target)
{
- switch (language)
+ switch (target)
{
- case SourceLanguage::Slang:
- case SourceLanguage::HLSL:
+ case CodeGenTarget::HLSL:
+ case CodeGenTarget::DXBytecode:
+ case CodeGenTarget::DXBytecodeAssembly:
return &kHLSLLayoutRulesFamilyImpl;
- case SourceLanguage::GLSL:
+ case CodeGenTarget::GLSL:
+ case CodeGenTarget::SPIRV:
+ case CodeGenTarget::SPIRVAssembly:
return &kGLSLLayoutRulesFamilyImpl;
default: