summaryrefslogtreecommitdiffstats
path: root/source/slang/lower.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/lower.cpp')
-rw-r--r--source/slang/lower.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/lower.cpp b/source/slang/lower.cpp
index 7a12fc3b7..70c153902 100644
--- a/source/slang/lower.cpp
+++ b/source/slang/lower.cpp
@@ -2833,6 +2833,17 @@ struct LoweringVisitor
// due to, e.g., bindless textures.
shouldDesugarTupleTypes = true;
}
+ else if( shared->compileRequest->compileFlags & SLANG_COMPILE_FLAG_SPLIT_MIXED_TYPES )
+ {
+ // If the user is directly asking us to do this transformation,
+ // then obviously we need to do it.
+ //
+ // TODO: The way this is defined here means it will even apply to user
+ // HLSL code (not just code written in Slang). We may want to
+ // reconsider that choice, and only split things that originated in Slang.
+ //
+ shouldDesugarTupleTypes = true;
+ }
bool isResultATupleType = false;
bool hasAnyNonTupleFields = false;