Dusk WebGPU Documentation

C API Documentation

Constants

Value Description
WGPU_ARRAY_LAYER_COUNT_UNDEFINED Undefined value for array layer count. Providing undefined will cause a default value to be used.
WGPU_COPY_STRIDE_UNDEFINED Undefined value for copy stride. Providing undefined will cause a default value to be used.
WGPU_LIMIT_U32_UNDEFINED Undefined U32 limit value. Providing undefined will cause a default value to be used.
WGPU_LIMIT_U64_UNDEFINED Undefined U64 limit value. Providing undefined will cause a default value to be used.
WGPU_MIP_LEVEL_COUNT_UNDEFINED Undefined mip level count. Providing undefined will cause a default value to be used.
WGPU_STRIDE_UNDEFINED Undefined stride. Providing undefined will cause a default value to be used.
WGPU_WHOLE_MAP_SIZE Value representing size of entire map. Providing undefined will cause a default value to be used.
WGPU_WHOLE_SIZE Value representing the whole size value. Providing undefined will cause a default value to be used.

Enums

enum WGPUAdapterType

Provides information on the type of adapter.

Value Description
WGPUAdapterType_DiscreteGPU A separate discrete GPU adapter
WGPUAdapterType_IntegratedGPU An integrated GPU / CPU adapter
WGPUAdapterType_CPU A CPU adapter
WGPUAdapterType_Unknown A unknown adapter type

enum WGPUAddressMode

Describes the behaviour of the sampler if the sampler footprint extends beyond the bounds of the sampled texture.

See GPUAddressMode for more information.

Value Description
WGPUAddressMode_Repeat Texture coordinates wrap to the other side of the texture
WGPUAddressMode_MirrorRepeat Texture coordinates wrap to the other side of the texture, but the texture is flipped when the integer part of the coordinate is odd.
WGPUAddressMode_ClampToEdge Texture coordinates are clamped between 0.0 and 1.0, inclusive.

enum WGPUAlphaMode

Selects how the contents of the surface will be interpreted when read, when rendered to the screen or used as an image source.

See GPUCanvasAlphaMode for more information.

Value Description
WGPUAlphaMode_Premultiplied Read RBGA as premultipled: color values are premultipled by their alpha value.
WGPUAlphaMode_Unpremultiplied Read RGBA as not premulitipled: Color values are not premultipled by their alpha value
WGPUAlphaMode_Opaque Read RGB as opaque and ignore alpha value

enum WGPUBackendType

Specifies the type of backend to use with Dawn.

Value Description
WGPUBackendType_Null A null backend
WGPUBackendType_WebGPU The WebGPU backend
WGPUBackendType_D3D11 The D3D11 backend
WGPUBackendType_D3D12 The D3D12 backend
WGPUBackendType_Metal The Metal backend
WGPUBackendType_Vulkan The Vulkan backend
WGPUBackendType_OpenGL The OpenGL backend
WGPUBackendType_OpenGLES The OpenGL ES backend

enum WGPUBlendFactor

Determines how a blend factor is calculated. This factor will be combined with the original color based on the selected blend operation.

See GPUBlendFactor for more information.

Value Description
WGPUBlendFactor_Zero Factor is set to zero.
(0, 0, 0, 0)
WGPUBlendFactor_One Factor is set to one.
(1, 1, 1, 1)
WGPUBlendFactor_Src Factor is set to the source values.
(R_src, G_src, B_src, A_src)
WGPUBlendFactor_OneMinusSrc Factor is set to one minus source value.
(1 - R_src, 1 - G_src, 1 - B_src, 1 - A_src)
WGPUBlendFactor_SrcAlpha Factor is set to the source alpha value.
(A_src, A_src, A_src, A_src)
WGPUBlendFactor_OneMinusSrcAlpha Factor is set to one minus the source alpha value.
(1 - A_src, 1 - A_src, 1 - A_src, 1 - A_src)
WGPUBlendFactor_Dst Factor is set to the destination value.
(R_dst, G_dst, B_dst, A_dst)
WGPUBlendFactor_OneMinusDst Factor is set to one minus destination value.
(1 - R_dst, 1 - G_dst, 1 - B_dst, 1 - A_dst)
WGPUBlendFactor_DstAlpha Factor is set to the destinatinon alpha value.
(A_dst, A_dst, A_dst, A_dst)
WGPUBlendFactor_OneMinusDstAlpha Factor is set to one minus the destionation alpha value.
(1 - A_dst, 1 - A_dst, 1 - A_dst, 1 - A_dst)
WGPUBlendFactor_SrcAlphaSaturated Factor is set to the source alpha value.
(A_src, A_src, A_src, A_src)
WGPUBlendFactor_Constant Factor is set to the constant value.
(See wgpuRenderPassEncoderSetBlendConstant for setting of the constant value.)
(R_const, G_const, B_const, A_const)
WGPUBlendFactor_OneMinusConstant Factor is set to one minus the constant value.
(See wgpuRenderPassEncoderSetBlendConstant for setting of the constant value.)
(1 - R_const, 1 - G_const, 1 - B_const, 1 - A_const)

enum WGPUBlendOperation

The algorithm used to blend source and destination colors.

See GPUBlendOperation for more information.

Value Description
WGPUBlendOperation_Add Adds the scaled source and scaled destination together.
(RGBA_src × RGBA_src_factor) + (RGBA_dst × RGBA_dst_factor)
WGPUBlendOperation_Subtract Subtracts the scaled destination from the scaled source.
(RGBA_src × RGBA_src_factor) - (RGBA_dst × RGBA_dst_factor)
WGPUBlendOperation_ReverseSubtract Subtracts the scaled source from the scaled destination.
(RGBA_dst × RGBA_dst_factor) - (RGBA_src × RGBA_src_factor)
WGPUBlendOperation_Min Takes the minimum of the source and destination.
min(RGBA_src, RGBA_dst)
WGPUBlendOperation_Max Takes the maximum of the source and destination.
max(RGBA_src, RGBA_dst)

enum WGPUBufferBindingType

Describes the address space and access mode for the buffer binding. The value used must match up to the address space and access mode set in the corresponding WGSL shader.

See GPUBufferBindingType for more information.

Value Description
WGPUBufferBindingType_Undefined Undefined binding. (Tags the binding as a non-buffer binding)
WGPUBufferBindingType_Uniform Binding in the uniform address space.
WGPUBufferBindingType_Storage Binding in the storage address space with read-write access mode.
WGPUBufferBindingType_ReadOnlyStorage Binding in the storage address space with read access mode.

enum WGPUBufferMapAsyncStatus

Value Description
WGPUBufferMapAsyncStatus_Success  
WGPUBufferMapAsyncStatus_Error  
WGPUBufferMapAsyncStatus_Unknown  
WGPUBufferMapAsyncStatus_DeviceLost  
WGPUBufferMapAsyncStatus_DestroyedBeforeCallback  
WGPUBufferMapAsyncStatus_UnmappedBeforeCallback  

enum WGPUBufferMapState

Value Description
WGPUBufferMapState_Unmapped  
WGPUBufferMapState_Pending  
WGPUBufferMapState_Mapped  

enum WGPUCompareFunction

Value Description
WGPUCompareFunction_Undefined  
WGPUCompareFunction_Never  
WGPUCompareFunction_Less  
WGPUCompareFunction_LessEqual  
WGPUCompareFunction_Greater  
WGPUCompareFunction_GreaterEqual  
WGPUCompareFunction_Equal  
WGPUCompareFunction_NotEqual  
WGPUCompareFunction_Always  

enum WGPUCompilationInfoRequestStatus

Value Description
WGPUCompilationInfoRequestStatus_Success  
WGPUCompilationInfoRequestStatus_Error  
WGPUCompilationInfoRequestStatus_DeviceLost  
WGPUCompilationInfoRequestStatus_Unknown  

enum WGPUCompilationMessageType

Value Description
WGPUCompilationMessageType_Error  
WGPUCompilationMessageType_Warning  
WGPUCompilationMessageType_Info  

enum WGPUComputePassTimestampLocation

Value Description
WGPUComputePassTimestampLocation_Beginning  
WGPUComputePassTimestampLocation_End  

enum WGPUCreatePipelineAsyncStatus

Value Description
WGPUCreatePipelineAsyncStatus_Success  
WGPUCreatePipelineAsyncStatus_Error  
WGPUCreatePipelineAsyncStatus_DeviceLost  
WGPUCreatePipelineAsyncStatus_DeviceDestroyed  
WGPUCreatePipelineAsyncStatus_Unknown  

enum WGPUCullMode

Value Description
WGPUCullMode_None  
WGPUCullMode_Front  
WGPUCullMode_Back  

enum WGPUDeviceLostReason

Value Description
WGPUDeviceLostReason_Undefined  
WGPUDeviceLostReason_Destroyed  

enum WGPUErrorFilter

Value Description
WGPUErrorFilter_Validation  
WGPUErrorFilter_OutOfMemory  
WGPUErrorFilter_Internal  

enum WGPUErrorType

Value Description
WGPUErrorType_NoError  
WGPUErrorType_Validation  
WGPUErrorType_OutOfMemory  
WGPUErrorType_Internal  
WGPUErrorType_Unknown  
WGPUErrorType_DeviceLost  

enum WGPUExternalTextureRotation

Value Description
WGPUExternalTextureRotation_Rotate0Degrees  
WGPUExternalTextureRotation_Rotate90Degrees  
WGPUExternalTextureRotation_Rotate180Degrees  
WGPUExternalTextureRotation_Rotate270Degrees  

enum WGPUFeatureName

Value Description
WGPUFeatureName_Undefined  
WGPUFeatureName_DepthClipControl  
WGPUFeatureName_Depth32FloatStencil8  
WGPUFeatureName_TimestampQuery  
WGPUFeatureName_PipelineStatisticsQuery  
WGPUFeatureName_TextureCompressionBC  
WGPUFeatureName_TextureCompressionETC2  
WGPUFeatureName_TextureCompressionASTC  
WGPUFeatureName_IndirectFirstInstance  
WGPUFeatureName_ShaderF16  
WGPUFeatureName_RG11B10UfloatRenderable  
WGPUFeatureName_DawnShaderFloat16  
WGPUFeatureName_DawnInternalUsages  
WGPUFeatureName_DawnMultiPlanarFormats  
WGPUFeatureName_DawnNative  
WGPUFeatureName_ChromiumExperimentalDp4a  
WGPUFeatureName_TimestampQueryInsidePasses  

enum WGPUFilterMode

Value Description
WGPUFilterMode_Nearest  
WGPUFilterMode_Linear  

enum WGPUFrontFace

Value Description
WGPUFrontFace_CCW  
WGPUFrontFace_CW  

enum WGPUIndexFormat

Value Description
WGPUIndexFormat_Undefined  
WGPUIndexFormat_Uint16  
WGPUIndexFormat_Uint32  

enum WGPULoadOp

Value Description
WGPULoadOp_Undefined  
WGPULoadOp_Clear  
WGPULoadOp_Load  

enum WGPULoggingType

Value Description
WGPULoggingType_Verbose  
WGPULoggingType_Info  
WGPULoggingType_Warning  
WGPULoggingType_Error  

enum WGPUMipmapFilterMode

Value Description
WGPUMipmapFilterMode_Nearest  
WGPUMipmapFilterMode_Linear  

enum WGPUPipelineStatisticName

Value Description
WGPUPipelineStatisticName_VertexShaderInvocations  
WGPUPipelineStatisticName_ClipperInvocations  
WGPUPipelineStatisticName_ClipperPrimitivesOut  
WGPUPipelineStatisticName_FragmentShaderInvocations  
WGPUPipelineStatisticName_ComputeShaderInvocations  

enum WGPUPowerPreference

Value Description
WGPUPowerPreference_Undefined  
WGPUPowerPreference_LowPower  
WGPUPowerPreference_HighPerformance  

enum WGPUPresentMode

Value Description
WGPUPresentMode_Immediate  
WGPUPresentMode_Mailbox  
WGPUPresentMode_Fifo  

