mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 16:31:11 +01:00
Remote example and improved header, tested on CI
This commit is contained in:
1 parent
5ec6f35368
commit
52ee3e019c
21 files changed
+450
-57
No files matched your search
@@ -224,13 +224,23 @@ pub extern "C" fn wgpu_render_pass_set_bind_group(
|
||||
pass_id: RenderPassId,
|
||||
index: u32,
|
||||
bind_group_id: BindGroupId,
|
||||
offsets: &[u32],
|
||||
offsets_ptr: *const u32,
|
||||
offsets_count: usize,
|
||||
) {
|
||||
let mut pass_guard = HUB.render_passes.write();
|
||||
let pass = &mut pass_guard[pass_id];
|
||||
let bind_group_guard = HUB.bind_groups.read();
|
||||
let bind_group = &bind_group_guard[bind_group_id];
|
||||
|
||||
assert_eq!(bind_group.dynamic_count, offsets_count);
|
||||
let offsets = if offsets_count != 0 {
|
||||
unsafe {
|
||||
slice::from_raw_parts(offsets_ptr, offsets_count)
|
||||
}
|
||||
} else {
|
||||
&[]
|
||||
};
|
||||
|
||||
pass.trackers.consume_by_extend(&bind_group.used);
|
||||
|
||||
if let Some((pipeline_layout_id, follow_up)) =
|
||||
|
||||
Reference in new issue
Block a user