From eda078d736a906b4267e4803db6b32e3162aac30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Capucho?= Date: Wed, 10 Nov 2021 17:16:19 +0000 Subject: [PATCH] [glsl-in] Allow more operations as access bases (#1521) --- src/front/glsl/context.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/front/glsl/context.rs b/src/front/glsl/context.rs index 6729c6f796..dd2f738747 100644 --- a/src/front/glsl/context.rs +++ b/src/front/glsl/context.rs @@ -492,10 +492,10 @@ impl Context { parser.field_selection(self, ExprPos::Lhs == pos, body, base, field, meta)? } - HirExprKind::Constant(constant) if pos == ExprPos::Rhs => { + HirExprKind::Constant(constant) if pos != ExprPos::Lhs => { self.add_expression(Expression::Constant(constant), meta, body) } - HirExprKind::Binary { left, op, right } if pos == ExprPos::Rhs => { + HirExprKind::Binary { left, op, right } if pos != ExprPos::Lhs => { let (mut left, left_meta) = self.lower_expect_inner(stmt, parser, left, pos, body)?; let (mut right, right_meta) = @@ -599,7 +599,7 @@ impl Context { _ => self.add_expression(Expression::Binary { left, op, right }, meta, body), } } - HirExprKind::Unary { op, expr } if pos == ExprPos::Rhs => { + HirExprKind::Unary { op, expr } if pos != ExprPos::Lhs => { let expr = self.lower_expect_inner(stmt, parser, expr, pos, body)?.0; self.add_expression(Expression::Unary { op, expr }, meta, body)