summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorAnders Leino <aleino@nvidia.com>2024-11-25 10:15:20 +0200
committerGitHub <noreply@github.com>2024-11-25 08:15:20 +0000
commitaaca2d2b615ce113ae9eff11a6fc01f579471b12 (patch)
tree2f6c5d04180888a25825cc5ad76e818ccf84c375 /source
parente30f0537126f611b7cad81404f9d0c19c6b57ddf (diff)
wgsl: Fix field semantics even if input struct doesn't need flattening (#5642)
* wgsl: Fix field semantics even if input struct doesn't need flattening Helps to address issue #5633. * Add test for multiple stage IO locations This verifies part of issue #5633.
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-ir-wgsl-legalize.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/slang/slang-ir-wgsl-legalize.cpp b/source/slang/slang-ir-wgsl-legalize.cpp
index 4d617a169..8eb820b4d 100644
--- a/source/slang/slang-ir-wgsl-legalize.cpp
+++ b/source/slang/slang-ir-wgsl-legalize.cpp
@@ -145,11 +145,10 @@ struct LegalizeWGSLEntryPointContext
structType,
mapOldFieldToNewField,
semanticInfoToRemove);
+ // Validate/rearange all semantics which overlap in our flat struct.
+ fixFieldSemanticsOfFlatStruct(flattenedStruct);
if (flattenedStruct != structType)
{
- // Validate/rearange all semantics which overlap in our flat struct
- fixFieldSemanticsOfFlatStruct(flattenedStruct);
-
// Replace the 'old IRParam type' with a 'new IRParam type'
param->setFullType(flattenedStruct);