enum WGPUPrimitiveTopology

Value Description
WGPUPrimitiveTopology_PointList  
WGPUPrimitiveTopology_LineList  
WGPUPrimitiveTopology_LineStrip  
WGPUPrimitiveTopology_TriangleList  
WGPUPrimitiveTopology_TriangleStrip  

enum WGPUQueryType

Value Description
WGPUQueryType_Occlusion  
WGPUQueryType_PipelineStatistics  
WGPUQueryType_Timestamp  

enum WGPUQueueWorkDoneStatus

Value Description
WGPUQueueWorkDoneStatus_Success  
WGPUQueueWorkDoneStatus_Error  
WGPUQueueWorkDoneStatus_Unknown  
WGPUQueueWorkDoneStatus_DeviceLost  

enum WGPURenderPassTimestampLocation

Value Description
WGPURenderPassTimestampLocation_Beginning  
WGPURenderPassTimestampLocation_End  

enum WGPURequestAdapterStatus

Value Description
WGPURequestAdapterStatus_Success  
WGPURequestAdapterStatus_Unavailable  
WGPURequestAdapterStatus_Error  
WGPURequestAdapterStatus_Unknown  

enum WGPURequestDeviceStatus

Value Description
WGPURequestDeviceStatus_Success  
WGPURequestDeviceStatus_Error  
WGPURequestDeviceStatus_Unknown  

enum WGPUSType

Value Description
WGPUSType_Invalid  
WGPUSType_SurfaceDescriptorFromMetalLayer  
WGPUSType_SurfaceDescriptorFromWindowsHWND  
WGPUSType_SurfaceDescriptorFromXlibWindow  
WGPUSType_SurfaceDescriptorFromCanvasHTMLSelector  
WGPUSType_ShaderModuleSPIRVDescriptor  
WGPUSType_ShaderModuleWGSLDescriptor  
WGPUSType_PrimitiveDepthClipControl  
WGPUSType_SurfaceDescriptorFromWaylandSurface  
WGPUSType_SurfaceDescriptorFromAndroidNativeWindow  
WGPUSType_SurfaceDescriptorFromXcbWindow  
WGPUSType_SurfaceDescriptorFromWindowsCoreWindow  
WGPUSType_ExternalTextureBindingEntry  
WGPUSType_ExternalTextureBindingLayout  
WGPUSType_SurfaceDescriptorFromWindowsSwapChainPanel  
WGPUSType_RenderPassDescriptorMaxDrawCount  
WGPUSType_DawnTextureInternalUsageDescriptor  
WGPUSType_DawnTogglesDeviceDescriptor  
WGPUSType_DawnEncoderInternalUsageDescriptor  
WGPUSType_DawnInstanceDescriptor  
WGPUSType_DawnCacheDeviceDescriptor  
WGPUSType_DawnAdapterPropertiesPowerPreference  
WGPUSType_DawnBufferDescriptorErrorInfoFromWireClient  

enum WGPUSamplerBindingType

Value Description
WGPUSamplerBindingType_Undefined  
WGPUSamplerBindingType_Filtering  
WGPUSamplerBindingType_NonFiltering  
WGPUSamplerBindingType_Comparison  

enum WGPUStencilOperation

Value Description
WGPUStencilOperation_Keep  
WGPUStencilOperation_Zero  
WGPUStencilOperation_Replace  
WGPUStencilOperation_Invert  
WGPUStencilOperation_IncrementClamp  
WGPUStencilOperation_DecrementClamp  
WGPUStencilOperation_IncrementWrap  
WGPUStencilOperation_DecrementWrap  

enum WGPUStorageTextureAccess

Value Description
WGPUStorageTextureAccess_Undefined  
WGPUStorageTextureAccess_WriteOnly  

enum WGPUStoreOp

Value Description
WGPUStoreOp_Undefined  
WGPUStoreOp_Store  
WGPUStoreOp_Discard  

enum WGPUTextureAspect

Value Description
WGPUTextureAspect_All  
WGPUTextureAspect_StencilOnly  
WGPUTextureAspect_DepthOnly  
WGPUTextureAspect_Plane0Only  
WGPUTextureAspect_Plane1Only  

enum WGPUTextureComponentType

Value Description
WGPUTextureComponentType_Float  
WGPUTextureComponentType_Sint  
WGPUTextureComponentType_Uint  
WGPUTextureComponentType_DepthComparison  

enum WGPUTextureDimension

Value Description
WGPUTextureDimension_1D  
WGPUTextureDimension_2D  
WGPUTextureDimension_3D  

enum WGPUTextureFormat

Value Description
WGPUTextureFormat_Undefined  
WGPUTextureFormat_R8Unorm  
WGPUTextureFormat_R8Snorm  
WGPUTextureFormat_R8Uint  
WGPUTextureFormat_R8Sint  
WGPUTextureFormat_R16Uint  
WGPUTextureFormat_R16Sint  
WGPUTextureFormat_R16Float  
WGPUTextureFormat_RG8Unorm  
WGPUTextureFormat_RG8Snorm  
WGPUTextureFormat_RG8Uint  
WGPUTextureFormat_RG8Sint  
WGPUTextureFormat_R32Float  
WGPUTextureFormat_R32Uint  
WGPUTextureFormat_R32Sint  
WGPUTextureFormat_RG16Uint  
WGPUTextureFormat_RG16Sint  
WGPUTextureFormat_RG16Float  
WGPUTextureFormat_RGBA8Unorm  
WGPUTextureFormat_RGBA8UnormSrgb  
WGPUTextureFormat_RGBA8Snorm  
WGPUTextureFormat_RGBA8Uint  
WGPUTextureFormat_RGBA8Sint  
WGPUTextureFormat_BGRA8Unorm  
WGPUTextureFormat_BGRA8UnormSrgb  
WGPUTextureFormat_RGB10A2Unorm  
WGPUTextureFormat_RG11B10Ufloat  
WGPUTextureFormat_RGB9E5Ufloat  
WGPUTextureFormat_RG32Float  
WGPUTextureFormat_RG32Uint  
WGPUTextureFormat_RG32Sint  
WGPUTextureFormat_RGBA16Uint  
WGPUTextureFormat_RGBA16Sint  
WGPUTextureFormat_RGBA16Float  
WGPUTextureFormat_RGBA32Float  
WGPUTextureFormat_RGBA32Uint  
WGPUTextureFormat_RGBA32Sint  
WGPUTextureFormat_Stencil8  
WGPUTextureFormat_Depth16Unorm  
WGPUTextureFormat_Depth24Plus  
WGPUTextureFormat_Depth24PlusStencil8  
WGPUTextureFormat_Depth32Float  
WGPUTextureFormat_Depth32FloatStencil8  
WGPUTextureFormat_BC1RGBAUnorm  
WGPUTextureFormat_BC1RGBAUnormSrgb  
WGPUTextureFormat_BC2RGBAUnorm  
WGPUTextureFormat_BC2RGBAUnormSrgb  
WGPUTextureFormat_BC3RGBAUnorm  
WGPUTextureFormat_BC3RGBAUnormSrgb  
WGPUTextureFormat_BC4RUnorm  
WGPUTextureFormat_BC4RSnorm  
WGPUTextureFormat_BC5RGUnorm  
WGPUTextureFormat_BC5RGSnorm  
WGPUTextureFormat_BC6HRGBUfloat  
WGPUTextureFormat_BC6HRGBFloat  
WGPUTextureFormat_BC7RGBAUnorm  
WGPUTextureFormat_BC7RGBAUnormSrgb  
WGPUTextureFormat_ETC2RGB8Unorm  
WGPUTextureFormat_ETC2RGB8UnormSrgb  
WGPUTextureFormat_ETC2RGB8A1Unorm  
WGPUTextureFormat_ETC2RGB8A1UnormSrgb  
WGPUTextureFormat_ETC2RGBA8Unorm  
WGPUTextureFormat_ETC2RGBA8UnormSrgb  
WGPUTextureFormat_EACR11Unorm  
WGPUTextureFormat_EACR11Snorm  
WGPUTextureFormat_EACRG11Unorm  
WGPUTextureFormat_EACRG11Snorm  
WGPUTextureFormat_ASTC4x4Unorm  
WGPUTextureFormat_ASTC4x4UnormSrgb  
WGPUTextureFormat_ASTC5x4Unorm  
WGPUTextureFormat_ASTC5x4UnormSrgb  
WGPUTextureFormat_ASTC5x5Unorm  
WGPUTextureFormat_ASTC5x5UnormSrgb  
WGPUTextureFormat_ASTC6x5Unorm  
WGPUTextureFormat_ASTC6x5UnormSrgb  
WGPUTextureFormat_ASTC6x6Unorm  
WGPUTextureFormat_ASTC6x6UnormSrgb  
WGPUTextureFormat_ASTC8x5Unorm  
WGPUTextureFormat_ASTC8x5UnormSrgb  
WGPUTextureFormat_ASTC8x6Unorm  
WGPUTextureFormat_ASTC8x6UnormSrgb  
WGPUTextureFormat_ASTC8x8Unorm  
WGPUTextureFormat_ASTC8x8UnormSrgb  
WGPUTextureFormat_ASTC10x5Unorm  
WGPUTextureFormat_ASTC10x5UnormSrgb  
WGPUTextureFormat_ASTC10x6Unorm  
WGPUTextureFormat_ASTC10x6UnormSrgb  
WGPUTextureFormat_ASTC10x8Unorm  
WGPUTextureFormat_ASTC10x8UnormSrgb  
WGPUTextureFormat_ASTC10x10Unorm  
WGPUTextureFormat_ASTC10x10UnormSrgb  
WGPUTextureFormat_ASTC12x10Unorm  
WGPUTextureFormat_ASTC12x10UnormSrgb  
WGPUTextureFormat_ASTC12x12Unorm  
WGPUTextureFormat_ASTC12x12UnormSrgb  
WGPUTextureFormat_R8BG8Biplanar420Unorm  

enum WGPUTextureSampleType

Value Description
WGPUTextureSampleType_Undefined  
WGPUTextureSampleType_Float  
WGPUTextureSampleType_UnfilterableFloat  
WGPUTextureSampleType_Depth  
WGPUTextureSampleType_Sint  
WGPUTextureSampleType_Uint  

enum WGPUTextureViewDimension

Value Description
WGPUTextureViewDimension_Undefined  
WGPUTextureViewDimension_1D  
WGPUTextureViewDimension_2D  
WGPUTextureViewDimension_2DArray  
WGPUTextureViewDimension_Cube  
WGPUTextureViewDimension_CubeArray  
WGPUTextureViewDimension_3D  

enum WGPUVertexFormat

Value Description
WGPUVertexFormat_Undefined  
WGPUVertexFormat_Uint8x2  
WGPUVertexFormat_Uint8x4  
WGPUVertexFormat_Sint8x2  
WGPUVertexFormat_Sint8x4  
WGPUVertexFormat_Unorm8x2  
WGPUVertexFormat_Unorm8x4  
WGPUVertexFormat_Snorm8x2  
WGPUVertexFormat_Snorm8x4  
WGPUVertexFormat_Uint16x2  
WGPUVertexFormat_Uint16x4  
WGPUVertexFormat_Sint16x2  
WGPUVertexFormat_Sint16x4  
WGPUVertexFormat_Unorm16x2  
WGPUVertexFormat_Unorm16x4  
WGPUVertexFormat_Snorm16x2  
WGPUVertexFormat_Snorm16x4  
WGPUVertexFormat_Float16x2  
WGPUVertexFormat_Float16x4  
WGPUVertexFormat_Float32  
WGPUVertexFormat_Float32x2  
WGPUVertexFormat_Float32x3  
WGPUVertexFormat_Float32x4  
WGPUVertexFormat_Uint32  
WGPUVertexFormat_Uint32x2  
WGPUVertexFormat_Uint32x3  
WGPUVertexFormat_Uint32x4  
WGPUVertexFormat_Sint32  
WGPUVertexFormat_Sint32x2  
WGPUVertexFormat_Sint32x3  
WGPUVertexFormat_Sint32x4  

