mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 17:01:15 +01:00
Merge #352
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:
commit
50acc2909c
3 files changed
+4
-3
No files matched your search
@@ -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]>,
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user