From 6d5ef9b650a9db35f7774ca09d9225d0c30849e4 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 11 Jun 2024 00:01:12 -0700 Subject: Fix `GetAttributeAtVertex` for spirv and glsl targets. (#4334) --- source/slang/slang-emit-glsl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/slang/slang-emit-glsl.cpp') 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(decoration)) + { + _requireGLSLExtension(toSlice("GL_EXT_fragment_shader_barycentric")); + prefix = toSlice("pervertex"); + } else { IRIntegerValue locationValue = -1; -- cgit v1.2.3