playbit / docs / runtime

WebGPU

Playbit uses WebGPU as the system GPU interface, defined by <webgpu/webgpu.h>

The runtime interface for these functions is the syscall PBSysThreadWGpuOp and PBSysThreadWGpuOpAsync. Our C library provides C implementations of the wgpu functions defined by webgpu/webgpu.h on top of these syscalls.

API status

This section tracks the WebGPU C API exposed by webgpu/webgpu.h.

"Portable API v1" (P1) is the WebGPU C API subset which Playbit intends to support on both native and web runtimes.

P1 = Portable API v1 (124)
Native implemented: 149/254
Web implemented: 66/254
● = Implemented
○ = Not implemented
✗ = Unavailable (2)

Function P1 Native Web
wgpuCreateInstance
wgpuGetInstanceFeatures
wgpuGetInstanceLimits
wgpuHasInstanceFeature
wgpuGetProcAddress
wgpuAdapterCreateDevice
wgpuAdapterGetFeatures
wgpuAdapterGetFormatCapabilities
wgpuAdapterGetInfo
wgpuAdapterGetInstance
wgpuAdapterGetLimits
wgpuAdapterHasFeature
wgpuAdapterRequestDevice
wgpuAdapterAddRef
wgpuAdapterRelease
wgpuAdapterInfoFreeMembers
wgpuAdapterPropertiesMemoryHeapsFreeMembers
wgpuAdapterPropertiesSubgroupMatrixConfigsFreeMembers
wgpuBindGroupSetLabel
wgpuBindGroupAddRef
wgpuBindGroupRelease
wgpuBindGroupLayoutSetLabel
wgpuBindGroupLayoutAddRef
wgpuBindGroupLayoutRelease
wgpuBufferDestroy
wgpuBufferGetConstMappedRange
wgpuBufferGetMappedRange
wgpuBufferGetMapState
wgpuBufferGetSize
wgpuBufferGetUsage
wgpuBufferMapAsync
wgpuBufferReadMappedRange
wgpuBufferSetLabel
wgpuBufferUnmap
wgpuBufferWriteMappedRange
wgpuBufferAddRef
wgpuBufferRelease
wgpuCommandBufferSetLabel
wgpuCommandBufferAddRef
wgpuCommandBufferRelease
wgpuCommandEncoderBeginComputePass
wgpuCommandEncoderBeginRenderPass
wgpuCommandEncoderClearBuffer
wgpuCommandEncoderCopyBufferToBuffer
wgpuCommandEncoderCopyBufferToTexture
wgpuCommandEncoderCopyTextureToBuffer
wgpuCommandEncoderCopyTextureToTexture
wgpuCommandEncoderFinish
wgpuCommandEncoderInjectValidationError
wgpuCommandEncoderInsertDebugMarker
wgpuCommandEncoderPopDebugGroup
wgpuCommandEncoderPushDebugGroup
wgpuCommandEncoderResolveQuerySet
wgpuCommandEncoderSetLabel
wgpuCommandEncoderWriteBuffer
wgpuCommandEncoderWriteTimestamp
wgpuCommandEncoderAddRef
wgpuCommandEncoderRelease
wgpuComputePassEncoderDispatchWorkgroups
wgpuComputePassEncoderDispatchWorkgroupsIndirect
wgpuComputePassEncoderEnd
wgpuComputePassEncoderInsertDebugMarker
wgpuComputePassEncoderPopDebugGroup
wgpuComputePassEncoderPushDebugGroup
wgpuComputePassEncoderSetBindGroup
wgpuComputePassEncoderSetImmediateData
wgpuComputePassEncoderSetLabel
wgpuComputePassEncoderSetPipeline
wgpuComputePassEncoderWriteTimestamp
wgpuComputePassEncoderAddRef
wgpuComputePassEncoderRelease
wgpuComputePipelineGetBindGroupLayout
wgpuComputePipelineSetLabel
wgpuComputePipelineAddRef
wgpuComputePipelineRelease
wgpuDawnDrmFormatCapabilitiesFreeMembers
wgpuDeviceCreateBindGroup
wgpuDeviceCreateBindGroupLayout
wgpuDeviceCreateBuffer
wgpuDeviceCreateCommandEncoder
wgpuDeviceCreateComputePipeline
wgpuDeviceCreateComputePipelineAsync
wgpuDeviceCreateErrorBuffer
wgpuDeviceCreateErrorExternalTexture
wgpuDeviceCreateErrorShaderModule
wgpuDeviceCreateErrorTexture
wgpuDeviceCreateExternalTexture
wgpuDeviceCreatePipelineLayout
wgpuDeviceCreateQuerySet
wgpuDeviceCreateRenderBundleEncoder
wgpuDeviceCreateRenderPipeline
wgpuDeviceCreateRenderPipelineAsync
wgpuDeviceCreateSampler
wgpuDeviceCreateShaderModule
wgpuDeviceCreateTexture
wgpuDeviceDestroy
wgpuDeviceForceLoss
wgpuDeviceGetAdapter
wgpuDeviceGetAdapterInfo
wgpuDeviceGetAHardwareBufferProperties
wgpuDeviceGetFeatures
wgpuDeviceGetLimits
wgpuDeviceGetLostFuture
wgpuDeviceGetQueue
wgpuDeviceHasFeature
wgpuDeviceImportSharedBufferMemory
wgpuDeviceImportSharedFence
wgpuDeviceImportSharedTextureMemory
wgpuDeviceInjectError
wgpuDevicePopErrorScope
wgpuDevicePushErrorScope
wgpuDeviceSetLabel
wgpuDeviceSetLoggingCallback
wgpuDeviceTick
wgpuDeviceValidateTextureDescriptor
wgpuDeviceAddRef
wgpuDeviceRelease
wgpuExternalTextureDestroy
wgpuExternalTextureExpire
wgpuExternalTextureRefresh
wgpuExternalTextureSetLabel
wgpuExternalTextureAddRef
wgpuExternalTextureRelease
wgpuInstanceCreateSurface
wgpuInstanceGetWGSLLanguageFeatures
wgpuInstanceHasWGSLLanguageFeature
wgpuInstanceProcessEvents
wgpuInstanceRequestAdapter
wgpuInstanceWaitAny
wgpuInstanceAddRef
wgpuInstanceRelease
wgpuPipelineLayoutSetLabel
wgpuPipelineLayoutAddRef
wgpuPipelineLayoutRelease
wgpuQuerySetDestroy
wgpuQuerySetGetCount
wgpuQuerySetGetType
wgpuQuerySetSetLabel
wgpuQuerySetAddRef
wgpuQuerySetRelease
wgpuQueueCopyExternalTextureForBrowser
wgpuQueueCopyTextureForBrowser
wgpuQueueOnSubmittedWorkDone
wgpuQueueSetLabel
wgpuQueueSubmit
wgpuQueueWriteBuffer
wgpuQueueWriteTexture
wgpuQueueAddRef
wgpuQueueRelease
wgpuRenderBundleSetLabel
wgpuRenderBundleAddRef
wgpuRenderBundleRelease
wgpuRenderBundleEncoderDraw
wgpuRenderBundleEncoderDrawIndexed
wgpuRenderBundleEncoderDrawIndexedIndirect
wgpuRenderBundleEncoderDrawIndirect
wgpuRenderBundleEncoderFinish
wgpuRenderBundleEncoderInsertDebugMarker
wgpuRenderBundleEncoderPopDebugGroup
wgpuRenderBundleEncoderPushDebugGroup
wgpuRenderBundleEncoderSetBindGroup
wgpuRenderBundleEncoderSetImmediateData
wgpuRenderBundleEncoderSetIndexBuffer
wgpuRenderBundleEncoderSetLabel
wgpuRenderBundleEncoderSetPipeline
wgpuRenderBundleEncoderSetVertexBuffer
wgpuRenderBundleEncoderAddRef
wgpuRenderBundleEncoderRelease
wgpuRenderPassEncoderBeginOcclusionQuery
wgpuRenderPassEncoderDraw
wgpuRenderPassEncoderDrawIndexed
wgpuRenderPassEncoderDrawIndexedIndirect
wgpuRenderPassEncoderDrawIndirect
wgpuRenderPassEncoderEnd
wgpuRenderPassEncoderEndOcclusionQuery
wgpuRenderPassEncoderExecuteBundles
wgpuRenderPassEncoderInsertDebugMarker
wgpuRenderPassEncoderMultiDrawIndexedIndirect
wgpuRenderPassEncoderMultiDrawIndirect
wgpuRenderPassEncoderPixelLocalStorageBarrier
wgpuRenderPassEncoderPopDebugGroup
wgpuRenderPassEncoderPushDebugGroup
wgpuRenderPassEncoderSetBindGroup
wgpuRenderPassEncoderSetBlendConstant
wgpuRenderPassEncoderSetImmediateData
wgpuRenderPassEncoderSetIndexBuffer
wgpuRenderPassEncoderSetLabel
wgpuRenderPassEncoderSetPipeline
wgpuRenderPassEncoderSetScissorRect
wgpuRenderPassEncoderSetStencilReference
wgpuRenderPassEncoderSetVertexBuffer
wgpuRenderPassEncoderSetViewport
wgpuRenderPassEncoderWriteTimestamp
wgpuRenderPassEncoderAddRef
wgpuRenderPassEncoderRelease
wgpuRenderPipelineGetBindGroupLayout
wgpuRenderPipelineSetLabel
wgpuRenderPipelineAddRef
wgpuRenderPipelineRelease
wgpuSamplerSetLabel
wgpuSamplerAddRef
wgpuSamplerRelease
wgpuShaderModuleGetCompilationInfo
wgpuShaderModuleSetLabel
wgpuShaderModuleAddRef
wgpuShaderModuleRelease
wgpuSharedBufferMemoryBeginAccess
wgpuSharedBufferMemoryCreateBuffer
wgpuSharedBufferMemoryEndAccess
wgpuSharedBufferMemoryGetProperties
wgpuSharedBufferMemoryIsDeviceLost
wgpuSharedBufferMemorySetLabel
wgpuSharedBufferMemoryAddRef
wgpuSharedBufferMemoryRelease
wgpuSharedBufferMemoryEndAccessStateFreeMembers
wgpuSharedFenceExportInfo
wgpuSharedFenceAddRef
wgpuSharedFenceRelease
wgpuSharedTextureMemoryBeginAccess
wgpuSharedTextureMemoryCreateTexture
wgpuSharedTextureMemoryEndAccess
wgpuSharedTextureMemoryGetProperties
wgpuSharedTextureMemoryIsDeviceLost
wgpuSharedTextureMemorySetLabel
wgpuSharedTextureMemoryAddRef
wgpuSharedTextureMemoryRelease
wgpuSharedTextureMemoryEndAccessStateFreeMembers
wgpuSupportedFeaturesFreeMembers
wgpuSupportedInstanceFeaturesFreeMembers
wgpuSupportedWGSLLanguageFeaturesFreeMembers
wgpuSurfaceConfigure
wgpuSurfaceGetCapabilities
wgpuSurfaceGetCurrentTexture
wgpuSurfacePresent
wgpuSurfaceSetLabel
wgpuSurfaceUnconfigure
wgpuSurfaceAddRef
wgpuSurfaceRelease
wgpuSurfaceCapabilitiesFreeMembers
wgpuTextureCreateErrorView
wgpuTextureCreateView
wgpuTextureDestroy
wgpuTextureGetDepthOrArrayLayers
wgpuTextureGetDimension
wgpuTextureGetFormat
wgpuTextureGetHeight
wgpuTextureGetMipLevelCount
wgpuTextureGetSampleCount
wgpuTextureGetUsage
wgpuTextureGetWidth
wgpuTextureSetLabel
wgpuTextureAddRef
wgpuTextureRelease
wgpuTextureViewSetLabel
wgpuTextureViewAddRef
wgpuTextureViewRelease