gpu: add ExternalTexture.destroy
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
cd2dc0c2e8
commit
3c44baa863
2 changed files with 13 additions and 4 deletions
|
|
@ -379,7 +379,7 @@ const device_vtable = Device.VTable{
|
|||
}).nativeCreateSwapChain,
|
||||
.destroy = (struct {
|
||||
pub fn destroy(ptr: *anyopaque) void {
|
||||
c.wgpuDeviceDestroy(@ptrCast(c.WGPUDestroy, ptr));
|
||||
c.wgpuDeviceDestroy(@ptrCast(c.WGPUDevice, ptr));
|
||||
}
|
||||
}).destroy,
|
||||
};
|
||||
|
|
@ -766,6 +766,11 @@ const external_texture_vtable = ExternalTexture.VTable{
|
|||
c.wgpuExternalTextureSetLabel(@ptrCast(c.WGPUExternalTexture, ptr), label);
|
||||
}
|
||||
}).setLabel,
|
||||
.destroy = (struct {
|
||||
pub fn destroy(ptr: *anyopaque) void {
|
||||
c.wgpuExternalTextureDestroy(@ptrCast(c.WGPUExternalTexture, ptr));
|
||||
}
|
||||
}).destroy,
|
||||
};
|
||||
|
||||
fn wrapBindGroup(group: c.WGPUBindGroup) BindGroup {
|
||||
|
|
@ -843,7 +848,7 @@ const buffer_vtable = Buffer.VTable{
|
|||
}).setLabel,
|
||||
.destroy = (struct {
|
||||
pub fn destroy(ptr: *anyopaque) void {
|
||||
c.wgpuBufferDestroy(@ptrCast(c.WGPUDestroy, ptr));
|
||||
c.wgpuBufferDestroy(@ptrCast(c.WGPUBuffer, ptr));
|
||||
}
|
||||
}).destroy,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue