mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 07:21:04 +01:00
Add support for gaps in bind group layouts & update relevant validation (#9034)
* [wgpu-core] add support for optional BG & BGL entries * [wgpu] allow gaps in bind group layouts And allow unbinding in the web backend. * adapt tests * add changelog entry * [wgpu] remove generic from `PipelineLayoutDescriptor`
This commit is contained in:
1 parent
aad2a00f4d
commit
e114d2f0a7
90 files changed
+567
-397
No files matched your search
+2
-2
@@ -214,11 +214,11 @@ impl Player {
|
||||
.expect("invalid bind group layout");
|
||||
}
|
||||
Action::CreatePipelineLayout(id, desc) => {
|
||||
let bind_group_layouts: Vec<Arc<wgc::binding_model::BindGroupLayout>> = desc
|
||||
let bind_group_layouts: Vec<_> = desc
|
||||
.bind_group_layouts
|
||||
.to_vec()
|
||||
.into_iter()
|
||||
.map(|bgl_id| self.resolve_bind_group_layout_id(bgl_id))
|
||||
.map(|bgl_id| bgl_id.map(|bgl_id| self.resolve_bind_group_layout_id(bgl_id)))
|
||||
.collect();
|
||||
|
||||
let resolved_desc = wgc::binding_model::ResolvedPipelineLayoutDescriptor {
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
CreatePipelineLayout(PointerId(0x10), (
|
||||
label: Some("empty"),
|
||||
bind_group_layouts: [
|
||||
PointerId(0x10),
|
||||
Some(PointerId(0x10)),
|
||||
],
|
||||
immediate_size: 0,
|
||||
)),
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
CreatePipelineLayout(PointerId(0x10), (
|
||||
label: None,
|
||||
bind_group_layouts: [
|
||||
PointerId(0x10),
|
||||
Some(PointerId(0x10)),
|
||||
],
|
||||
immediate_size: 0,
|
||||
)),
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
CreatePipelineLayout(PointerId(0x10), (
|
||||
label: None,
|
||||
bind_group_layouts: [
|
||||
PointerId(0x10),
|
||||
Some(PointerId(0x10)),
|
||||
],
|
||||
immediate_size: 0,
|
||||
)),
|
||||
|
||||
Reference in new issue
Block a user