summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-glsl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
-rw-r--r--source/slang/slang-emit-glsl.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp
index a86971bf5..64afb7ff1 100644
--- a/source/slang/slang-emit-glsl.cpp
+++ b/source/slang/slang-emit-glsl.cpp
@@ -826,6 +826,18 @@ void GLSLSourceEmitter::_maybeEmitGLSLBuiltin(IRGlobalParam* var, UnownedStringS
emitType(varType, getName(var));
m_writer->emit(";\n\n");
}
+ else if (name == "gl_ClipDistance")
+ {
+ auto varType = var->getDataType();
+ if (auto outType = as<IROutType>(varType))
+ {
+ varType = outType->getValueType();
+ }
+
+ m_writer->emit("out ");
+ emitType(varType, getName(var));
+ m_writer->emit(";\n\n");
+ }
}
void GLSLSourceEmitter::_requireBaseType(BaseType baseType)