gpu: add Buffer.BindingLayout

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-15 00:44:53 -07:00 committed by Stephen Gutekanst
parent 2890aa48ea
commit 71ed3ad6f7
2 changed files with 8 additions and 7 deletions

View file

@ -1,10 +1,3 @@
typedef struct WGPUBufferBindingLayout {
WGPUChainedStruct const * nextInChain;
WGPUBufferBindingType type;
bool hasDynamicOffset;
uint64_t minBindingSize;
} WGPUBufferBindingLayout;
typedef struct WGPUBufferDescriptor {
WGPUChainedStruct const * nextInChain;
char const * label; // nullable

View file

@ -1,4 +1,5 @@
const std = @import("std");
const ChainedStruct = @import("types.zig").ChainedStruct;
pub const Buffer = enum(usize) {
_,
@ -48,4 +49,11 @@ pub const Buffer = enum(usize) {
return @truncate(u10, @bitCast(u32, a)) == @truncate(u10, @bitCast(u32, b));
}
};
pub const BindingLayout = extern struct {
next_in_chain: *const ChainedStruct,
type: BindingType,
has_dynamic_offset: bool = false,
min_binding_size: u64 = 0,
};
};