remove redundant code in module interface validation

`TypeInner.size()` already handles the array case
This commit is contained in:
Teodor Tanasoaia 2024-05-22 15:49:32 +02:00 committed by Erich Gubler
parent 89a0ebfbd6
commit b5b39f670d

View File

@ -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(),
},