gpu: add QuerySet.destroy
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
3c44baa863
commit
181e0a19f5
2 changed files with 11 additions and 2 deletions
|
|
@ -716,6 +716,11 @@ const query_set_vtable = QuerySet.VTable{
|
|||
c.wgpuQuerySetSetLabel(@ptrCast(c.WGPUQuerySet, ptr), label);
|
||||
}
|
||||
}).setLabel,
|
||||
.destroy = (struct {
|
||||
pub fn destroy(ptr: *anyopaque) void {
|
||||
c.wgpuQuerySetDestroy(@ptrCast(c.WGPUQuerySet, ptr));
|
||||
}
|
||||
}).destroy,
|
||||
};
|
||||
|
||||
fn wrapPipelineLayout(layout: c.WGPUPipelineLayout) PipelineLayout {
|
||||
|
|
|
|||
|
|
@ -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 wgpuQuerySetDestroy(WGPUQuerySet querySet);
|
||||
destroy: fn (ptr: *anyopaque) void,
|
||||
setLabel: fn (ptr: *anyopaque, label: [:0]const u8) void,
|
||||
};
|
||||
|
||||
|
|
@ -25,8 +24,13 @@ pub inline fn setLabel(qset: QuerySet, label: [:0]const u8) void {
|
|||
qset.vtable.setLabel(qset.ptr, label);
|
||||
}
|
||||
|
||||
pub inline fn destroy(qset: QuerySet) void {
|
||||
qset.vtable.destroy(qset.ptr);
|
||||
}
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
_ = release;
|
||||
_ = destroy;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue