diff options
Diffstat (limited to 'source/slang/emit.cpp')
| -rw-r--r-- | source/slang/emit.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 309a356f4..0c39a98bd 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -2812,8 +2812,16 @@ struct EmitVisitor // TODO(tfoley): technically have to apply substitution here too... if (auto initExpr = declRef.getDecl()->Expr) { - Emit(" = "); - EmitExpr(initExpr); + if (declRef.As<ParameterSyntaxNode>() + && context->shared->target == CodeGenTarget::GLSL) + { + // Don't emit default parameter values when lowering to GLSL + } + else + { + Emit(" = "); + EmitExpr(initExpr); + } } } |
