gpu: add BindGroup.Descriptor

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-16 20:28:47 -07:00 committed by Stephen Gutekanst
parent 82bff3e9b4
commit 4fd4c5db7e
2 changed files with 9 additions and 8 deletions

View file

@ -1,11 +1,3 @@
pub const WGPUBindGroupDescriptor = extern struct {
next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
layout: BindGroupLayout,
entry_count: u32,
entries: [*]const BindGroupEntry,
};
pub const WGPUBindGroupLayoutEntry = extern struct {
next_in_chain: *const ChainedStruct,
binding: u32,

View file

@ -2,6 +2,7 @@ const Buffer = @import("buffer.zig").Buffer;
const Sampler = @import("sampler.zig").Sampler;
const TextureView = @import("texture_view.zig").TextureView;
const ChainedStruct = @import("types.zig").ChainedStruct;
const BindGroupLayout = @import("bind_group_layout.zig").BindGroupLayout;
pub const BindGroup = enum(usize) {
_,
@ -18,4 +19,12 @@ pub const BindGroup = enum(usize) {
sampler: Sampler = Sampler.none, // nullable
texture_view: TextureView = TextureView.none, // nullable
};
pub const Descriptor = extern struct {
next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
layout: BindGroupLayout,
entry_count: u32,
entries: [*]const Entry,
};
};