WebGPU Headers
The WebGPU C API
 
Loading...
Searching...
No Matches
Callbacks

Callbacks through which asynchronous functions return. More...

Typedefs

typedef void(* WGPUBufferMapCallback) (WGPUMapAsyncStatus status, WGPUStringView message, void *userdata1, void *userdata2)
 
typedef void(* WGPUCompilationInfoCallback) (WGPUCompilationInfoRequestStatus status, struct WGPUCompilationInfo const *compilationInfo, void *userdata1, void *userdata2)
 
typedef void(* WGPUCreateComputePipelineAsyncCallback) (WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, WGPUStringView message, void *userdata1, void *userdata2)
 
typedef void(* WGPUCreateRenderPipelineAsyncCallback) (WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, WGPUStringView message, void *userdata1, void *userdata2)
 
typedef void(* WGPUDeviceLostCallback) (WGPUDevice const *device, WGPUDeviceLostReason reason, WGPUStringView message, void *userdata1, void *userdata2)
 
typedef void(* WGPUPopErrorScopeCallback) (WGPUPopErrorScopeStatus status, WGPUErrorType type, WGPUStringView message, void *userdata1, void *userdata2)
 
typedef void(* WGPUQueueWorkDoneCallback) (WGPUQueueWorkDoneStatus status, void *userdata1, void *userdata2)
 
typedef void(* WGPURequestAdapterCallback) (WGPURequestAdapterStatus status, WGPUAdapter adapter, WGPUStringView message, void *userdata1, void *userdata2)
 
typedef void(* WGPURequestDeviceCallback) (WGPURequestDeviceStatus status, WGPUDevice device, WGPUStringView message, void *userdata1, void *userdata2)
 
typedef void(* WGPUUncapturedErrorCallback) (WGPUDevice const *device, WGPUErrorType type, WGPUStringView message, void *userdata1, void *userdata2)
 

Detailed Description

Callbacks through which asynchronous functions return.

Typedef Documentation

◆ WGPUBufferMapCallback

typedef void(* WGPUBufferMapCallback) (WGPUMapAsyncStatus status, WGPUStringView message, void *userdata1, void *userdata2)

See also Callback Error.

Parameters
messageThis parameter is Passed without Ownership.

Definition at line 1199 of file webgpu.h.

◆ WGPUCompilationInfoCallback

typedef void(* WGPUCompilationInfoCallback) (WGPUCompilationInfoRequestStatus status, struct WGPUCompilationInfo const *compilationInfo, void *userdata1, void *userdata2)

See also Callback Error.

Parameters
compilationInfoThis parameter is Passed without Ownership.

Definition at line 1206 of file webgpu.h.

◆ WGPUCreateComputePipelineAsyncCallback

typedef void(* WGPUCreateComputePipelineAsyncCallback) (WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, WGPUStringView message, void *userdata1, void *userdata2)

See also Callback Error.

Parameters
pipelineThis parameter is Passed with Ownership.

Definition at line 1213 of file webgpu.h.

◆ WGPUCreateRenderPipelineAsyncCallback

typedef void(* WGPUCreateRenderPipelineAsyncCallback) (WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, WGPUStringView message, void *userdata1, void *userdata2)

See also Callback Error.

Parameters
pipelineThis parameter is Passed with Ownership.

Definition at line 1220 of file webgpu.h.

◆ WGPUDeviceLostCallback

typedef void(* WGPUDeviceLostCallback) (WGPUDevice const *device, WGPUDeviceLostReason reason, WGPUStringView message, void *userdata1, void *userdata2)

See also Callback Error.

Parameters
deviceReference to the device which was lost. If, and only if, the reason is WGPUDeviceLostReason_FailedCreation, this is a non-null pointer to a null WGPUDevice. This parameter is Passed without Ownership.
messageThis parameter is Passed without Ownership.

Definition at line 1231 of file webgpu.h.

◆ WGPUPopErrorScopeCallback

typedef void(* WGPUPopErrorScopeCallback) (WGPUPopErrorScopeStatus status, WGPUErrorType type, WGPUStringView message, void *userdata1, void *userdata2)

See also Callback Error.

Parameters
statusSee WGPUPopErrorScopeStatus.
typeThe type of the error caught by the scope, or WGPUErrorType_NoError if there was none. If the status is not WGPUPopErrorScopeStatus_Success, this is WGPUErrorType_NoError.
messageIf the type is not WGPUErrorType_NoError, this is a non-empty Localizable Human-Readable Message String; otherwise, this is an empty string. This parameter is Passed without Ownership.

Definition at line 1247 of file webgpu.h.

◆ WGPUQueueWorkDoneCallback

typedef void(* WGPUQueueWorkDoneCallback) (WGPUQueueWorkDoneStatus status, void *userdata1, void *userdata2)

See also Callback Error.

Definition at line 1251 of file webgpu.h.

◆ WGPURequestAdapterCallback

typedef void(* WGPURequestAdapterCallback) (WGPURequestAdapterStatus status, WGPUAdapter adapter, WGPUStringView message, void *userdata1, void *userdata2)

See also Callback Error.

Parameters
adapterThis parameter is Passed with Ownership.
messageThis parameter is Passed without Ownership.

Definition at line 1261 of file webgpu.h.

◆ WGPURequestDeviceCallback

typedef void(* WGPURequestDeviceCallback) (WGPURequestDeviceStatus status, WGPUDevice device, WGPUStringView message, void *userdata1, void *userdata2)

See also Callback Error.

Parameters
deviceThis parameter is Passed with Ownership.
messageThis parameter is Passed without Ownership.

Definition at line 1271 of file webgpu.h.

◆ WGPUUncapturedErrorCallback

typedef void(* WGPUUncapturedErrorCallback) (WGPUDevice const *device, WGPUErrorType type, WGPUStringView message, void *userdata1, void *userdata2)

See also Callback Error.

Parameters
deviceThis parameter is Passed without Ownership.
messageThis parameter is Passed without Ownership.

Definition at line 1281 of file webgpu.h.