diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2025-02-27 18:31:32 +0100 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2025-02-27 18:31:32 +0100 |
| commit | 1cb28f7f73b093fb7042e9cd3d94713e6c904436 (patch) | |
| tree | ad4b34bf3039891980ac607ef9fe4ad9d859d1e0 /vendor/wgpu | |
| parent | 30f65372de99236b980d689510784552c407dcd7 (diff) | |
wgpu: remove mode field of uncaptured error callback info
Diffstat (limited to 'vendor/wgpu')
| -rw-r--r-- | vendor/wgpu/wgpu.js | 13 | ||||
| -rw-r--r-- | vendor/wgpu/wgpu.odin | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/vendor/wgpu/wgpu.js b/vendor/wgpu/wgpu.js index 12df561d5..e389b1e4d 100644 --- a/vendor/wgpu/wgpu.js +++ b/vendor/wgpu/wgpu.js @@ -84,6 +84,7 @@ class WebGPUInterface { Origin3D: [12, 4], QueueDescriptor: [this.mem.intSize*3, this.mem.intSize], CallbackInfo: [20, 4], + UncapturedErrorCallbackInfo: [16, 4], RenderPassColorAttachment: [56, 8], BindGroupEntry: [40, 8], BindGroupLayoutEntry: [80, 8], @@ -1053,6 +1054,16 @@ class WebGPUInterface { }; } + UncapturedErrorCallbackInfo(start) { + const off = this.struct(start); + off(4); + return { + callback: this.mem.exports.__indirect_function_table.get(this.mem.loadPtr(off(4))), + userdata1: this.mem.loadPtr(off(4)), + userdata2: this.mem.loadPtr(off(4)), + }; + } + callCallback(callback, args) { args.push(callback.userdata1); args.push(callback.userdata2); @@ -1195,7 +1206,7 @@ class WebGPUInterface { const callbackInfo = this.CallbackInfo(callbackInfoPtr); const deviceLostCallbackInfo = this.CallbackInfo(off(this.sizes.CallbackInfo)); - const uncapturedErrorCallbackInfo = this.CallbackInfo(off(this.sizes.CallbackInfo)); + const uncapturedErrorCallbackInfo = this.UncapturedErrorCallbackInfo(off(this.sizes.UncapturedErrorCallbackInfo)); adapter.requestDevice(descriptor) .catch((e) => { diff --git a/vendor/wgpu/wgpu.odin b/vendor/wgpu/wgpu.odin index 94612bf62..8dfbaa5c6 100644 --- a/vendor/wgpu/wgpu.odin +++ b/vendor/wgpu/wgpu.odin @@ -853,7 +853,6 @@ RequestDeviceCallbackInfo :: struct { UncapturedErrorCallbackInfo :: struct { nextInChain: ^ChainedStructOut, - mode: CallbackMode, callback: UncapturedErrorCallback, userdata1: rawptr, userdata2: rawptr, |