mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 00:41:07 +01:00
[valid] allow dynamic access into vectors
This commit is contained in:
1 parent
e57d877dbc
commit
53627c5cd8
1 file changed
+5
@@ -93,6 +93,11 @@ impl Typifier {
|
||||
Ok(match *expr {
|
||||
crate::Expression::Access { base, .. } => match *self.get(base, types) {
|
||||
crate::TypeInner::Array { base, .. } => Resolution::Handle(base),
|
||||
crate::TypeInner::Vector {
|
||||
size: _,
|
||||
kind,
|
||||
width,
|
||||
} => Resolution::Value(crate::TypeInner::Scalar { kind, width }),
|
||||
ref other => panic!("Can't access into {:?}", other),
|
||||
},
|
||||
crate::Expression::AccessIndex { base, index } => match *self.get(base, types) {
|
||||
|
||||
Reference in new issue
Block a user