enum WGPUVertexStepMode

Value Description
WGPUVertexStepMode_Vertex  
WGPUVertexStepMode_Instance  
WGPUVertexStepMode_VertexBufferNotUsed  

Bitmasks

Each bitmask enum provides an associated Flags typedef for which is, in effect, a uint32_t type. The Flags type is what is used in method signatures.

enum WGPUBufferUsage [bitmask]

Value Description
WGPUBufferUsage_None  
WGPUBufferUsage_MapRead  
WGPUBufferUsage_MapWrite  
WGPUBufferUsage_CopySrc  
WGPUBufferUsage_CopyDst  
WGPUBufferUsage_Index  
WGPUBufferUsage_Vertex  
WGPUBufferUsage_Uniform  
WGPUBufferUsage_Storage  
WGPUBufferUsage_Indirect  
WGPUBufferUsage_QueryResolve  

typedef WGPUFlags WGPUBufferUsageFlags

enum WGPUColorWriteMask [bitmask]

Value Description
WGPUColorWriteMask_None  
WGPUColorWriteMask_Red  
WGPUColorWriteMask_Green  
WGPUColorWriteMask_Blue  
WGPUColorWriteMask_Alpha  
WGPUColorWriteMask_All  

typedef WGPUFlags WGPUColorWriteMaskFlags

enum WGPUMapMode [bitmask]

Value Description
WGPUMapMode_None  
WGPUMapMode_Read  
WGPUMapMode_Write  

typedef WGPUFlags WGPUMapModeFlags

enum WGPUShaderStage [bitmask]

Value Description
WGPUShaderStage_None  
WGPUShaderStage_Vertex  
WGPUShaderStage_Fragment  
WGPUShaderStage_Compute  

typedef WGPUFlags WGPUShaderStageFlags

enum WGPUTextureUsage [bitmask]

Determine how a GPUTexture maybe be used after creation.

See GPUTextureUsage for more information.

Value Description
WGPUTextureUsage_None No usage specified.
WGPUTextureUsage_CopySrc The texture can be used as the source of a copy operation.
WGPUTextureUsage_CopyDst The texture can be used as the destination of a copy operation.
WGPUTextureUsage_TextureBinding The texture can be bound for use as a sampled texture in a shader.
WGPUTextureUsage_StorageBinding The texture can be bound for use as a storage texture in a shader.
WGPUTextureUsage_RenderAttachment The texture can be used as a colour or depth/stencil attachment in a render pass.
WGPUTextureUsage_Present The texture can be used to “present” the texture on screen.

typedef WGPUFlags WGPUTextureUsageFlags

Functions

wgpuCreateInstance

Creates an instance of the Dawn WebGPU system

WGPUInstance wgpuCreateInstance(
    WGPUInstanceDescriptor const* descriptor)

Returns

The created WGPUInstance.

Arguments

wgpuGetProcAddress

Returns the function pointer for the requested WebGPU API method procName.

WGPUProc wgpuGetProcAddress(
    WGPUDevice device,
    char const* procName)

Returns

The WGPUProc function pointer if it exists, NULL otherwise.

Arguments
  • device: The WGPUDevice to retrieve the proc for
  • procName: The name of the pointer to retrieve

Function Pointers

WGPUBufferMapCallback

void (*WGPUBufferMapCallback)(
    WGPUBufferMapAsyncStatus status,
    void * userdata)

Arguments
  • status:
  • userdata:

WGPUCompilationInfoCallback

void (*WGPUCompilationInfoCallback)(
    WGPUCompilationInfoRequestStatus status,
    WGPUCompilationInfo const* compilationInfo,
    void * userdata)

Arguments
  • status:
  • compilationInfo:
  • userdata:

WGPUCreateComputePipelineAsyncCallback

void (*WGPUCreateComputePipelineAsyncCallback)(
    WGPUCreatePipelineAsyncStatus status,
    WGPUComputePipeline pipeline,
    char const* message,
    void * userdata)

Arguments
  • status:
  • pipeline:
  • message:
  • userdata:

WGPUCreateRenderPipelineAsyncCallback

void (*WGPUCreateRenderPipelineAsyncCallback)(
    WGPUCreatePipelineAsyncStatus status,
    WGPURenderPipeline pipeline,
    char const* message,
    void * userdata)

Arguments
  • status:
  • pipeline:
  • message:
  • userdata:

WGPUDeviceLostCallback

void (*WGPUDeviceLostCallback)(
    WGPUDeviceLostReason reason,
    char const* message,
    void * userdata)

Arguments
  • reason:
  • message:
  • userdata:

WGPUErrorCallback

void (*WGPUErrorCallback)(
    WGPUErrorType type,
    char const* message,
    void * userdata)

Arguments
  • type:
  • message:
  • userdata:

WGPULoggingCallback

void (*WGPULoggingCallback)(
    WGPULoggingType type,
    char const* message,
    void * userdata)

Arguments
  • type:
  • message:
  • userdata:

WGPUProc

void (*WGPUProc)()

WGPUQueueWorkDoneCallback

void (*WGPUQueueWorkDoneCallback)(
    WGPUQueueWorkDoneStatus status,
    void * userdata)

Arguments
  • status:
  • userdata:

WGPURequestAdapterCallback

void (*WGPURequestAdapterCallback)(
    WGPURequestAdapterStatus status,
    WGPUAdapter adapter,
    char const* message,
    void * userdata)

Arguments
  • status:
  • adapter:
  • message:
  • userdata:

WGPURequestDeviceCallback

void (*WGPURequestDeviceCallback)(
    WGPURequestDeviceStatus status,
    WGPUDevice device,
    char const* message,
    void * userdata)

Arguments
  • status:
  • device:
  • message:
  • userdata:

Structures

struct WGPUAdapterProperties

Members Description
WGPUChainedStructOut* nextInChain Pointer to next chained structure. Maybe NULL.
uint32_t vendorID The PCIe ID if available but can be other values on systems which do not provide a PCIe ID.
char const* vendorName The name of the vendor of the adapter, if available. Empty string otherwise.
char const* architecture The name of the family or class of GPUs the adapter belongs to, if available. Empty string otherwise.
uint32_t deviceID The vendor-specific device identifier.
char const* name A vendor-specific identifier for the adapter, if available. Empty string otherwise.
char const* driverDescription A human readable string describing the adapter as reported by the driver, if available. Empty string otherwise.
WGPUAdapterType adapterType The type of the adapter
WGPUBackendType backendType The backend platform used by the adapter

struct WGPUBindGroupDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
WGPUBindGroupLayout layout  
uint32_t entryCount  
WGPUBindGroupEntry const* entries  

struct WGPUBindGroupEntry

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
uint32_t binding  
WGPUBuffer buffer  
uint64_t offset  
uint64_t size  
WGPUSampler sampler  
WGPUTextureView textureView  
Chainable Structures

struct WGPUBindGroupLayoutDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
uint32_t entryCount  
WGPUBindGroupLayoutEntry const* entries  

struct WGPUBindGroupLayoutEntry

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
uint32_t binding  
WGPUShaderStage visibility  
WGPUBufferBindingLayout buffer  
WGPUSamplerBindingLayout sampler  
WGPUTextureBindingLayout texture  
WGPUStorageTextureBindingLayout storageTexture  
Chainable Structures

struct WGPUBlendComponent

Members Description
WGPUBlendOperation operation  
WGPUBlendFactor srcFactor  
WGPUBlendFactor dstFactor  

struct WGPUBlendState

Members Description
WGPUBlendComponent color  
WGPUBlendComponent alpha  

struct WGPUBufferBindingLayout

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUBufferBindingType type  
bool hasDynamicOffset  
uint64_t minBindingSize  

struct WGPUBufferDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
WGPUBufferUsage usage  
uint64_t size  
bool mappedAtCreation  
Chainable Structures

struct WGPUColor

Members Description
double r  
double g  
double b  
double a  

struct WGPUColorTargetState

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUTextureFormat format  
WGPUBlendState const* blend  
WGPUColorWriteMask writeMask  

struct WGPUCommandBufferDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  

struct WGPUCommandEncoderDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
Chainable Structures

struct WGPUCompilationInfo

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
uint32_t messageCount  
WGPUCompilationMessage const* messages  

struct WGPUCompilationMessage

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* message  
WGPUCompilationMessageType type  
uint64_t lineNum  
uint64_t linePos  
uint64_t offset  
uint64_t length  

struct WGPUComputePassDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
uint32_t timestampWriteCount  
WGPUComputePassTimestampWrite const* timestampWrites  

struct WGPUComputePassTimestampWrite

Members Description
WGPUQuerySet querySet  
uint32_t queryIndex  
WGPUComputePassTimestampLocation location  

struct WGPUComputePipelineDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
WGPUPipelineLayout layout  
WGPUProgrammableStageDescriptor compute  

struct WGPUConstantEntry

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* key  
double value  

struct WGPUCopyTextureForBrowserOptions

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
bool flipY  
bool needsColorSpaceConversion  
WGPUAlphaMode srcAlphaMode  
float const* srcTransferFunctionParameters  
float const* conversionMatrix  
float const* dstTransferFunctionParameters  
WGPUAlphaMode dstAlphaMode  
bool internalUsage  

struct WGPUDawnAdapterPropertiesPowerPreference

Members Description
WGPUPowerPreference powerPreference  

struct WGPUDawnBufferDescriptorErrorInfoFromWireClient

Members Description
WGPUChainedStruct chain ChainedStruct base object
bool outOfMemory  
Chain Parent Structures

struct WGPUDawnCacheDeviceDescriptor

Members Description
WGPUChainedStruct chain ChainedStruct base object
char const* isolationKey  
Chain Parent Structures

struct WGPUDawnEncoderInternalUsageDescriptor

Members Description
WGPUChainedStruct chain ChainedStruct base object
bool useInternalUsages  
Chain Parent Structures

struct WGPUDawnInstanceDescriptor

Members Description
WGPUChainedStruct chain ChainedStruct base object
uint32_t additionalRuntimeSearchPathsCount  
char const*const* additionalRuntimeSearchPaths  
Chain Parent Structures

struct WGPUDawnTextureInternalUsageDescriptor

Members Description
WGPUChainedStruct chain ChainedStruct base object
WGPUTextureUsage internalUsage  
Chain Parent Structures

struct WGPUDawnTogglesDeviceDescriptor

Members Description
WGPUChainedStruct chain ChainedStruct base object
uint32_t forceEnabledTogglesCount  
char const*const* forceEnabledToggles  
uint32_t forceDisabledTogglesCount  
char const*const* forceDisabledToggles  
Chain Parent Structures

struct WGPUDepthStencilState

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUTextureFormat format  
bool depthWriteEnabled  
WGPUCompareFunction depthCompare  
WGPUStencilFaceState stencilFront  
WGPUStencilFaceState stencilBack  
uint32_t stencilReadMask  
uint32_t stencilWriteMask  
int32_t depthBias  
float depthBiasSlopeScale  
float depthBiasClamp  

struct WGPUDeviceDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
uint32_t requiredFeaturesCount  
WGPUFeatureName const* requiredFeatures  
WGPURequiredLimits const* requiredLimits  
WGPUQueueDescriptor defaultQueue  
Chainable Structures

struct WGPUExtent2D

Members Description
uint32_t width  
uint32_t height  

struct WGPUExtent3D

Members Description
uint32_t width  
uint32_t height  
uint32_t depthOrArrayLayers  

struct WGPUExternalTextureBindingEntry

Members Description
WGPUChainedStruct chain ChainedStruct base object
WGPUExternalTexture externalTexture  
Chain Parent Structures

struct WGPUExternalTextureBindingLayout

Members Description
WGPUChainedStruct chain ChainedStruct base object
Chain Parent Structures

