diff options
| author | Yong He <yonghe@outlook.com> | 2024-06-08 05:12:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-08 05:12:49 -0700 |
| commit | 9a23a9aab3721828526c921db1e779008e133e8f (patch) | |
| tree | b49448075cdffe278fd6760e2879bc061eb8e0af /source/slang/slang-options.cpp | |
| parent | bc680e74bd8a0c415cab5ed6fe00b762c26b8b8d (diff) | |
SPIRV `Block` decoration fixes. (#4303)
* SPIRV `Block` decoration fixes.
- SPIRV does not allow duplicate `Block` decorations. So we shouldn't be generating them.
- Also fixes duplication of OpName.
- SPIRV and HLSL do not allow ConstantBuffer with trailing unsized arrays. Added a check in the front-end against such code.
* Convert failing cross-compile tests to filecheck.
---------
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index 7b4b02f68..4bbd0dcaf 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -1051,6 +1051,13 @@ void OptionsParser::setProfileVersion(RawTarget* rawTarget, ProfileVersion profi void OptionsParser::addCapabilityAtom(RawTarget* rawTarget, CapabilityName atom) { + CapabilitySet capSet(atom); + auto stageAtom = capSet.getUniquelyImpliedStageAtom(); + if (stageAtom != CapabilityAtom::Invalid) + { + Stage stage = getStageFromAtom(stageAtom); + setStage(getCurrentEntryPoint(), stage); + } rawTarget->optionSet.addCapabilityAtom(atom); } |
