Skip to content

Commit

Permalink
remove redundant code in module interface validation
Browse files Browse the repository at this point in the history
`TypeInner.size()` already handles the array case
  • Loading branch information
teoxoy authored and ErichDonGubler committed May 28, 2024
1 parent 89a0ebf commit b5b39f6
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions wgpu-core/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,15 +915,6 @@ impl Interface {
class,
},
naga::TypeInner::Sampler { comparison } => ResourceType::Sampler { comparison },
naga::TypeInner::Array { stride, size, .. } => {
let size = match size {
naga::ArraySize::Constant(size) => size.get() * stride,
naga::ArraySize::Dynamic => stride,
};
ResourceType::Buffer {
size: wgt::BufferSize::new(size as u64).unwrap(),
}
}
ref other => ResourceType::Buffer {
size: wgt::BufferSize::new(other.size(module.to_ctx()) as u64).unwrap(),
},
Expand Down

0 comments on commit b5b39f6

Please sign in to comment.