struct WGPUExternalTextureDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
WGPUTextureView plane0  
WGPUTextureView plane1  
WGPUOrigin2D visibleOrigin  
WGPUExtent2D visibleSize  
bool doYuvToRgbConversionOnly  
float const* yuvToRgbConversionMatrix  
float const* srcTransferFunctionParameters  
float const* dstTransferFunctionParameters  
float const* gamutConversionMatrix  
bool flipY  
WGPUExternalTextureRotation rotation  
WGPUExternalTextureVisibleRect visibleRect  

struct WGPUExternalTextureVisibleRect

Members Description
float x  
float y  
float width  
float height  

struct WGPUFragmentState

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUShaderModule module  
char const* entryPoint  
uint32_t constantCount  
WGPUConstantEntry const* constants  
uint32_t targetCount  
WGPUColorTargetState const* targets  

struct WGPUImageCopyBuffer

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUTextureDataLayout layout  
WGPUBuffer buffer  

struct WGPUImageCopyExternalTexture

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUExternalTexture externalTexture  
WGPUOrigin3D origin  

struct WGPUImageCopyTexture

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUTexture texture  
uint32_t mipLevel  
WGPUOrigin3D origin  
WGPUTextureAspect aspect  

struct WGPUInstanceDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
Chainable Structures

struct WGPULimits

Members Description
uint32_t maxTextureDimension1D  
uint32_t maxTextureDimension2D  
uint32_t maxTextureDimension3D  
uint32_t maxTextureArrayLayers  
uint32_t maxBindGroups  
uint32_t maxBindingsPerBindGroup  
uint32_t maxDynamicUniformBuffersPerPipelineLayout  
uint32_t maxDynamicStorageBuffersPerPipelineLayout  
uint32_t maxSampledTexturesPerShaderStage  
uint32_t maxSamplersPerShaderStage  
uint32_t maxStorageBuffersPerShaderStage  
uint32_t maxStorageTexturesPerShaderStage  
uint32_t maxUniformBuffersPerShaderStage  
uint64_t maxUniformBufferBindingSize  
uint64_t maxStorageBufferBindingSize  
uint32_t minUniformBufferOffsetAlignment  
uint32_t minStorageBufferOffsetAlignment  
uint32_t maxVertexBuffers  
uint64_t maxBufferSize  
uint32_t maxVertexAttributes  
uint32_t maxVertexBufferArrayStride  
uint32_t maxInterStageShaderComponents  
uint32_t maxInterStageShaderVariables  
uint32_t maxColorAttachments  
uint32_t maxColorAttachmentBytesPerSample  
uint32_t maxComputeWorkgroupStorageSize  
uint32_t maxComputeInvocationsPerWorkgroup  
uint32_t maxComputeWorkgroupSizeX  
uint32_t maxComputeWorkgroupSizeY  
uint32_t maxComputeWorkgroupSizeZ  
uint32_t maxComputeWorkgroupsPerDimension  

struct WGPUMultisampleState

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
uint32_t count  
uint32_t mask  
bool alphaToCoverageEnabled  

struct WGPUOrigin2D

Members Description
uint32_t x  
uint32_t y  

struct WGPUOrigin3D

Members Description
uint32_t x  
uint32_t y  
uint32_t z  

struct WGPUPipelineLayoutDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
uint32_t bindGroupLayoutCount  
WGPUBindGroupLayout const* bindGroupLayouts  

struct WGPUPrimitiveDepthClipControl

Members Description
WGPUChainedStruct chain ChainedStruct base object
bool unclippedDepth  
Chain Parent Structures

struct WGPUPrimitiveState

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUPrimitiveTopology topology  
WGPUIndexFormat stripIndexFormat  
WGPUFrontFace frontFace  
WGPUCullMode cullMode  
Chainable Structures

struct WGPUProgrammableStageDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUShaderModule module  
char const* entryPoint  
uint32_t constantCount  
WGPUConstantEntry const* constants  

struct WGPUQuerySetDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
WGPUQueryType type  
uint32_t count  
WGPUPipelineStatisticName const* pipelineStatistics  
uint32_t pipelineStatisticsCount  

struct WGPUQueueDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  

struct WGPURenderBundleDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  

struct WGPURenderBundleEncoderDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
uint32_t colorFormatsCount  
WGPUTextureFormat const* colorFormats  
WGPUTextureFormat depthStencilFormat  
uint32_t sampleCount  
bool depthReadOnly  
bool stencilReadOnly  

struct WGPURenderPassColorAttachment

Members Description
WGPUTextureView view  
WGPUTextureView resolveTarget  
WGPULoadOp loadOp  
WGPUStoreOp storeOp  
WGPUColor clearColor  
WGPUColor clearValue  

struct WGPURenderPassDepthStencilAttachment

Members Description
WGPUTextureView view  
WGPULoadOp depthLoadOp  
WGPUStoreOp depthStoreOp  
float clearDepth  
float depthClearValue  
bool depthReadOnly  
WGPULoadOp stencilLoadOp  
WGPUStoreOp stencilStoreOp  
uint32_t clearStencil  
uint32_t stencilClearValue  
bool stencilReadOnly  

struct WGPURenderPassDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
uint32_t colorAttachmentCount  
WGPURenderPassColorAttachment const* colorAttachments  
WGPURenderPassDepthStencilAttachment const* depthStencilAttachment  
WGPUQuerySet occlusionQuerySet  
uint32_t timestampWriteCount  
WGPURenderPassTimestampWrite const* timestampWrites  
Chainable Structures

struct WGPURenderPassDescriptorMaxDrawCount

Members Description
WGPUChainedStruct chain ChainedStruct base object
uint64_t maxDrawCount  
Chain Parent Structures

struct WGPURenderPassTimestampWrite

Members Description
WGPUQuerySet querySet  
uint32_t queryIndex  
WGPURenderPassTimestampLocation location  

struct WGPURenderPipelineDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
WGPUPipelineLayout layout  
WGPUVertexState vertex  
WGPUPrimitiveState primitive  
WGPUDepthStencilState const* depthStencil  
WGPUMultisampleState multisample  
WGPUFragmentState const* fragment  

struct WGPURequestAdapterOptions

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUSurface compatibleSurface  
WGPUPowerPreference powerPreference  
bool forceFallbackAdapter  

struct WGPURequiredLimits

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPULimits limits  

struct WGPUSamplerBindingLayout

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUSamplerBindingType type  

struct WGPUSamplerDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
WGPUAddressMode addressModeU  
WGPUAddressMode addressModeV  
WGPUAddressMode addressModeW  
WGPUFilterMode magFilter  
WGPUFilterMode minFilter  
WGPUFilterMode mipmapFilter  
WGPUMipmapFilterMode mipmapFilter  
float lodMinClamp  
float lodMaxClamp  
WGPUCompareFunction compare  
uint16_t maxAnisotropy  

struct WGPUShaderModuleSPIRVDescriptor

Members Description
WGPUChainedStruct chain ChainedStruct base object
uint32_t codeSize  
uint32_t const* code  
Chain Parent Structures

struct WGPUShaderModuleWGSLDescriptor

Members Description
WGPUChainedStruct chain ChainedStruct base object
char const* source  
char const* code  
Chain Parent Structures

struct WGPUShaderModuleCompilationHint

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* entryPoint  
WGPUPipelineLayout layout  

struct WGPUShaderModuleDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
uint32_t hintCount  
WGPUShaderModuleCompilationHint const* hints  
Chainable Structures

struct WGPUStencilFaceState

Members Description
WGPUCompareFunction compare  
WGPUStencilOperation failOp  
WGPUStencilOperation depthFailOp  
WGPUStencilOperation passOp  

struct WGPUStorageTextureBindingLayout

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUStorageTextureAccess access  
WGPUTextureFormat format  
WGPUTextureViewDimension viewDimension  

struct WGPUSupportedLimits

Members Description
WGPUChainedStructOut* nextInChain Pointer to next chained structure. Maybe NULL.
WGPULimits limits  

struct WGPUSurfaceDescriptorFromAndroidNativeWindow

Members Description
WGPUChainedStruct chain ChainedStruct base object
void * window  
Chain Parent Structures

struct WGPUSurfaceDescriptorFromCanvasHTMLSelector

Members Description
WGPUChainedStruct chain ChainedStruct base object
char const* selector  
Chain Parent Structures

struct WGPUSurfaceDescriptorFromMetalLayer

Members Description
WGPUChainedStruct chain ChainedStruct base object
void * layer  
Chain Parent Structures

struct WGPUSurfaceDescriptorFromWaylandSurface

Members Description
WGPUChainedStruct chain ChainedStruct base object
void * display  
void * surface  
Chain Parent Structures

struct WGPUSurfaceDescriptorFromWindowsHWND

Members Description
WGPUChainedStruct chain ChainedStruct base object
void * hinstance  
void * hwnd  
Chain Parent Structures

struct WGPUSurfaceDescriptorFromWindowsCoreWindow

Members Description
WGPUChainedStruct chain ChainedStruct base object
void * coreWindow  
Chain Parent Structures

struct WGPUSurfaceDescriptorFromWindowsSwapChainPanel

Members Description
WGPUChainedStruct chain ChainedStruct base object
void * swapChainPanel  
Chain Parent Structures

struct WGPUSurfaceDescriptorFromXcbWindow

Members Description
WGPUChainedStruct chain ChainedStruct base object
void * connection  
uint32_t window  
Chain Parent Structures

struct WGPUSurfaceDescriptorFromXlibWindow

Members Description
WGPUChainedStruct chain ChainedStruct base object
void * display  
uint32_t window  
Chain Parent Structures

struct WGPUSwapChainDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
WGPUTextureUsage usage  
WGPUTextureFormat format  
uint32_t width  
uint32_t height  
WGPUPresentMode presentMode  
uint64_t implementation  

struct WGPUTextureBindingLayout

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUTextureSampleType sampleType  
WGPUTextureViewDimension viewDimension  
bool multisampled  

struct WGPUTextureDataLayout

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
uint64_t offset  
uint32_t bytesPerRow  
uint32_t rowsPerImage  

struct WGPUTextureDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
WGPUTextureUsage usage  
WGPUTextureDimension dimension  
WGPUExtent3D size  
WGPUTextureFormat format  
uint32_t mipLevelCount  
uint32_t sampleCount  
uint32_t viewFormatCount  
WGPUTextureFormat const* viewFormats  
Chainable Structures

struct WGPUTextureViewDescriptor

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
char const* label  
WGPUTextureFormat format  
WGPUTextureViewDimension dimension  
uint32_t baseMipLevel  
uint32_t mipLevelCount  
uint32_t baseArrayLayer  
uint32_t arrayLayerCount  
WGPUTextureAspect aspect  

struct WGPUVertexAttribute

Members Description
WGPUVertexFormat format  
uint64_t offset  
uint32_t shaderLocation  

struct WGPUVertexBufferLayout

Members Description
uint64_t arrayStride  
WGPUVertexStepMode stepMode  
uint32_t attributeCount  
WGPUVertexAttribute const* attributes  

struct WGPUVertexState

Members Description
WGPUChainedStruct const* nextInChain Pointer to next chained structure. Maybe NULL.
WGPUShaderModule module  
char const* entryPoint  
uint32_t constantCount  
WGPUConstantEntry const* constants  
uint32_t bufferCount  
WGPUVertexBufferLayout const* buffers  

Methods

Methods of WGPUAdapter

An adapter identifies an implemention of WebGPU on the system.

See Adapters for more information.

wgpuAdapterCreateDevice

WGPUDevice wgpuAdapterCreateDevice(
    WGPUAdapter adapter,
    WGPUDeviceDescriptor const* descriptor)

Returns
Arguments
  • adapter:
  • descriptor:

wgpuAdapterEnumerateFeatures

size_t wgpuAdapterEnumerateFeatures(
    WGPUAdapter adapter,
    WGPUFeatureName * features)

Returns
Arguments
  • adapter:
  • features:

wgpuAdapterGetLimits

Retrieves the limits which can be used with this adapter.

bool wgpuAdapterGetLimits(
    WGPUAdapter adapter,
    WGPUSupportedLimits * limits)

Returns

Returns true if the limits were successfully retrieved.

Arguments

