gpu: implement Adapter.reference, Adapter.release
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
77b16a3671
commit
a1c9fe6897
2 changed files with 22 additions and 3 deletions
|
|
@ -210,7 +210,18 @@ fn wrapAdapter(adapter: c.WGPUAdapter) Adapter {
|
|||
};
|
||||
}
|
||||
|
||||
const adapter_vtable = Adapter.VTable{};
|
||||
const adapter_vtable = Adapter.VTable{
|
||||
.reference = (struct {
|
||||
pub fn reference(ptr: *anyopaque) void {
|
||||
c.wgpuAdapterReference(@ptrCast(c.WGPUAdapter, ptr));
|
||||
}
|
||||
}).reference,
|
||||
.release = (struct {
|
||||
pub fn release(ptr: *anyopaque) void {
|
||||
c.wgpuAdapterRelease(@ptrCast(c.WGPUAdapter, ptr));
|
||||
}
|
||||
}).release,
|
||||
};
|
||||
|
||||
// TODO: implement Device interface
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue