352: Fix compute pass resource binding r=kvark a=kvark

Follow-up to #348 
cc @grenlight @terrence2 

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
bors[bot]andDzmitry Malyshau authored and GitHub committed 2019-10-22 14:08:54 +00:00
commit 50acc2909c
3 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -138,7 +138,7 @@ impl BindGroupEntry {
}
}
#[derive(Default, Debug)]
#[derive(Debug)]
pub struct Binder {
pub(crate) pipeline_layout_id: Option<PipelineLayoutId>, //TODO: strongly `Stored`
pub(crate) entries: SmallVec<[BindGroupEntry; DEFAULT_BIND_GROUPS]>,
+2 -1
View File
@@ -39,11 +39,12 @@ impl<B: hal::Backend> ComputePass<B> {
raw: B::CommandBuffer,
cmb_id: Stored<CommandBufferId>,
trackers: TrackerSet,
max_bind_groups: u32,
) -> Self {
ComputePass {
raw,
cmb_id,
binder: Binder::default(),
binder: Binder::new(max_bind_groups),
trackers,
}
}
+1 -1
View File
@@ -745,7 +745,7 @@ pub fn command_encoder_begin_compute_pass<B: GfxBackend>(
ref_count: cmb.life_guard.ref_count.clone(),
};
let pass = ComputePass::new(raw, stored, trackers);
let pass = ComputePass::new(raw, stored, trackers, cmb.features.max_bind_groups);
hub.compute_passes
.register_identity(id_in, pass, &mut token)
}