WebGPU Headers
The WebGPU C API
 
All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
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, WGPUStringView message, 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 1325 of file webgpu.h.

◆ WGPUCompilationInfoCallback

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

See also Callback Error.

Parameters
compilationInfoThis argument contains multiple Implementation-Allocated Struct Chain roots. Arbitrary chains must be handled gracefully by the application! This parameter is Passed without Ownership.

Definition at line 1335 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 1343 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 1351 of file webgpu.h.

◆ WGPUDeviceLostCallback

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

See also Callback Error.

Parameters
devicePointer to the device which was lost. This is always a non-null pointer. The pointed-to WGPUDevice will be null if, and only if, either: (1) The reason is WGPUDeviceLostReason_FailedCreation. (2) The last ref of the device has been (or is being) released: see Releasing a Device object. This parameter is Passed without Ownership.
messageThis parameter is Passed without Ownership.

Definition at line 1366 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 status is not WGPUPopErrorScopeStatus_Success or 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 1385 of file webgpu.h.

◆ WGPUQueueWorkDoneCallback

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

See also Callback Error.

Parameters
statusSee WGPUQueueWorkDoneStatus.
messageIf the status is not WGPUQueueWorkDoneStatus_Success, 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 1399 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 1410 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 1421 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 1432 of file webgpu.h.