wgpuAdapterGetProperties

void wgpuAdapterGetProperties(
    WGPUAdapter adapter,
    WGPUAdapterProperties * properties)

Arguments
  • adapter:
  • properties:

wgpuAdapterHasFeature

bool wgpuAdapterHasFeature(
    WGPUAdapter adapter,
    WGPUFeatureName feature)

Returns
Arguments
  • adapter:
  • feature:

wgpuAdapterReference

void wgpuAdapterReference(
    WGPUAdapter adapter)

Arguments
  • adapter:

wgpuAdapterRelease

void wgpuAdapterRelease(
    WGPUAdapter adapter)

Arguments
  • adapter:

wgpuAdapterRequestDevice

void wgpuAdapterRequestDevice(
    WGPUAdapter adapter,
    WGPUDeviceDescriptor const* descriptor,
    WGPURequestDeviceCallback callback,
    void * userdata)

Arguments
  • adapter:
  • descriptor:
  • callback:
  • userdata:

Methods of WGPUBindGroup

wgpuBindGroupReference

void wgpuBindGroupReference(
    WGPUBindGroup bindGroup)

Arguments
  • bindGroup:

wgpuBindGroupRelease

void wgpuBindGroupRelease(
    WGPUBindGroup bindGroup)

Arguments
  • bindGroup:

wgpuBindGroupSetLabel

void wgpuBindGroupSetLabel(
    WGPUBindGroup bindGroup,
    char const* label)

Arguments
  • bindGroup:
  • label:

Methods of WGPUBindGroupLayout

wgpuBindGroupLayoutReference

void wgpuBindGroupLayoutReference(
    WGPUBindGroupLayout bindGroupLayout)

Arguments
  • bindGroupLayout:

wgpuBindGroupLayoutRelease

void wgpuBindGroupLayoutRelease(
    WGPUBindGroupLayout bindGroupLayout)

Arguments
  • bindGroupLayout:

wgpuBindGroupLayoutSetLabel

void wgpuBindGroupLayoutSetLabel(
    WGPUBindGroupLayout bindGroupLayout,
    char const* label)

Arguments
  • bindGroupLayout:
  • label:

Methods of WGPUBuffer

wgpuBufferDestroy

void wgpuBufferDestroy(
    WGPUBuffer buffer)

Arguments
  • buffer:

wgpuBufferGetConstMappedRange

void const * wgpuBufferGetConstMappedRange(
    WGPUBuffer buffer,
    size_t offset,
    size_t size)

Returns
Arguments
  • buffer:
  • offset:
  • size:

wgpuBufferGetMapState

WGPUBufferMapState wgpuBufferGetMapState(
    WGPUBuffer buffer)

Returns
Arguments
  • buffer:

wgpuBufferGetMappedRange

void * wgpuBufferGetMappedRange(
    WGPUBuffer buffer,
    size_t offset,
    size_t size)

Returns
Arguments
  • buffer:
  • offset:
  • size:

wgpuBufferGetSize

uint64_t wgpuBufferGetSize(
    WGPUBuffer buffer)

Returns
Arguments
  • buffer:

wgpuBufferGetUsage

WGPUBufferUsage wgpuBufferGetUsage(
    WGPUBuffer buffer)

Returns
Arguments
  • buffer:

wgpuBufferMapAsync

void wgpuBufferMapAsync(
    WGPUBuffer buffer,
    WGPUMapMode mode,
    size_t offset,
    size_t size,
    WGPUBufferMapCallback callback,
    void * userdata)

Arguments
  • buffer:
  • mode:
  • offset:
  • size:
  • callback:
  • userdata:

wgpuBufferReference

void wgpuBufferReference(
    WGPUBuffer buffer)

Arguments
  • buffer:

wgpuBufferRelease

void wgpuBufferRelease(
    WGPUBuffer buffer)

Arguments
  • buffer:

wgpuBufferSetLabel

void wgpuBufferSetLabel(
    WGPUBuffer buffer,
    char const* label)

Arguments
  • buffer:
  • label:

wgpuBufferUnmap

void wgpuBufferUnmap(
    WGPUBuffer buffer)

Arguments
  • buffer:

Methods of WGPUCommandBuffer

wgpuCommandBufferReference

void wgpuCommandBufferReference(
    WGPUCommandBuffer commandBuffer)

Arguments
  • commandBuffer:

wgpuCommandBufferRelease

void wgpuCommandBufferRelease(
    WGPUCommandBuffer commandBuffer)

Arguments
  • commandBuffer:

wgpuCommandBufferSetLabel

void wgpuCommandBufferSetLabel(
    WGPUCommandBuffer commandBuffer,
    char const* label)

Arguments
  • commandBuffer:
  • label:

Methods of WGPUCommandEncoder

wgpuCommandEncoderBeginComputePass

WGPUComputePassEncoder wgpuCommandEncoderBeginComputePass(
    WGPUCommandEncoder commandEncoder,
    WGPUComputePassDescriptor const* descriptor)

Returns
Arguments
  • commandEncoder:
  • descriptor:

wgpuCommandEncoderBeginRenderPass

WGPURenderPassEncoder wgpuCommandEncoderBeginRenderPass(
    WGPUCommandEncoder commandEncoder,
    WGPURenderPassDescriptor const* descriptor)

Returns
Arguments
  • commandEncoder:
  • descriptor:

wgpuCommandEncoderClearBuffer

void wgpuCommandEncoderClearBuffer(
    WGPUCommandEncoder commandEncoder,
    WGPUBuffer buffer,
    uint64_t offset,
    uint64_t size)

Arguments
  • commandEncoder:
  • buffer:
  • offset:
  • size:

wgpuCommandEncoderCopyBufferToBuffer

void wgpuCommandEncoderCopyBufferToBuffer(
    WGPUCommandEncoder commandEncoder,
    WGPUBuffer source,
    uint64_t sourceOffset,
    WGPUBuffer destination,
    uint64_t destinationOffset,
    uint64_t size)

Arguments
  • commandEncoder:
  • source:
  • sourceOffset:
  • destination:
  • destinationOffset:
  • size:

wgpuCommandEncoderCopyBufferToTexture

void wgpuCommandEncoderCopyBufferToTexture(
    WGPUCommandEncoder commandEncoder,
    WGPUImageCopyBuffer const* source,
    WGPUImageCopyTexture const* destination,
    WGPUExtent3D const* copySize)

Arguments
  • commandEncoder:
  • source:
  • destination:
  • copySize:

wgpuCommandEncoderCopyTextureToBuffer

void wgpuCommandEncoderCopyTextureToBuffer(
    WGPUCommandEncoder commandEncoder,
    WGPUImageCopyTexture const* source,
    WGPUImageCopyBuffer const* destination,
    WGPUExtent3D const* copySize)

Arguments
  • commandEncoder:
  • source:
  • destination:
  • copySize:

wgpuCommandEncoderCopyTextureToTexture

void wgpuCommandEncoderCopyTextureToTexture(
    WGPUCommandEncoder commandEncoder,
    WGPUImageCopyTexture const* source,
    WGPUImageCopyTexture const* destination,
    WGPUExtent3D const* copySize)

Arguments
  • commandEncoder:
  • source:
  • destination:
  • copySize:

wgpuCommandEncoderCopyTextureToTextureInternal

void wgpuCommandEncoderCopyTextureToTextureInternal(
    WGPUCommandEncoder commandEncoder,
    WGPUImageCopyTexture const* source,
    WGPUImageCopyTexture const* destination,
    WGPUExtent3D const* copySize)

Arguments
  • commandEncoder:
  • source:
  • destination:
  • copySize:

wgpuCommandEncoderFinish

WGPUCommandBuffer wgpuCommandEncoderFinish(
    WGPUCommandEncoder commandEncoder,
    WGPUCommandBufferDescriptor const* descriptor)

Returns
Arguments
  • commandEncoder:
  • descriptor:

wgpuCommandEncoderInjectValidationError

void wgpuCommandEncoderInjectValidationError(
    WGPUCommandEncoder commandEncoder,
    char const* message)

Arguments
  • commandEncoder:
  • message:

wgpuCommandEncoderInsertDebugMarker

void wgpuCommandEncoderInsertDebugMarker(
    WGPUCommandEncoder commandEncoder,
    char const* markerLabel)

Arguments
  • commandEncoder:
  • markerLabel:

wgpuCommandEncoderPopDebugGroup

void wgpuCommandEncoderPopDebugGroup(
    WGPUCommandEncoder commandEncoder)

Arguments
  • commandEncoder:

wgpuCommandEncoderPushDebugGroup

void wgpuCommandEncoderPushDebugGroup(
    WGPUCommandEncoder commandEncoder,
    char const* groupLabel)

Arguments
  • commandEncoder:
  • groupLabel:

wgpuCommandEncoderReference

void wgpuCommandEncoderReference(
    WGPUCommandEncoder commandEncoder)

Arguments
  • commandEncoder:

wgpuCommandEncoderRelease

void wgpuCommandEncoderRelease(
    WGPUCommandEncoder commandEncoder)

Arguments
  • commandEncoder:

wgpuCommandEncoderResolveQuerySet

void wgpuCommandEncoderResolveQuerySet(
    WGPUCommandEncoder commandEncoder,
    WGPUQuerySet querySet,
    uint32_t firstQuery,
    uint32_t queryCount,
    WGPUBuffer destination,
    uint64_t destinationOffset)

Arguments
  • commandEncoder:
  • querySet:
  • firstQuery:
  • queryCount:
  • destination:
  • destinationOffset:

wgpuCommandEncoderSetLabel

void wgpuCommandEncoderSetLabel(
    WGPUCommandEncoder commandEncoder,
    char const* label)

Arguments
  • commandEncoder:
  • label:

wgpuCommandEncoderWriteBuffer

void wgpuCommandEncoderWriteBuffer(
    WGPUCommandEncoder commandEncoder,
    WGPUBuffer buffer,
    uint64_t bufferOffset,
    uint8_t const* data,
    uint64_t size)

Arguments
  • commandEncoder:
  • buffer:
  • bufferOffset:
  • data:
  • size:

wgpuCommandEncoderWriteTimestamp

void wgpuCommandEncoderWriteTimestamp(
    WGPUCommandEncoder commandEncoder,
    WGPUQuerySet querySet,
    uint32_t queryIndex)

Arguments
  • commandEncoder:
  • querySet:
  • queryIndex:

Methods of WGPUComputePassEncoder

wgpuComputePassEncoderBeginPipelineStatisticsQuery

void wgpuComputePassEncoderBeginPipelineStatisticsQuery(
    WGPUComputePassEncoder computePassEncoder,
    WGPUQuerySet querySet,
    uint32_t queryIndex)

Arguments
  • computePassEncoder:
  • querySet:
  • queryIndex:

wgpuComputePassEncoderDispatch

void wgpuComputePassEncoderDispatch(
    WGPUComputePassEncoder computePassEncoder,
    uint32_t workgroupCountX,
    uint32_t workgroupCountY,
    uint32_t workgroupCountZ)

Arguments
  • computePassEncoder:
  • workgroupCountX:
  • workgroupCountY:
  • workgroupCountZ:

wgpuComputePassEncoderDispatchIndirect

void wgpuComputePassEncoderDispatchIndirect(
    WGPUComputePassEncoder computePassEncoder,
    WGPUBuffer indirectBuffer,
    uint64_t indirectOffset)

Arguments
  • computePassEncoder:
  • indirectBuffer:
  • indirectOffset:

wgpuComputePassEncoderDispatchWorkgroups

void wgpuComputePassEncoderDispatchWorkgroups(
    WGPUComputePassEncoder computePassEncoder,
    uint32_t workgroupCountX,
    uint32_t workgroupCountY,
    uint32_t workgroupCountZ)

Arguments
  • computePassEncoder:
  • workgroupCountX:
  • workgroupCountY:
  • workgroupCountZ:

wgpuComputePassEncoderDispatchWorkgroupsIndirect

