diff options
| author | Yong He <yonghe@outlook.com> | 2024-06-11 00:01:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-11 00:01:12 -0700 |
| commit | 6d5ef9b650a9db35f7774ca09d9225d0c30849e4 (patch) | |
| tree | d8f812a52d937709efa23b17c1e36c51ee1b66f4 /source/slang/slang-emit-spirv.cpp | |
| parent | 21bbebb19dfdbbee107b9fd9830e18d5fb6a573a (diff) | |
Fix `GetAttributeAtVertex` for spirv and glsl targets. (#4334)
Diffstat (limited to 'source/slang/slang-emit-spirv.cpp')
| -rw-r--r-- | source/slang/slang-emit-spirv.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp index 1db323993..4f7410f00 100644 --- a/source/slang/slang-emit-spirv.cpp +++ b/source/slang/slang-emit-spirv.cpp @@ -3535,6 +3535,15 @@ struct SPIRVEmitContext (IRInterpolationMode)getIntVal(decoration->getOperand(0)), dstID); break; + case kIROp_PerVertexDecoration: + ensureExtensionDeclaration(UnownedStringSlice("SPV_KHR_fragment_shader_barycentric")); + requireSPIRVCapability(SpvCapabilityFragmentBarycentricKHR); + emitOpDecorate( + getSection(SpvLogicalSectionID::Annotations), + decoration, + dstID, + SpvDecorationPerVertexKHR); + break; case kIROp_MemoryQualifierSetDecoration: { auto collection = as<IRMemoryQualifierSetDecoration>(decoration); |
