mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[valid] allow dynamic access into vectors
This commit is contained in:
committed by
Dzmitry Malyshau
parent
e57d877dbc
commit
53627c5cd8
@@ -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