diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-28 21:24:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-28 21:24:49 -0700 |
| commit | c787c4b82ba76f87069911f203eb192060b5264f (patch) | |
| tree | 2aa98326ce8d4c9f2011d79ee9f6d34db14716e7 /source/slang/slang-spirv-core-grammar-embed.cpp | |
| parent | af363c02bf0fa2502c14f454965adff87170ff15 (diff) | |
Add `target_switch` and `intrinsic_asm` statement. (#3154)
* Add `target_switch` and `__intrinsic_asm` statement.
* Cleanup.
* WaveGetActiveMask, WaveGetActiveMask, WaveCountBits.
* WaveIsFirstLane.
* More wave intrinsics.
* wave intrinsics.
* merge fix.
* Fix.
* Fix.
* Update test.
* update test.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-spirv-core-grammar-embed.cpp')
| -rw-r--r-- | source/slang/slang-spirv-core-grammar-embed.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/source/slang/slang-spirv-core-grammar-embed.cpp b/source/slang/slang-spirv-core-grammar-embed.cpp index ee409dad0..cd5c6ddb7 100644 --- a/source/slang/slang-spirv-core-grammar-embed.cpp +++ b/source/slang/slang-spirv-core-grammar-embed.cpp @@ -12431,21 +12431,20 @@ static bool getOperandKindUnderneathId(const OperandKind& k, OperandKind& v) RefPtr<SPIRVCoreGrammarInfo> SPIRVCoreGrammarInfo::getEmbeddedVersion() { - static SPIRVCoreGrammarInfo embedded = [](){ - SPIRVCoreGrammarInfo info; - info.opcodes.embedded = &lookupSpvOp; - info.capabilities.embedded = &lookupSpvCapability; - info.allEnumsWithTypePrefix.embedded = &lookupEnumWithTypePrefix; - info.opInfos.embedded = &getOpInfo; - info.opNames.embedded = &getOpName; - info.operandKinds.embedded = &lookupOperandKind; - info.allEnums.embedded = &lookupQualifiedEnum; - info.allEnumNames.embedded = &getQualifiedEnumName; - info.operandKindNames.embedded = &getOperandKindName; - info.operandKindUnderneathIds.embedded = &getOperandKindUnderneathId; - info.addReference(); + static RefPtr<SPIRVCoreGrammarInfo> embedded = [](){ + RefPtr<SPIRVCoreGrammarInfo> info = new SPIRVCoreGrammarInfo(); + info->opcodes.embedded = &lookupSpvOp; + info->capabilities.embedded = &lookupSpvCapability; + info->allEnumsWithTypePrefix.embedded = &lookupEnumWithTypePrefix; + info->opInfos.embedded = &getOpInfo; + info->opNames.embedded = &getOpName; + info->operandKinds.embedded = &lookupOperandKind; + info->allEnums.embedded = &lookupQualifiedEnum; + info->allEnumNames.embedded = &getQualifiedEnumName; + info->operandKindNames.embedded = &getOperandKindName; + info->operandKindUnderneathIds.embedded = &getOperandKindUnderneathId; return info; }(); - return &embedded; + return embedded; } } |
