gpu: implement BindGroupLayout
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
3d3fdcde0d
commit
66504ca724
1 changed files with 27 additions and 0 deletions
27
gpu/src/BindGroupLayout.zig
Normal file
27
gpu/src/BindGroupLayout.zig
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
const BindGroupLayout = @This();
|
||||
|
||||
/// The type erased pointer to the BindGroupLayout implementation
|
||||
/// Equal to c.WGPUBindGroupLayout for NativeInstance.
|
||||
ptr: *anyopaque,
|
||||
vtable: *const VTable,
|
||||
|
||||
pub const VTable = struct {
|
||||
reference: fn (ptr: *anyopaque) void,
|
||||
release: fn (ptr: *anyopaque) void,
|
||||
// TODO:
|
||||
// WGPU_EXPORT void wgpuBindGroupLayoutSetLabel(WGPUBindGroupLayout bindGroupLayout, char const * label);
|
||||
};
|
||||
|
||||
pub inline fn reference(layout: BindGroupLayout) void {
|
||||
layout.vtable.reference(layout.ptr);
|
||||
}
|
||||
|
||||
pub inline fn release(layout: BindGroupLayout) void {
|
||||
layout.vtable.release(layout.ptr);
|
||||
}
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
_ = release;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue