diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2021-03-08 13:05:56 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-08 16:05:56 -0500 |
| commit | 2765861cdc104e6104a31cf9e20800b8d1dfae26 (patch) | |
| tree | 9c413eed93bfd64a2145615419a171d2177aaa62 /source | |
| parent | fc9968dc4fd58fab37476f48e4405c2743c5349c (diff) | |
Add GLSL support for SV_InnerCoverage (#1740)
This was a fairly straightforward addition once I found the correct GLSL extension spec to use.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-glsl-legalize.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-ir-glsl-legalize.cpp b/source/slang/slang-ir-glsl-legalize.cpp index ae6521076..052b4fb29 100644 --- a/source/slang/slang-ir-glsl-legalize.cpp +++ b/source/slang/slang-ir-glsl-legalize.cpp @@ -324,6 +324,16 @@ GLSLSystemValueInfo* getGLSLSystemValueInfo( name = "gl_SampleMask[0]"; } } + else if(semanticName == "sv_innercoverage") + { + // uint in hlsl, bool in glsl + // https://www.khronos.org/registry/OpenGL/extensions/NV/NV_conservative_raster_underestimation.txt + + context->requireGLSLExtension(UnownedStringSlice::fromLiteral("GL_NV_conservative_raster_underestimation")); + + name = "gl_FragFullyCoveredNV"; + requiredType = builder->getBasicType(BaseType::Bool); + } else if(semanticName == "sv_depth") { // Float in hlsl & glsl |
