gpu: convert BindGroupLayout from enum(usize) to *opaque
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
f7df77e2d2
commit
48dbfc9f55
1 changed files with 16 additions and 21 deletions
|
|
@ -5,26 +5,21 @@ const Sampler = @import("sampler.zig").Sampler;
|
|||
const Texture = @import("texture.zig").Texture;
|
||||
const StorageTextureBindingLayout = @import("types.zig").StorageTextureBindingLayout;
|
||||
|
||||
pub const BindGroupLayout = enum(usize) {
|
||||
_,
|
||||
pub const BindGroupLayout = *opaque {};
|
||||
|
||||
// TODO: verify there is a use case for nullable value of this type.
|
||||
pub const none: BindGroupLayout = @intToEnum(BindGroupLayout, 0);
|
||||
|
||||
pub const Entry = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
binding: u32,
|
||||
visibility: ShaderStageFlags,
|
||||
buffer: Buffer.BindingLayout,
|
||||
sampler: Sampler.BindingLayout,
|
||||
texture: Texture.BindingLayout,
|
||||
storage_texture: StorageTextureBindingLayout,
|
||||
};
|
||||
|
||||
pub const Descriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
entry_count: u32,
|
||||
entries: [*]const Entry,
|
||||
};
|
||||
pub const BindGroupLayoutEntry = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
binding: u32,
|
||||
visibility: ShaderStageFlags,
|
||||
buffer: Buffer.BindingLayout,
|
||||
sampler: Sampler.BindingLayout,
|
||||
texture: Texture.BindingLayout,
|
||||
storage_texture: StorageTextureBindingLayout,
|
||||
};
|
||||
|
||||
pub const BindGroupLayoutDescriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
entry_count: u32,
|
||||
entries: [*]const BindGroupLayoutEntry,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue