diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-07-11 14:46:12 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-07-11 14:46:48 -0700 |
| commit | 5d06d42bbcbf4983bd75f4dd19b89e792698cd14 (patch) | |
| tree | 509f77ecb1c2ee3849e42e74f88ad44a46687d29 /source/slang/emit.cpp | |
| parent | 88ccba175ee2c7a0748690395de9ce7defb466e1 (diff) | |
Bug fixes for resources-in-structs.
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); + } } } |
