mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 17:02:32 +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,
|
class,
|
||||||
},
|
},
|
||||||
naga::TypeInner::Sampler { comparison } => ResourceType::Sampler { comparison },
|
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 {
|
ref other => ResourceType::Buffer {
|
||||||
size: wgt::BufferSize::new(other.size(module.to_ctx()) as u64).unwrap(),
|
size: wgt::BufferSize::new(other.size(module.to_ctx()) as u64).unwrap(),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user