mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
fix(const_eval): use component count, not arg. count, for component-wise iter.
This commit is contained in:
committed by
Teodor Tanasoaia
parent
a0862aabb4
commit
2ee7604307
@@ -97,7 +97,7 @@ macro_rules! gen_component_wise_extractor {
|
||||
.and_then(|comps| Ok(handler(comps)?.into())),
|
||||
)+
|
||||
&Expression::Compose { ty, ref components } => match &eval.types[ty].inner {
|
||||
&TypeInner::Vector { size: _, scalar } => match scalar.kind {
|
||||
&TypeInner::Vector { size, scalar } => match scalar.kind {
|
||||
$(ScalarKind::$scalar_kind)|* => {
|
||||
let first_ty = ty;
|
||||
let mut component_groups =
|
||||
@@ -132,7 +132,7 @@ macro_rules! gen_component_wise_extractor {
|
||||
let component_groups = component_groups.into_inner().unwrap();
|
||||
let mut new_components =
|
||||
ArrayVec::<_, { crate::VectorSize::MAX }>::new();
|
||||
for idx in 0..N {
|
||||
for idx in 0..(size as u8).into() {
|
||||
let group = component_groups
|
||||
.iter()
|
||||
.map(|cs| cs[idx])
|
||||
|
||||
Reference in New Issue
Block a user