diff options
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-glsl.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index bbfefc75c..0fc54ca1f 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -2347,6 +2347,18 @@ void GLSLSourceEmitter::emitSimpleTypeImpl(IRType* type) m_writer->emit("hitObjectNV"); return; } + case kIROp_TextureFootprintType: + { + m_glslExtensionTracker->requireExtension(UnownedStringSlice("GL_NV_shader_texture_footprint")); + m_glslExtensionTracker->requireVersion(ProfileVersion::GLSL_450); + + m_writer->emit("gl_TextureFootprint"); + auto intLit = as<IRIntLit>(type->getOperand(0)); + if (intLit) + m_writer->emit(intLit->getValue()); + m_writer->emit("DNV"); + return; + } default: break; } |
