gpu: implement Device.loseForTesting

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-18 17:59:06 -07:00 committed by Stephen Gutekanst
parent 85d5de1077
commit 311f2967a5
2 changed files with 11 additions and 2 deletions

View file

@ -327,6 +327,11 @@ const device_vtable = Device.VTable{
c.wgpuDeviceInjectError(@ptrCast(c.WGPUDevice, ptr), @enumToInt(typ), message);
}
}).injectError,
.loseForTesting = (struct {
pub fn loseForTesting(ptr: *anyopaque) void {
c.wgpuDeviceLoseForTesting(@ptrCast(c.WGPUDevice, ptr));
}
}).loseForTesting,
.createBindGroup = (struct {
pub fn createBindGroup(ptr: *anyopaque, descriptor: *const BindGroup.Descriptor) BindGroup {
var few_entries: [16]c.WGPUBindGroupEntry = undefined;