mirror of
https://github.com/storytold/wgpu.git
synced 2026-12-01 10:34:57 +01:00
remove redundant code in module interface validation
`TypeInner.size()` already handles the array case
This commit is contained in:
1 parent
89a0ebfbd6
commit
b5b39f670d
1 file changed
-9
@@ -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(),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user