gpu: convert BindGroup from enum(usize) to *opaque
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
48dbfc9f55
commit
9b28403d9d
1 changed files with 17 additions and 22 deletions
|
|
@ -4,13 +4,9 @@ const TextureView = @import("texture_view.zig").TextureView;
|
||||||
const ChainedStruct = @import("types.zig").ChainedStruct;
|
const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||||
const BindGroupLayout = @import("bind_group_layout.zig").BindGroupLayout;
|
const BindGroupLayout = @import("bind_group_layout.zig").BindGroupLayout;
|
||||||
|
|
||||||
pub const BindGroup = enum(usize) {
|
pub const BindGroup = *opaque {};
|
||||||
_,
|
|
||||||
|
|
||||||
// TODO: verify there is a use case for nullable value of this type.
|
pub const BindGroupEntry = extern struct {
|
||||||
pub const none: BindGroup = @intToEnum(BindGroup, 0);
|
|
||||||
|
|
||||||
pub const Entry = extern struct {
|
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
binding: u32,
|
binding: u32,
|
||||||
buffer: Buffer = Buffer.none, // nullable
|
buffer: Buffer = Buffer.none, // nullable
|
||||||
|
|
@ -20,11 +16,10 @@ pub const BindGroup = enum(usize) {
|
||||||
texture_view: TextureView = TextureView.none, // nullable
|
texture_view: TextureView = TextureView.none, // nullable
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Descriptor = extern struct {
|
pub const BindGroupDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
layout: BindGroupLayout,
|
layout: BindGroupLayout,
|
||||||
entry_count: u32,
|
entry_count: u32,
|
||||||
entries: [*]const Entry,
|
entries: [*]const BindGroupEntry,
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue