diff options
| author | Yong He <yonghe@outlook.com> | 2024-06-14 00:56:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-14 00:56:52 -0700 |
| commit | 33e81a03115dad223b244ca689e2abdbf26641f7 (patch) | |
| tree | 964715d12e0311fa139193a7444dab6ca0c508a1 /source | |
| parent | a38a4fb21d7925e8cee46923bff0500ed7f7856e (diff) | |
[Metal] Fix global constant array emit. (#4392)
* [Metal] Fix global constant array emit.
* Try enable more tests.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index 448a67bb9..e9ab58bca 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -1852,14 +1852,16 @@ void CLikeSourceEmitter::emitInstResultDecl(IRInst* inst) case SourceLanguage::HLSL: case SourceLanguage::C: case SourceLanguage::CPP: - m_writer->emit("static "); + m_writer->emit("static const "); + break; + case SourceLanguage::Metal: + m_writer->emit("constant "); break; - default: + m_writer->emit("const "); break; } - m_writer->emit("const "); } emitType(type, getName(inst)); |
