gpu: add Sampler.setLabel
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
acbb008492
commit
c90f22811d
2 changed files with 10 additions and 2 deletions
|
|
@ -8,8 +8,7 @@ vtable: *const VTable,
|
|||
pub const VTable = struct {
|
||||
reference: fn (ptr: *anyopaque) void,
|
||||
release: fn (ptr: *anyopaque) void,
|
||||
// TODO:
|
||||
// WGPU_EXPORT void wgpuSamplerSetLabel(WGPUSampler sampler, char const * label);
|
||||
setLabel: fn (ptr: *anyopaque, label: [:0]const u8) void,
|
||||
};
|
||||
|
||||
pub inline fn reference(sampler: Sampler) void {
|
||||
|
|
@ -20,6 +19,10 @@ pub inline fn release(sampler: Sampler) void {
|
|||
sampler.vtable.release(sampler.ptr);
|
||||
}
|
||||
|
||||
pub inline fn setLabel(sampler: Sampler, label: [:0]const u8) void {
|
||||
sampler.vtable.setLabel(sampler.ptr, label);
|
||||
}
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue