mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Improve error message when bind group and bind group layout have different number of entries
This commit is contained in:
committed by
Dzmitry Malyshau
parent
83d49815ed
commit
e0485b49ac
@@ -1044,7 +1044,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
let (bind_group_layout_guard, mut token) = hub.bind_group_layouts.read(&mut token);
|
||||
let bind_group_layout = &bind_group_layout_guard[desc.layout];
|
||||
let entries = unsafe { slice::from_raw_parts(desc.entries, desc.entries_length) };
|
||||
assert_eq!(entries.len(), bind_group_layout.entries.len());
|
||||
assert_eq!(entries.len(), bind_group_layout.entries.len(), "Bind group has {} entries and bind group layout has {} entries, they should be the same.", entries.len(), bind_group_layout.entries.len());
|
||||
|
||||
let desc_set = unsafe {
|
||||
let mut desc_sets = ArrayVec::<[_; 1]>::new();
|
||||
|
||||
Reference in New Issue
Block a user