244: Fix bind groups set on a compute encoder r=kvark a=kvark

Fixes #243

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
bors[bot] 2019-07-03 14:23:42 +00:00
commit 8af0fa824b

View File

@ -65,7 +65,12 @@ pub extern "C" fn wgpu_compute_pass_set_bind_group(
let mut pass_guard = HUB.compute_passes.write(); let mut pass_guard = HUB.compute_passes.write();
let pass = &mut pass_guard[pass_id]; let pass = &mut pass_guard[pass_id];
let bind_group_guard = HUB.bind_groups.read(); let bind_group_guard = HUB.bind_groups.read();
let bind_group = &bind_group_guard[bind_group_id];
let bind_group = pass
.trackers
.bind_groups
.use_extend(&*bind_group_guard, bind_group_id, (), ())
.unwrap();
assert_eq!(bind_group.dynamic_count, offsets_length); assert_eq!(bind_group.dynamic_count, offsets_length);
let offsets = if offsets_length != 0 { let offsets = if offsets_length != 0 {