mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[glsl-in] Allow more operations as access bases (#1521)
This commit is contained in:
@@ -492,10 +492,10 @@ impl Context {
|
|||||||
|
|
||||||
parser.field_selection(self, ExprPos::Lhs == pos, body, base, field, meta)?
|
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)
|
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) =
|
let (mut left, left_meta) =
|
||||||
self.lower_expect_inner(stmt, parser, left, pos, body)?;
|
self.lower_expect_inner(stmt, parser, left, pos, body)?;
|
||||||
let (mut right, right_meta) =
|
let (mut right, right_meta) =
|
||||||
@@ -599,7 +599,7 @@ impl Context {
|
|||||||
_ => self.add_expression(Expression::Binary { left, op, right }, meta, body),
|
_ => 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;
|
let expr = self.lower_expect_inner(stmt, parser, expr, pos, body)?.0;
|
||||||
|
|
||||||
self.add_expression(Expression::Unary { op, expr }, meta, body)
|
self.add_expression(Expression::Unary { op, expr }, meta, body)
|
||||||
|
|||||||
Reference in New Issue
Block a user