diff options
| author | Yong He <yonghe@outlook.com> | 2025-02-27 16:57:52 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-27 16:57:52 -0800 |
| commit | 6f2ce72b038b34e84819ddfc5d658166ed879eaa (patch) | |
| tree | 486a85523114a428ccf4deee05bcbab0d4b9528b /source/slang/slang-emit-glsl.cpp | |
| parent | 90b3817498d9cf664346f04dcea71f48ce81993e (diff) | |
Map `SV_InstanceID` to `gl_InstanceIndex-gl_BaseInstance` (#6468)
* Map `SV_InstanceID` to `gl_InstanceIndex-gl_BaseInstance`
* Fix ci.
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-glsl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index 25dab3fb3..776c539b4 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -1791,6 +1791,12 @@ bool GLSLSourceEmitter::tryEmitGlobalParamImpl(IRGlobalParam* varDecl, IRType* v } } + if (varDecl->findDecoration<IRTargetBuiltinVarDecoration>()) + { + // By default, we don't need to emit a definition for target builtin variables. + return true; + } + // Do the default thing return false; } |
