Rebind with proper dynamic offsets

This commit is contained in:
Dzmitry Malyshau committed 2019-07-22 00:16:29 -04:00
1 parent 7314eaf636
commit 41d0ce14d6
4 files changed
+63 -11

No files matched your search

+7 -4
View File
@@ -249,18 +249,21 @@ pub extern "C" fn wgpu_render_pass_set_bind_group(
pass.trackers.merge_extend(&bind_group.used);
if let Some((pipeline_layout_id, follow_up)) =
if let Some((pipeline_layout_id, follow_up_sets, follow_up_offsets)) =
pass.binder
.provide_entry(index as usize, bind_group_id, bind_group, offsets)
{
let bind_groups =
iter::once(bind_group.raw.raw()).chain(follow_up.map(|bg_id| bind_group_guard[bg_id].raw.raw()));
let bind_groups = iter::once(bind_group.raw.raw())
.chain(follow_up_sets.map(|bg_id| bind_group_guard[bg_id].raw.raw()));
unsafe {
pass.raw.bind_graphics_descriptor_sets(
&&pipeline_layout_guard[pipeline_layout_id].raw,
index as usize,
bind_groups,
offsets.iter().map(|&off| off as hal::command::DescriptorSetOffset),
offsets
.iter()
.chain(follow_up_offsets)
.map(|&off| off as hal::command::DescriptorSetOffset),
);
}
};