void wgpuComputePassEncoderDispatchWorkgroupsIndirect(
    WGPUComputePassEncoder computePassEncoder,
    WGPUBuffer indirectBuffer,
    uint64_t indirectOffset)

Arguments
  • computePassEncoder:
  • indirectBuffer:
  • indirectOffset:

wgpuComputePassEncoderEnd

void wgpuComputePassEncoderEnd(
    WGPUComputePassEncoder computePassEncoder)

Arguments
  • computePassEncoder:

wgpuComputePassEncoderEndPass

void wgpuComputePassEncoderEndPass(
    WGPUComputePassEncoder computePassEncoder)

Arguments
  • computePassEncoder:

wgpuComputePassEncoderEndPipelineStatisticsQuery

void wgpuComputePassEncoderEndPipelineStatisticsQuery(
    WGPUComputePassEncoder computePassEncoder)

Arguments
  • computePassEncoder:

wgpuComputePassEncoderInsertDebugMarker

void wgpuComputePassEncoderInsertDebugMarker(
    WGPUComputePassEncoder computePassEncoder,
    char const* markerLabel)

Arguments
  • computePassEncoder:
  • markerLabel:

wgpuComputePassEncoderPopDebugGroup

void wgpuComputePassEncoderPopDebugGroup(
    WGPUComputePassEncoder computePassEncoder)

Arguments
  • computePassEncoder:

wgpuComputePassEncoderPushDebugGroup

void wgpuComputePassEncoderPushDebugGroup(
    WGPUComputePassEncoder computePassEncoder,
    char const* groupLabel)

Arguments
  • computePassEncoder:
  • groupLabel:

wgpuComputePassEncoderReference

void wgpuComputePassEncoderReference(
    WGPUComputePassEncoder computePassEncoder)

Arguments
  • computePassEncoder:

wgpuComputePassEncoderRelease

void wgpuComputePassEncoderRelease(
    WGPUComputePassEncoder computePassEncoder)

Arguments
  • computePassEncoder:

wgpuComputePassEncoderSetBindGroup

void wgpuComputePassEncoderSetBindGroup(
    WGPUComputePassEncoder computePassEncoder,
    uint32_t groupIndex,
    WGPUBindGroup group,
    uint32_t dynamicOffsetCount,
    uint32_t const* dynamicOffsets)

Arguments
  • computePassEncoder:
  • groupIndex:
  • group:
  • dynamicOffsetCount:
  • dynamicOffsets:

wgpuComputePassEncoderSetLabel

void wgpuComputePassEncoderSetLabel(
    WGPUComputePassEncoder computePassEncoder,
    char const* label)

Arguments
  • computePassEncoder:
  • label:

wgpuComputePassEncoderSetPipeline

void wgpuComputePassEncoderSetPipeline(
    WGPUComputePassEncoder computePassEncoder,
    WGPUComputePipeline pipeline)

Arguments
  • computePassEncoder:
  • pipeline:

wgpuComputePassEncoderWriteTimestamp

void wgpuComputePassEncoderWriteTimestamp(
    WGPUComputePassEncoder computePassEncoder,
    WGPUQuerySet querySet,
    uint32_t queryIndex)

Arguments
  • computePassEncoder:
  • querySet:
  • queryIndex:

Methods of WGPUComputePipeline

wgpuComputePipelineGetBindGroupLayout

WGPUBindGroupLayout wgpuComputePipelineGetBindGroupLayout(
    WGPUComputePipeline computePipeline,
    uint32_t groupIndex)

Returns
Arguments
  • computePipeline:
  • groupIndex:

wgpuComputePipelineReference

void wgpuComputePipelineReference(
    WGPUComputePipeline computePipeline)

Arguments
  • computePipeline:

wgpuComputePipelineRelease

void wgpuComputePipelineRelease(
    WGPUComputePipeline computePipeline)

Arguments
  • computePipeline:

wgpuComputePipelineSetLabel

void wgpuComputePipelineSetLabel(
    WGPUComputePipeline computePipeline,
    char const* label)

Arguments
  • computePipeline:
  • label:

Methods of WGPUDevice

wgpuDeviceCreateBindGroup

