From 5d06d42bbcbf4983bd75f4dd19b89e792698cd14 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Tue, 11 Jul 2017 14:46:12 -0700 Subject: Bug fixes for resources-in-structs. --- source/slang/emit.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source/slang/emit.cpp') 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() + && context->shared->target == CodeGenTarget::GLSL) + { + // Don't emit default parameter values when lowering to GLSL + } + else + { + Emit(" = "); + EmitExpr(initExpr); + } } } -- cgit v1.2.3