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-glsl.cpp | |
| parent | 21bbebb19dfdbbee107b9fd9830e18d5fb6a573a (diff) | |
Fix `GetAttributeAtVertex` for spirv and glsl targets. (#4334)
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-glsl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index d13bc96d1..936dc15ff 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -2755,6 +2755,11 @@ void GLSLSourceEmitter::emitVarDecorationsImpl(IRInst* varDecl) { prefix = toSlice("hitAttribute"); } + else if (as<IRPerVertexDecoration>(decoration)) + { + _requireGLSLExtension(toSlice("GL_EXT_fragment_shader_barycentric")); + prefix = toSlice("pervertex"); + } else { IRIntegerValue locationValue = -1; |