WGPUBindGroup wgpuDeviceCreateBindGroup(
    WGPUDevice device,
    WGPUBindGroupDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateBindGroupLayout

WGPUBindGroupLayout wgpuDeviceCreateBindGroupLayout(
    WGPUDevice device,
    WGPUBindGroupLayoutDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateBuffer

WGPUBuffer wgpuDeviceCreateBuffer(
    WGPUDevice device,
    WGPUBufferDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateCommandEncoder

WGPUCommandEncoder wgpuDeviceCreateCommandEncoder(
    WGPUDevice device,
    WGPUCommandEncoderDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateComputePipeline

WGPUComputePipeline wgpuDeviceCreateComputePipeline(
    WGPUDevice device,
    WGPUComputePipelineDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateComputePipelineAsync

void wgpuDeviceCreateComputePipelineAsync(
    WGPUDevice device,
    WGPUComputePipelineDescriptor const* descriptor,
    WGPUCreateComputePipelineAsyncCallback callback,
    void * userdata)

Arguments
  • device:
  • descriptor:
  • callback:
  • userdata:

wgpuDeviceCreateErrorBuffer

WGPUBuffer wgpuDeviceCreateErrorBuffer(
    WGPUDevice device,
    WGPUBufferDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateErrorExternalTexture

WGPUExternalTexture wgpuDeviceCreateErrorExternalTexture(
    WGPUDevice device)

Returns
Arguments
  • device:

wgpuDeviceCreateErrorTexture

WGPUTexture wgpuDeviceCreateErrorTexture(
    WGPUDevice device,
    WGPUTextureDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateExternalTexture

WGPUExternalTexture wgpuDeviceCreateExternalTexture(
    WGPUDevice device,
    WGPUExternalTextureDescriptor const* externalTextureDescriptor)

Returns
Arguments
  • device:
  • externalTextureDescriptor:

wgpuDeviceCreatePipelineLayout

WGPUPipelineLayout wgpuDeviceCreatePipelineLayout(
    WGPUDevice device,
    WGPUPipelineLayoutDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateQuerySet

WGPUQuerySet wgpuDeviceCreateQuerySet(
    WGPUDevice device,
    WGPUQuerySetDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateRenderBundleEncoder

WGPURenderBundleEncoder wgpuDeviceCreateRenderBundleEncoder(
    WGPUDevice device,
    WGPURenderBundleEncoderDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateRenderPipeline

WGPURenderPipeline wgpuDeviceCreateRenderPipeline(
    WGPUDevice device,
    WGPURenderPipelineDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateRenderPipelineAsync

void wgpuDeviceCreateRenderPipelineAsync(
    WGPUDevice device,
    WGPURenderPipelineDescriptor const* descriptor,
    WGPUCreateRenderPipelineAsyncCallback callback,
    void * userdata)

Arguments
  • device:
  • descriptor:
  • callback:
  • userdata:

wgpuDeviceCreateSampler

WGPUSampler wgpuDeviceCreateSampler(
    WGPUDevice device,
    WGPUSamplerDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateShaderModule

WGPUShaderModule wgpuDeviceCreateShaderModule(
    WGPUDevice device,
    WGPUShaderModuleDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceCreateSwapChain

WGPUSwapChain wgpuDeviceCreateSwapChain(
    WGPUDevice device,
    WGPUSurface surface,
    WGPUSwapChainDescriptor const* descriptor)

Returns
Arguments
  • device:
  • surface:
  • descriptor:

wgpuDeviceCreateSwapChain

WGPUSwapChain wgpuDeviceCreateSwapChain(
    WGPUDevice device,
    WGPUSurface surface,
    WGPUSwapChainDescriptor const* descriptor)

Returns
Arguments
  • device:
  • surface:
  • descriptor:

wgpuDeviceCreateTexture

WGPUTexture wgpuDeviceCreateTexture(
    WGPUDevice device,
    WGPUTextureDescriptor const* descriptor)

Returns
Arguments
  • device:
  • descriptor:

wgpuDeviceDestroy

void wgpuDeviceDestroy(
    WGPUDevice device)

Arguments
  • device:

wgpuDeviceEnumerateFeatures

size_t wgpuDeviceEnumerateFeatures(
    WGPUDevice device,
    WGPUFeatureName * features)

Returns
Arguments
  • device:
  • features:

wgpuDeviceForceLoss

void wgpuDeviceForceLoss(
    WGPUDevice device,
    WGPUDeviceLostReason type,
    char const* message)

Arguments
  • device:
  • type:
  • message:

wgpuDeviceGetAdapter

WGPUAdapter wgpuDeviceGetAdapter(
    WGPUDevice device)

Returns
Arguments
  • device:

wgpuDeviceGetLimits

bool wgpuDeviceGetLimits(
    WGPUDevice device,
    WGPUSupportedLimits * limits)

Returns
Arguments
  • device:
  • limits:

wgpuDeviceGetQueue

WGPUQueue wgpuDeviceGetQueue(
    WGPUDevice device)

Returns
Arguments
  • device:

wgpuDeviceHasFeature

bool wgpuDeviceHasFeature(
    WGPUDevice device,
    WGPUFeatureName feature)

Returns
Arguments
  • device:
  • feature:

wgpuDeviceInjectError

void wgpuDeviceInjectError(
    WGPUDevice device,
    WGPUErrorType type,
    char const* message)

Arguments
  • device:
  • type:
  • message:

wgpuDevicePopErrorScope

bool wgpuDevicePopErrorScope(
    WGPUDevice device,
    WGPUErrorCallback callback,
    void * userdata)

Returns
Arguments
  • device:
  • callback:
  • userdata:

wgpuDevicePushErrorScope

void wgpuDevicePushErrorScope(
    WGPUDevice device,
    WGPUErrorFilter filter)

Arguments
  • device:
  • filter:

wgpuDeviceReference

void wgpuDeviceReference(
    WGPUDevice device)

Arguments
  • device:

wgpuDeviceRelease

void wgpuDeviceRelease(
    WGPUDevice device)

Arguments
  • device:

wgpuDeviceSetDeviceLostCallback

void wgpuDeviceSetDeviceLostCallback(
    WGPUDevice device,
    WGPUDeviceLostCallback callback,
    void * userdata)

Arguments
  • device:
  • callback:
  • userdata:

wgpuDeviceSetLabel

void wgpuDeviceSetLabel(
    WGPUDevice device,
    char const* label)

Arguments
  • device:
  • label:

wgpuDeviceSetLoggingCallback

void wgpuDeviceSetLoggingCallback(
    WGPUDevice device,
    WGPULoggingCallback callback,
    void * userdata)

Arguments
  • device:
  • callback:
  • userdata:

wgpuDeviceSetUncapturedErrorCallback

void wgpuDeviceSetUncapturedErrorCallback(
    WGPUDevice device,
    WGPUErrorCallback callback,
    void * userdata)

Arguments
  • device:
  • callback:
  • userdata:

wgpuDeviceTick

void wgpuDeviceTick(
    WGPUDevice device)

Arguments
  • device:

Methods of WGPUExternalTexture

wgpuExternalTextureDestroy

void wgpuExternalTextureDestroy(
    WGPUExternalTexture externalTexture)

Arguments
  • externalTexture:

wgpuExternalTextureReference

void wgpuExternalTextureReference(
    WGPUExternalTexture externalTexture)

Arguments
  • externalTexture:

wgpuExternalTextureRelease

void wgpuExternalTextureRelease(
    WGPUExternalTexture externalTexture)

Arguments
  • externalTexture:

wgpuExternalTextureSetLabel

void wgpuExternalTextureSetLabel(
    WGPUExternalTexture externalTexture,
    char const* label)

Arguments
  • externalTexture:
  • label:

Methods of WGPUInstance

wgpuInstanceCreateSurface

WGPUSurface wgpuInstanceCreateSurface(
    WGPUInstance instance,
    WGPUSurfaceDescriptor const* descriptor)

Returns
Arguments
  • instance:
  • descriptor:

wgpuInstanceProcessEvents

void wgpuInstanceProcessEvents(
    WGPUInstance instance)

Arguments
  • instance:

wgpuInstanceReference

void wgpuInstanceReference(
    WGPUInstance instance)

Arguments
  • instance:

wgpuInstanceRelease

void wgpuInstanceRelease(
    WGPUInstance instance)

Arguments
  • instance:

wgpuInstanceRequestAdapter

void wgpuInstanceRequestAdapter(
    WGPUInstance instance,
    WGPURequestAdapterOptions const* options,
    WGPURequestAdapterCallback callback,
    void * userdata)

Arguments
  • instance:
  • options:
  • callback:
  • userdata:

Methods of WGPUPipelineLayout

wgpuPipelineLayoutReference

void wgpuPipelineLayoutReference(
    WGPUPipelineLayout pipelineLayout)

Arguments
  • pipelineLayout:

wgpuPipelineLayoutRelease

void wgpuPipelineLayoutRelease(
    WGPUPipelineLayout pipelineLayout)

Arguments
  • pipelineLayout:

wgpuPipelineLayoutSetLabel

void wgpuPipelineLayoutSetLabel(
    WGPUPipelineLayout pipelineLayout,
    char const* label)

Arguments
  • pipelineLayout:
  • label:

Methods of WGPUQuerySet

wgpuQuerySetDestroy

void wgpuQuerySetDestroy(
    WGPUQuerySet querySet)

Arguments
  • querySet:

wgpuQuerySetGetCount

uint32_t wgpuQuerySetGetCount(
    WGPUQuerySet querySet)

Returns
Arguments
  • querySet:

wgpuQuerySetGetType

WGPUQueryType wgpuQuerySetGetType(
    WGPUQuerySet querySet)

Returns
Arguments
  • querySet:

wgpuQuerySetReference

void wgpuQuerySetReference(
    WGPUQuerySet querySet)

Arguments
  • querySet:

wgpuQuerySetRelease

void wgpuQuerySetRelease(
    WGPUQuerySet querySet)

Arguments
  • querySet:

wgpuQuerySetSetLabel

void wgpuQuerySetSetLabel(
    WGPUQuerySet querySet,
    char const* label)

Arguments
  • querySet:
  • label:

Methods of WGPUQueue

wgpuQueueCopyExternalTextureForBrowser

void wgpuQueueCopyExternalTextureForBrowser(
    WGPUQueue queue,
    WGPUImageCopyExternalTexture const* source,
    WGPUImageCopyTexture const* destination,
    WGPUExtent3D const* copySize,
    WGPUCopyTextureForBrowserOptions const* options)

Arguments
  • queue:
  • source:
  • destination:
  • copySize:
  • options:

wgpuQueueCopyTextureForBrowser

void wgpuQueueCopyTextureForBrowser(
    WGPUQueue queue,
    WGPUImageCopyTexture const* source,
    WGPUImageCopyTexture const* destination,
    WGPUExtent3D const* copySize,
    WGPUCopyTextureForBrowserOptions const* options)

Arguments
  • queue:
  • source:
  • destination:
  • copySize:
  • options:

wgpuQueueOnSubmittedWorkDone

void wgpuQueueOnSubmittedWorkDone(
    WGPUQueue queue,
    uint64_t signalValue,
    WGPUQueueWorkDoneCallback callback,
    void * userdata)

Arguments
  • queue:
  • signalValue:
  • callback:
  • userdata:

wgpuQueueOnSubmittedWorkDone

void wgpuQueueOnSubmittedWorkDone(
    WGPUQueue queue,
    WGPUQueueWorkDoneCallback callback,
    void * userdata)

Arguments
  • queue:
  • callback:
  • userdata:

wgpuQueueReference

void wgpuQueueReference(
    WGPUQueue queue)

Arguments
  • queue:

wgpuQueueRelease

void wgpuQueueRelease(
    WGPUQueue queue)

Arguments
  • queue:

wgpuQueueSetLabel

void wgpuQueueSetLabel(
    WGPUQueue queue,
    char const* label)

Arguments
  • queue:
  • label:

wgpuQueueSubmit

void wgpuQueueSubmit(
    WGPUQueue queue,
    uint32_t commandCount,
    WGPUCommandBuffer const* commands)

Arguments
  • queue:
  • commandCount:
  • commands:

wgpuQueueWriteBuffer

void wgpuQueueWriteBuffer(
    WGPUQueue queue,
    WGPUBuffer buffer,
    uint64_t bufferOffset,
    void const* data,
    size_t size)

Arguments
  • queue:
  • buffer:
  • bufferOffset:
  • data:
  • size:

wgpuQueueWriteTexture

void wgpuQueueWriteTexture(
    WGPUQueue queue,
    WGPUImageCopyTexture const* destination,
    void const* data,
    size_t dataSize,
    WGPUTextureDataLayout const* dataLayout,
    WGPUExtent3D const* writeSize)

Arguments
  • queue:
  • destination:
  • data:
  • dataSize:
  • dataLayout:
  • writeSize:

Methods of WGPURenderBundle

wgpuRenderBundleReference

void wgpuRenderBundleReference(
    WGPURenderBundle renderBundle)

Arguments
  • renderBundle:

wgpuRenderBundleRelease

void wgpuRenderBundleRelease(
    WGPURenderBundle renderBundle)

Arguments
  • renderBundle:

Methods of WGPURenderBundleEncoder

wgpuRenderBundleEncoderDraw

void wgpuRenderBundleEncoderDraw(
    WGPURenderBundleEncoder renderBundleEncoder,
    uint32_t vertexCount,
    uint32_t instanceCount,
    uint32_t firstVertex,
    uint32_t firstInstance)

Arguments
  • renderBundleEncoder:
  • vertexCount:
  • instanceCount:
  • firstVertex:
  • firstInstance:

wgpuRenderBundleEncoderDrawIndexed

void wgpuRenderBundleEncoderDrawIndexed(
    WGPURenderBundleEncoder renderBundleEncoder,
    uint32_t indexCount,
    uint32_t instanceCount,
    uint32_t firstIndex,
    int32_t baseVertex,
    uint32_t firstInstance)

Arguments
  • renderBundleEncoder:
  • indexCount:
  • instanceCount:
  • firstIndex:
  • baseVertex:
  • firstInstance:

wgpuRenderBundleEncoderDrawIndexedIndirect

void wgpuRenderBundleEncoderDrawIndexedIndirect(
    WGPURenderBundleEncoder renderBundleEncoder,
    WGPUBuffer indirectBuffer,
    uint64_t indirectOffset)

Arguments
  • renderBundleEncoder:
  • indirectBuffer:
  • indirectOffset:

wgpuRenderBundleEncoderDrawIndirect

void wgpuRenderBundleEncoderDrawIndirect(
    WGPURenderBundleEncoder renderBundleEncoder,
    WGPUBuffer indirectBuffer,
    uint64_t indirectOffset)

Arguments
  • renderBundleEncoder:
  • indirectBuffer:
  • indirectOffset:

wgpuRenderBundleEncoderFinish

WGPURenderBundle wgpuRenderBundleEncoderFinish(
    WGPURenderBundleEncoder renderBundleEncoder,
    WGPURenderBundleDescriptor const* descriptor)

Returns
Arguments
  • renderBundleEncoder:
  • descriptor:

wgpuRenderBundleEncoderInsertDebugMarker

void wgpuRenderBundleEncoderInsertDebugMarker(
    WGPURenderBundleEncoder renderBundleEncoder,
    char const* markerLabel)

Arguments
  • renderBundleEncoder:
  • markerLabel:

wgpuRenderBundleEncoderPopDebugGroup

void wgpuRenderBundleEncoderPopDebugGroup(
    WGPURenderBundleEncoder renderBundleEncoder)

Arguments
  • renderBundleEncoder:

wgpuRenderBundleEncoderPushDebugGroup

void wgpuRenderBundleEncoderPushDebugGroup(
    WGPURenderBundleEncoder renderBundleEncoder,
    char const* groupLabel)

Arguments
  • renderBundleEncoder:
  • groupLabel:

wgpuRenderBundleEncoderReference

void wgpuRenderBundleEncoderReference(
    WGPURenderBundleEncoder renderBundleEncoder)

Arguments
  • renderBundleEncoder:

wgpuRenderBundleEncoderRelease

void wgpuRenderBundleEncoderRelease(
    WGPURenderBundleEncoder renderBundleEncoder)

Arguments
  • renderBundleEncoder:

wgpuRenderBundleEncoderSetBindGroup

void wgpuRenderBundleEncoderSetBindGroup(
    WGPURenderBundleEncoder renderBundleEncoder,
    uint32_t groupIndex,
    WGPUBindGroup group,
    uint32_t dynamicOffsetCount,
    uint32_t const* dynamicOffsets)

Arguments
  • renderBundleEncoder:
  • groupIndex:
  • group:
  • dynamicOffsetCount:
  • dynamicOffsets:

wgpuRenderBundleEncoderSetIndexBuffer

void wgpuRenderBundleEncoderSetIndexBuffer(
    WGPURenderBundleEncoder renderBundleEncoder,
    WGPUBuffer buffer,
    WGPUIndexFormat format,
    uint64_t offset,
    uint64_t size)

Arguments
  • renderBundleEncoder:
  • buffer:
  • format:
  • offset:
  • size:

wgpuRenderBundleEncoderSetLabel

void wgpuRenderBundleEncoderSetLabel(
    WGPURenderBundleEncoder renderBundleEncoder,
    char const* label)

Arguments
  • renderBundleEncoder:
  • label:

wgpuRenderBundleEncoderSetPipeline

void wgpuRenderBundleEncoderSetPipeline(
    WGPURenderBundleEncoder renderBundleEncoder,
    WGPURenderPipeline pipeline)

Arguments
  • renderBundleEncoder:
  • pipeline:

wgpuRenderBundleEncoderSetVertexBuffer

void wgpuRenderBundleEncoderSetVertexBuffer(
    WGPURenderBundleEncoder renderBundleEncoder,
    uint32_t slot,
    WGPUBuffer buffer,
    uint64_t offset,
    uint64_t size)

Arguments
  • renderBundleEncoder:
  • slot:
  • buffer:
  • offset:
  • size:

Methods of WGPURenderPassEncoder

wgpuRenderPassEncoderBeginOcclusionQuery

void wgpuRenderPassEncoderBeginOcclusionQuery(
    WGPURenderPassEncoder renderPassEncoder,
    uint32_t queryIndex)

Arguments
  • renderPassEncoder:
  • queryIndex:

wgpuRenderPassEncoderBeginPipelineStatisticsQuery

void wgpuRenderPassEncoderBeginPipelineStatisticsQuery(
    WGPURenderPassEncoder renderPassEncoder,
    WGPUQuerySet querySet,
    uint32_t queryIndex)

Arguments
  • renderPassEncoder:
  • querySet:
  • queryIndex:

wgpuRenderPassEncoderDraw

void wgpuRenderPassEncoderDraw(
    WGPURenderPassEncoder renderPassEncoder,
    uint32_t vertexCount,
    uint32_t instanceCount,
    uint32_t firstVertex,
    uint32_t firstInstance)

Arguments
  • renderPassEncoder:
  • vertexCount:
  • instanceCount:
  • firstVertex:
  • firstInstance:

wgpuRenderPassEncoderDrawIndexed

void wgpuRenderPassEncoderDrawIndexed(
    WGPURenderPassEncoder renderPassEncoder,
    uint32_t indexCount,
    uint32_t instanceCount,
    uint32_t firstIndex,
    int32_t baseVertex,
    uint32_t firstInstance)

Arguments
  • renderPassEncoder:
  • indexCount:
  • instanceCount:
  • firstIndex:
  • baseVertex:
  • firstInstance:

wgpuRenderPassEncoderDrawIndexedIndirect

void wgpuRenderPassEncoderDrawIndexedIndirect(
    WGPURenderPassEncoder renderPassEncoder,
    WGPUBuffer indirectBuffer,
    uint64_t indirectOffset)

Arguments
  • renderPassEncoder:
  • indirectBuffer:
  • indirectOffset:

wgpuRenderPassEncoderDrawIndirect

void wgpuRenderPassEncoderDrawIndirect(
    WGPURenderPassEncoder renderPassEncoder,
    WGPUBuffer indirectBuffer,
    uint64_t indirectOffset)

Arguments
  • renderPassEncoder:
  • indirectBuffer:
  • indirectOffset:

wgpuRenderPassEncoderEnd

void wgpuRenderPassEncoderEnd(
    WGPURenderPassEncoder renderPassEncoder)

Arguments
  • renderPassEncoder:

wgpuRenderPassEncoderEndOcclusionQuery

void wgpuRenderPassEncoderEndOcclusionQuery(
    WGPURenderPassEncoder renderPassEncoder)

Arguments
  • renderPassEncoder:

wgpuRenderPassEncoderEndPass

void wgpuRenderPassEncoderEndPass(
    WGPURenderPassEncoder renderPassEncoder)

Arguments
  • renderPassEncoder:

wgpuRenderPassEncoderEndPipelineStatisticsQuery

void wgpuRenderPassEncoderEndPipelineStatisticsQuery(
    WGPURenderPassEncoder renderPassEncoder)

Arguments
  • renderPassEncoder:

wgpuRenderPassEncoderExecuteBundles

void wgpuRenderPassEncoderExecuteBundles(
    WGPURenderPassEncoder renderPassEncoder,
    uint32_t bundleCount,
    WGPURenderBundle const* bundles)

Arguments
  • renderPassEncoder:
  • bundleCount:
  • bundles:

wgpuRenderPassEncoderInsertDebugMarker

void wgpuRenderPassEncoderInsertDebugMarker(
    WGPURenderPassEncoder renderPassEncoder,
    char const* markerLabel)

Arguments
  • renderPassEncoder:
  • markerLabel:

wgpuRenderPassEncoderPopDebugGroup

void wgpuRenderPassEncoderPopDebugGroup(
    WGPURenderPassEncoder renderPassEncoder)

Arguments
  • renderPassEncoder:

wgpuRenderPassEncoderPushDebugGroup

void wgpuRenderPassEncoderPushDebugGroup(
    WGPURenderPassEncoder renderPassEncoder,
    char const* groupLabel)

Arguments
  • renderPassEncoder:
  • groupLabel:

wgpuRenderPassEncoderReference

void wgpuRenderPassEncoderReference(
    WGPURenderPassEncoder renderPassEncoder)

Arguments
  • renderPassEncoder:

wgpuRenderPassEncoderRelease

void wgpuRenderPassEncoderRelease(
    WGPURenderPassEncoder renderPassEncoder)

Arguments
  • renderPassEncoder:

wgpuRenderPassEncoderSetBindGroup

void wgpuRenderPassEncoderSetBindGroup(
    WGPURenderPassEncoder renderPassEncoder,
    uint32_t groupIndex,
    WGPUBindGroup group,
    uint32_t dynamicOffsetCount,
    uint32_t const* dynamicOffsets)

Arguments
  • renderPassEncoder:
  • groupIndex:
  • group:
  • dynamicOffsetCount:
  • dynamicOffsets:

wgpuRenderPassEncoderSetBlendConstant

void wgpuRenderPassEncoderSetBlendConstant(
    WGPURenderPassEncoder renderPassEncoder,
    WGPUColor const* color)

Arguments
  • renderPassEncoder:
  • color:

wgpuRenderPassEncoderSetIndexBuffer

void wgpuRenderPassEncoderSetIndexBuffer(
    WGPURenderPassEncoder renderPassEncoder,
    WGPUBuffer buffer,
    WGPUIndexFormat format,
    uint64_t offset,
    uint64_t size)

Arguments
  • renderPassEncoder:
  • buffer:
  • format:
  • offset:
  • size:

wgpuRenderPassEncoderSetLabel

void wgpuRenderPassEncoderSetLabel(
    WGPURenderPassEncoder renderPassEncoder,
    char const* label)

Arguments
  • renderPassEncoder:
  • label:

wgpuRenderPassEncoderSetPipeline

void wgpuRenderPassEncoderSetPipeline(
    WGPURenderPassEncoder renderPassEncoder,
    WGPURenderPipeline pipeline)

Arguments
  • renderPassEncoder:
  • pipeline:

wgpuRenderPassEncoderSetScissorRect

void wgpuRenderPassEncoderSetScissorRect(
    WGPURenderPassEncoder renderPassEncoder,
    uint32_t x,
    uint32_t y,
    uint32_t width,
    uint32_t height)

Arguments
  • renderPassEncoder:
  • x:
  • y:
  • width:
  • height:

wgpuRenderPassEncoderSetStencilReference

void wgpuRenderPassEncoderSetStencilReference(
    WGPURenderPassEncoder renderPassEncoder,
    uint32_t reference)

Arguments
  • renderPassEncoder:
  • reference:

wgpuRenderPassEncoderSetVertexBuffer

void wgpuRenderPassEncoderSetVertexBuffer(
    WGPURenderPassEncoder renderPassEncoder,
    uint32_t slot,
    WGPUBuffer buffer,
    uint64_t offset,
    uint64_t size)

Arguments
  • renderPassEncoder:
  • slot:
  • buffer:
  • offset:
  • size:

wgpuRenderPassEncoderSetViewport

void wgpuRenderPassEncoderSetViewport(
    WGPURenderPassEncoder renderPassEncoder,
    float x,
    float y,
    float width,
    float height,
    float minDepth,
    float maxDepth)

Arguments
  • renderPassEncoder:
  • x:
  • y:
  • width:
  • height:
  • minDepth:
  • maxDepth:

wgpuRenderPassEncoderWriteTimestamp

void wgpuRenderPassEncoderWriteTimestamp(
    WGPURenderPassEncoder renderPassEncoder,
    WGPUQuerySet querySet,
    uint32_t queryIndex)

Arguments
  • renderPassEncoder:
  • querySet:
  • queryIndex:

Methods of WGPURenderPipeline

wgpuRenderPipelineGetBindGroupLayout

WGPUBindGroupLayout wgpuRenderPipelineGetBindGroupLayout(
    WGPURenderPipeline renderPipeline,
    uint32_t groupIndex)

Returns
Arguments
  • renderPipeline:
  • groupIndex:

wgpuRenderPipelineReference

void wgpuRenderPipelineReference(
    WGPURenderPipeline renderPipeline)

Arguments
  • renderPipeline:

wgpuRenderPipelineRelease

void wgpuRenderPipelineRelease(
    WGPURenderPipeline renderPipeline)

Arguments
  • renderPipeline:

wgpuRenderPipelineSetLabel

void wgpuRenderPipelineSetLabel(
    WGPURenderPipeline renderPipeline,
    char const* label)

Arguments
  • renderPipeline:
  • label:

Methods of WGPUSampler

wgpuSamplerReference

void wgpuSamplerReference(
    WGPUSampler sampler)

Arguments
  • sampler:

wgpuSamplerRelease

void wgpuSamplerRelease(
    WGPUSampler sampler)

Arguments
  • sampler:

wgpuSamplerSetLabel

void wgpuSamplerSetLabel(
    WGPUSampler sampler,
    char const* label)

Arguments
  • sampler:
  • label:

Methods of WGPUShaderModule

wgpuShaderModuleGetCompilationInfo

void wgpuShaderModuleGetCompilationInfo(
    WGPUShaderModule shaderModule,
    WGPUCompilationInfoCallback callback,
    void * userdata)

Arguments
  • shaderModule:
  • callback:
  • userdata:

wgpuShaderModuleReference

void wgpuShaderModuleReference(
    WGPUShaderModule shaderModule)

Arguments
  • shaderModule:

wgpuShaderModuleRelease

void wgpuShaderModuleRelease(
    WGPUShaderModule shaderModule)

Arguments
  • shaderModule:

wgpuShaderModuleSetLabel

void wgpuShaderModuleSetLabel(
    WGPUShaderModule shaderModule,
    char const* label)

Arguments
  • shaderModule:
  • label:

Methods of WGPUSurface

wgpuSurfaceGetPreferredFormat

WGPUTextureFormat wgpuSurfaceGetPreferredFormat(
    WGPUSurface surface,
    WGPUAdapter adapter)

Returns
Arguments
  • surface:
  • adapter:

wgpuSurfaceReference

void wgpuSurfaceReference(
    WGPUSurface surface)

Arguments
  • surface:

wgpuSurfaceRelease

void wgpuSurfaceRelease(
    WGPUSurface surface)

Arguments
  • surface:

Methods of WGPUSwapChain

wgpuSwapChainConfigure

void wgpuSwapChainConfigure(
    WGPUSwapChain swapChain,
    WGPUTextureFormat format,
    WGPUTextureUsage allowedUsage,
    uint32_t width,
    uint32_t height)

Arguments
  • swapChain:
  • format:
  • allowedUsage:
  • width:
  • height:

wgpuSwapChainGetCurrentTextureView

WGPUTextureView wgpuSwapChainGetCurrentTextureView(
    WGPUSwapChain swapChain)

Returns
Arguments
  • swapChain:

wgpuSwapChainPresent

void wgpuSwapChainPresent(
    WGPUSwapChain swapChain)

Arguments
  • swapChain:

wgpuSwapChainReference

void wgpuSwapChainReference(
    WGPUSwapChain swapChain)

Arguments
  • swapChain:

wgpuSwapChainRelease

void wgpuSwapChainRelease(
    WGPUSwapChain swapChain)

Arguments
  • swapChain:

Methods of WGPUTexture

wgpuTextureCreateView

WGPUTextureView wgpuTextureCreateView(
    WGPUTexture texture,
    WGPUTextureViewDescriptor const* descriptor)

Returns
Arguments
  • texture:
  • descriptor:

wgpuTextureDestroy

void wgpuTextureDestroy(
    WGPUTexture texture)

Arguments
  • texture:

wgpuTextureGetDepthOrArrayLayers

uint32_t wgpuTextureGetDepthOrArrayLayers(
    WGPUTexture texture)

Returns
Arguments
  • texture:

wgpuTextureGetDimension

WGPUTextureDimension wgpuTextureGetDimension(
    WGPUTexture texture)

Returns
Arguments
  • texture:

wgpuTextureGetFormat

WGPUTextureFormat wgpuTextureGetFormat(
    WGPUTexture texture)

Returns
Arguments
  • texture:

wgpuTextureGetHeight

uint32_t wgpuTextureGetHeight(
    WGPUTexture texture)

Returns
Arguments
  • texture:

wgpuTextureGetMipLevelCount

uint32_t wgpuTextureGetMipLevelCount(
    WGPUTexture texture)

Returns
Arguments
  • texture:

wgpuTextureGetSampleCount

uint32_t wgpuTextureGetSampleCount(
    WGPUTexture texture)

Returns
Arguments
  • texture:

wgpuTextureGetUsage

WGPUTextureUsage wgpuTextureGetUsage(
    WGPUTexture texture)

Returns
Arguments
  • texture:

wgpuTextureGetWidth

uint32_t wgpuTextureGetWidth(
    WGPUTexture texture)

Returns
Arguments
  • texture:

wgpuTextureReference

void wgpuTextureReference(
    WGPUTexture texture)

Arguments
  • texture:

wgpuTextureRelease

void wgpuTextureRelease(
    WGPUTexture texture)

Arguments
  • texture:

wgpuTextureSetLabel

void wgpuTextureSetLabel(
    WGPUTexture texture,
    char const* label)

Arguments
  • texture:
  • label:

Methods of WGPUTextureView

wgpuTextureViewReference

void wgpuTextureViewReference(
    WGPUTextureView textureView)

Arguments
  • textureView:

wgpuTextureViewRelease

void wgpuTextureViewRelease(
    WGPUTextureView textureView)

Arguments
  • textureView:

wgpuTextureViewSetLabel

void wgpuTextureViewSetLabel(
    WGPUTextureView textureView,
    char const* label)

Arguments
  • textureView:
  • label: