mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 15:31:03 +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
@@ -379,7 +379,11 @@ impl GPUDevice {
|
||||
let bind_group_layouts = descriptor
|
||||
.bind_group_layouts
|
||||
.into_iter()
|
||||
.map(|bind_group_layout| bind_group_layout.id)
|
||||
.map(|bind_group_layout| {
|
||||
bind_group_layout
|
||||
.into_option()
|
||||
.map(|bind_group_layout| bind_group_layout.id)
|
||||
})
|
||||
.collect();
|
||||
|
||||
let wgpu_descriptor = wgpu_core::binding_model::PipelineLayoutDescriptor {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use deno_core::cppgc::Ptr;
|
||||
use deno_core::op2;
|
||||
use deno_core::webidl::Nullable;
|
||||
use deno_core::webidl::WebIdlInterfaceConverter;
|
||||
use deno_core::GarbageCollected;
|
||||
use deno_core::WebIDL;
|
||||
@@ -58,5 +59,5 @@ pub(crate) struct GPUPipelineLayoutDescriptor {
|
||||
pub label: String,
|
||||
|
||||
pub bind_group_layouts:
|
||||
Vec<Ptr<super::bind_group_layout::GPUBindGroupLayout>>,
|
||||
Vec<Nullable<Ptr<super::bind_group_layout::GPUBindGroupLayout>>>,
|
||||
}
|
||||
Reference in new issue
Block a user