mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
remove redundant code in module interface validation
`TypeInner.size()` already handles the array case
This commit is contained in:
parent
89a0ebfbd6
commit
b5b39f670d
@ -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(),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user