mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
wgpu: remove mode field of uncaptured error callback info
This commit is contained in:
Vendored
+12
-1
@@ -84,6 +84,7 @@ class WebGPUInterface {
|
|||||||
Origin3D: [12, 4],
|
Origin3D: [12, 4],
|
||||||
QueueDescriptor: [this.mem.intSize*3, this.mem.intSize],
|
QueueDescriptor: [this.mem.intSize*3, this.mem.intSize],
|
||||||
CallbackInfo: [20, 4],
|
CallbackInfo: [20, 4],
|
||||||
|
UncapturedErrorCallbackInfo: [16, 4],
|
||||||
RenderPassColorAttachment: [56, 8],
|
RenderPassColorAttachment: [56, 8],
|
||||||
BindGroupEntry: [40, 8],
|
BindGroupEntry: [40, 8],
|
||||||
BindGroupLayoutEntry: [80, 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) {
|
callCallback(callback, args) {
|
||||||
args.push(callback.userdata1);
|
args.push(callback.userdata1);
|
||||||
args.push(callback.userdata2);
|
args.push(callback.userdata2);
|
||||||
@@ -1195,7 +1206,7 @@ class WebGPUInterface {
|
|||||||
const callbackInfo = this.CallbackInfo(callbackInfoPtr);
|
const callbackInfo = this.CallbackInfo(callbackInfoPtr);
|
||||||
|
|
||||||
const deviceLostCallbackInfo = this.CallbackInfo(off(this.sizes.CallbackInfo));
|
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)
|
adapter.requestDevice(descriptor)
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|||||||
Vendored
-1
@@ -853,7 +853,6 @@ RequestDeviceCallbackInfo :: struct {
|
|||||||
|
|
||||||
UncapturedErrorCallbackInfo :: struct {
|
UncapturedErrorCallbackInfo :: struct {
|
||||||
nextInChain: ^ChainedStructOut,
|
nextInChain: ^ChainedStructOut,
|
||||||
mode: CallbackMode,
|
|
||||||
callback: UncapturedErrorCallback,
|
callback: UncapturedErrorCallback,
|
||||||
userdata1: rawptr,
|
userdata1: rawptr,
|
||||||
userdata2: rawptr,
|
userdata2: rawptr,
|
||||||
|
|||||||
Reference in New Issue
Block a user