// Copyright 2025 International Digital Economy Academy
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

///|
/// WebGPU C API bindings (generated).
///
/// This file exists to satisfy `#declaration_only` items in
/// `src/c/webgpu_capi_spec.mbt`, so `moon check` has zero
/// `declaration_unimplemented` warnings.
///
/// Generated by: scripts/gen_webgpu_capi_spec.py

///|
#external
pub type UIntPtr

///|
#external
pub type UnitPtr

///|
#external
#alias(UnitPtr)
pub type WGPUAdapter

///|
#external
pub type WGPUAdapterInfo

///|
#external
#alias(UnitPtr)
pub type WGPUAdapterInfoPtr

///|
#external
#alias(UnitPtr)
pub type WGPUAdapterPtr

///|
#external
#alias(UnitPtr)
pub type WGPUBindGroup

///|
#external
#alias(UnitPtr)
pub type WGPUBindGroupDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPUBindGroupLayout

///|
#external
#alias(UnitPtr)
pub type WGPUBindGroupLayoutDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPUBuffer

///|
#external
#alias(UnitPtr)
pub type WGPUBufferDescriptorPtr

///|
#external
pub type WGPUBufferMapCallbackInfo

///|
#external
pub type WGPUBufferMapState

///|
#external
#alias(UnitPtr)
pub type WGPUColorPtr

///|
#external
#alias(UnitPtr)
pub type WGPUCommandBuffer

///|
#external
#alias(UnitPtr)
pub type WGPUCommandBufferDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPUCommandBufferPtr

///|
#external
#alias(UnitPtr)
pub type WGPUCommandEncoder

///|
#external
#alias(UnitPtr)
pub type WGPUCommandEncoderDescriptorPtr

///|
#external
pub type WGPUCompilationInfoCallbackInfo

///|
#external
#alias(UnitPtr)
pub type WGPUComputePassDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPUComputePassEncoder

///|
#external
#alias(UnitPtr)
pub type WGPUComputePipeline

///|
#external
#alias(UnitPtr)
pub type WGPUComputePipelineDescriptorPtr

///|
#external
pub type WGPUCreateComputePipelineAsyncCallbackInfo

///|
#external
pub type WGPUCreateRenderPipelineAsyncCallbackInfo

///|
#external
#alias(UnitPtr)
pub type WGPUDevice

///|
#external
#alias(UnitPtr)
pub type WGPUDeviceDescriptorPtr

///|
#external
pub type WGPUErrorFilter

///|
#external
#alias(UnitPtr)
pub type WGPUExtent3DPtr

///|
#external
pub type WGPUExternalTexture

///|
#external
pub type WGPUFeatureName

///|
#external
pub type WGPUFuture

///|
#external
#alias(UnitPtr)
pub type WGPUFutureWaitInfoPtr

///|
#external
#alias(UnitPtr)
pub type WGPUGlobalReportPtr

///|
#external
#alias(UnitPtr)
pub type WGPUImageSubresourceRangePtr

///|
#external
pub type WGPUIndexFormat

///|
#external
#alias(UnitPtr)
pub type WGPUInstance

///|
#external
#alias(UnitPtr)
pub type WGPUInstanceDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPUInstanceEnumerateAdapterOptionsPtr

///|
#external
pub type WGPUInstanceFeatureName

///|
#external
#alias(UnitPtr)
pub type WGPUInstanceLimitsPtr

///|
#external
#alias(UnitPtr)
pub type WGPULimitsPtr

///|
#external
pub type WGPULogCallback

///|
#external
#alias(UnitPtr)
pub type WGPUPipelineLayout

///|
#external
#alias(UnitPtr)
pub type WGPUPipelineLayoutDescriptorPtr

///|
#external
pub type WGPUPopErrorScopeCallbackInfo

///|
#external
pub type WGPUProc

///|
#external
#alias(UnitPtr)
pub type WGPUQuerySet

///|
#external
#alias(UnitPtr)
pub type WGPUQuerySetDescriptorPtr

///|
#external
pub type WGPUQueryType

///|
#external
#alias(UnitPtr)
pub type WGPUQueue

///|
#external
pub type WGPUQueueWorkDoneCallbackInfo

///|
#external
#alias(UnitPtr)
pub type WGPURenderBundle

///|
#external
#alias(UnitPtr)
pub type WGPURenderBundleDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPURenderBundleEncoder

///|
#external
#alias(UnitPtr)
pub type WGPURenderBundleEncoderDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPURenderBundlePtr

///|
#external
#alias(UnitPtr)
pub type WGPURenderPassDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPURenderPassEncoder

///|
#external
#alias(UnitPtr)
pub type WGPURenderPipeline

///|
#external
#alias(UnitPtr)
pub type WGPURenderPipelineDescriptorPtr

///|
#external
pub type WGPURequestAdapterCallbackInfo

///|
#external
#alias(UnitPtr)
pub type WGPURequestAdapterOptionsPtr

///|
#external
pub type WGPURequestDeviceCallbackInfo

///|
#external
#alias(UnitPtr)
pub type WGPUSampler

///|
#external
#alias(UnitPtr)
pub type WGPUSamplerDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPUShaderModule

///|
#external
#alias(UnitPtr)
pub type WGPUShaderModuleDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPUShaderModuleDescriptorSpirVPtr

///|
#external
pub type WGPUStatus

///|
#external
pub type WGPUStringView

///|
#external
#alias(UnitPtr)
pub type WGPUSubmissionIndexPtr

///|
#external
pub type WGPUSupportedFeatures

///|
#external
#alias(UnitPtr)
pub type WGPUSupportedFeaturesPtr

///|
#external
pub type WGPUSupportedInstanceFeatures

///|
#external
#alias(UnitPtr)
pub type WGPUSupportedInstanceFeaturesPtr

///|
#external
pub type WGPUSupportedWGSLLanguageFeatures

///|
#external
#alias(UnitPtr)
pub type WGPUSupportedWGSLLanguageFeaturesPtr

///|
#external
#alias(UnitPtr)
pub type WGPUSurface

///|
#external
pub type WGPUSurfaceCapabilities

///|
#external
#alias(UnitPtr)
pub type WGPUSurfaceCapabilitiesPtr

///|
#external
#alias(UnitPtr)
pub type WGPUSurfaceConfigurationPtr

///|
#external
#alias(UnitPtr)
pub type WGPUSurfaceDescriptorPtr

///|
#external
#alias(UnitPtr)
pub type WGPUSurfaceTexturePtr

///|
#external
#alias(UnitPtr)
pub type WGPUTexelCopyBufferInfoPtr

///|
#external
#alias(UnitPtr)
pub type WGPUTexelCopyBufferLayoutPtr

///|
#external
#alias(UnitPtr)
pub type WGPUTexelCopyTextureInfoPtr

///|
#external
#alias(UnitPtr)
pub type WGPUTexture

///|
#external
#alias(UnitPtr)
pub type WGPUTextureDescriptorPtr

///|
#external
pub type WGPUTextureDimension

///|
#external
pub type WGPUTextureFormat

///|
#external
#alias(UnitPtr)
pub type WGPUTextureView

///|
#external
#alias(UnitPtr)
pub type WGPUTextureViewDescriptorPtr

///|
#external
pub type WGPUTextureViewDimension

///|
#external
pub type WGPUWGSLLanguageFeatureName

///|
#external
pub type WGPUWaitStatus

///|
pub extern "C" fn wgpuAdapterAddRef(adapter : WGPUAdapter) -> Unit = "wgpuAdapterAddRef"

///|
#borrow(features)
pub extern "C" fn wgpuAdapterGetFeatures(
  adapter : WGPUAdapter,
  features : WGPUSupportedFeaturesPtr,
) -> Unit = "wgpuAdapterGetFeatures"

///|
#borrow(info)
pub extern "C" fn wgpuAdapterGetInfo(
  adapter : WGPUAdapter,
  info : WGPUAdapterInfoPtr,
) -> WGPUStatus = "wgpuAdapterGetInfo"

///|
#borrow(limits)
pub extern "C" fn wgpuAdapterGetLimits(
  adapter : WGPUAdapter,
  limits : WGPULimitsPtr,
) -> WGPUStatus = "wgpuAdapterGetLimits"

///|
pub extern "C" fn wgpuAdapterHasFeature(
  adapter : WGPUAdapter,
  feature : WGPUFeatureName,
) -> Bool = "wgpuAdapterHasFeature"

///|
pub extern "C" fn wgpuAdapterInfoFreeMembers(
  adapterInfo : WGPUAdapterInfo,
) -> Unit = "wgpuAdapterInfoFreeMembers"

///|
pub extern "C" fn wgpuAdapterRelease(adapter : WGPUAdapter) -> Unit = "wgpuAdapterRelease"

///|
#borrow(descriptor)
pub extern "C" fn wgpuAdapterRequestDevice(
  adapter : WGPUAdapter,
  descriptor : WGPUDeviceDescriptorPtr,
  callbackInfo : WGPURequestDeviceCallbackInfo,
) -> WGPUFuture = "wgpuAdapterRequestDevice"

///|
pub extern "C" fn wgpuBindGroupAddRef(bindGroup : WGPUBindGroup) -> Unit = "wgpuBindGroupAddRef"

///|
pub extern "C" fn wgpuBindGroupLayoutAddRef(
  bindGroupLayout : WGPUBindGroupLayout,
) -> Unit = "wgpuBindGroupLayoutAddRef"

///|
pub extern "C" fn wgpuBindGroupLayoutRelease(
  bindGroupLayout : WGPUBindGroupLayout,
) -> Unit = "wgpuBindGroupLayoutRelease"

///|
pub extern "C" fn wgpuBindGroupLayoutSetLabel(
  bindGroupLayout : WGPUBindGroupLayout,
  label : WGPUStringView,
) -> Unit = "wgpuBindGroupLayoutSetLabel"

///|
pub extern "C" fn wgpuBindGroupRelease(bindGroup : WGPUBindGroup) -> Unit = "wgpuBindGroupRelease"

///|
pub extern "C" fn wgpuBindGroupSetLabel(
  bindGroup : WGPUBindGroup,
  label : WGPUStringView,
) -> Unit = "wgpuBindGroupSetLabel"

///|
pub extern "C" fn wgpuBufferAddRef(buffer : WGPUBuffer) -> Unit = "wgpuBufferAddRef"

///|
pub extern "C" fn wgpuBufferDestroy(buffer : WGPUBuffer) -> Unit = "wgpuBufferDestroy"

///|
pub extern "C" fn wgpuBufferGetConstMappedRange(
  buffer : WGPUBuffer,
  offset : UInt64,
  size : UInt64,
) -> UnitPtr = "wgpuBufferGetConstMappedRange"

///|
pub extern "C" fn wgpuBufferGetMapState(
  buffer : WGPUBuffer,
) -> WGPUBufferMapState = "wgpuBufferGetMapState"

///|
pub extern "C" fn wgpuBufferGetMappedRange(
  buffer : WGPUBuffer,
  offset : UInt64,
  size : UInt64,
) -> UnitPtr = "wgpuBufferGetMappedRange"

///|
pub extern "C" fn wgpuBufferGetSize(buffer : WGPUBuffer) -> UInt64 = "wgpuBufferGetSize"

///|
pub extern "C" fn wgpuBufferGetUsage(buffer : WGPUBuffer) -> WGPUBufferUsage = "wgpuBufferGetUsage"

///|
pub extern "C" fn wgpuBufferMapAsync(
  buffer : WGPUBuffer,
  mode : WGPUMapMode,
  offset : UInt64,
  size : UInt64,
  callbackInfo : WGPUBufferMapCallbackInfo,
) -> WGPUFuture = "wgpuBufferMapAsync"

///|
#borrow(data)
pub extern "C" fn wgpuBufferReadMappedRange(
  buffer : WGPUBuffer,
  offset : UInt64,
  data : UnitPtr,
  size : UInt64,
) -> WGPUStatus = "wgpuBufferReadMappedRange"

///|
pub extern "C" fn wgpuBufferRelease(buffer : WGPUBuffer) -> Unit = "wgpuBufferRelease"

///|
pub extern "C" fn wgpuBufferSetLabel(
  buffer : WGPUBuffer,
  label : WGPUStringView,
) -> Unit = "wgpuBufferSetLabel"

///|
pub extern "C" fn wgpuBufferUnmap(buffer : WGPUBuffer) -> Unit = "wgpuBufferUnmap"

///|
#borrow(data)
pub extern "C" fn wgpuBufferWriteMappedRange(
  buffer : WGPUBuffer,
  offset : UInt64,
  data : UnitPtr,
  size : UInt64,
) -> WGPUStatus = "wgpuBufferWriteMappedRange"

///|
pub extern "C" fn wgpuCommandBufferAddRef(
  commandBuffer : WGPUCommandBuffer,
) -> Unit = "wgpuCommandBufferAddRef"

///|
pub extern "C" fn wgpuCommandBufferRelease(
  commandBuffer : WGPUCommandBuffer,
) -> Unit = "wgpuCommandBufferRelease"

///|
pub extern "C" fn wgpuCommandBufferSetLabel(
  commandBuffer : WGPUCommandBuffer,
  label : WGPUStringView,
) -> Unit = "wgpuCommandBufferSetLabel"

///|
pub extern "C" fn wgpuCommandEncoderAddRef(
  commandEncoder : WGPUCommandEncoder,
) -> Unit = "wgpuCommandEncoderAddRef"

///|
#borrow(descriptor)
pub extern "C" fn wgpuCommandEncoderBeginComputePass(
  commandEncoder : WGPUCommandEncoder,
  descriptor : WGPUComputePassDescriptorPtr,
) -> WGPUComputePassEncoder = "wgpuCommandEncoderBeginComputePass"

///|
#borrow(descriptor)
pub extern "C" fn wgpuCommandEncoderBeginRenderPass(
  commandEncoder : WGPUCommandEncoder,
  descriptor : WGPURenderPassDescriptorPtr,
) -> WGPURenderPassEncoder = "wgpuCommandEncoderBeginRenderPass"

///|
pub extern "C" fn wgpuCommandEncoderClearBuffer(
  commandEncoder : WGPUCommandEncoder,
  buffer : WGPUBuffer,
  offset : UInt64,
  size : UInt64,
) -> Unit = "wgpuCommandEncoderClearBuffer"

///|
#borrow(range)
pub extern "C" fn wgpuCommandEncoderClearTexture(
  commandEncoder : WGPUCommandEncoder,
  texture : WGPUTexture,
  range : WGPUImageSubresourceRangePtr,
) -> Unit = "wgpuCommandEncoderClearTexture"

///|
pub extern "C" fn wgpuCommandEncoderCopyBufferToBuffer(
  commandEncoder : WGPUCommandEncoder,
  source : WGPUBuffer,
  sourceOffset : UInt64,
  destination : WGPUBuffer,
  destinationOffset : UInt64,
  size : UInt64,
) -> Unit = "wgpuCommandEncoderCopyBufferToBuffer"

///|
#borrow(source, destination, copySize)
pub extern "C" fn wgpuCommandEncoderCopyBufferToTexture(
  commandEncoder : WGPUCommandEncoder,
  source : WGPUTexelCopyBufferInfoPtr,
  destination : WGPUTexelCopyTextureInfoPtr,
  copySize : WGPUExtent3DPtr,
) -> Unit = "wgpuCommandEncoderCopyBufferToTexture"

///|
#borrow(source, destination, copySize)
pub extern "C" fn wgpuCommandEncoderCopyTextureToBuffer(
  commandEncoder : WGPUCommandEncoder,
  source : WGPUTexelCopyTextureInfoPtr,
  destination : WGPUTexelCopyBufferInfoPtr,
  copySize : WGPUExtent3DPtr,
) -> Unit = "wgpuCommandEncoderCopyTextureToBuffer"

///|
#borrow(source, destination, copySize)
pub extern "C" fn wgpuCommandEncoderCopyTextureToTexture(
  commandEncoder : WGPUCommandEncoder,
  source : WGPUTexelCopyTextureInfoPtr,
  destination : WGPUTexelCopyTextureInfoPtr,
  copySize : WGPUExtent3DPtr,
) -> Unit = "wgpuCommandEncoderCopyTextureToTexture"

///|
#borrow(descriptor)
pub extern "C" fn wgpuCommandEncoderFinish(
  commandEncoder : WGPUCommandEncoder,
  descriptor : WGPUCommandBufferDescriptorPtr,
) -> WGPUCommandBuffer = "wgpuCommandEncoderFinish"

///|
pub extern "C" fn wgpuCommandEncoderInsertDebugMarker(
  commandEncoder : WGPUCommandEncoder,
  markerLabel : WGPUStringView,
) -> Unit = "wgpuCommandEncoderInsertDebugMarker"

///|
pub extern "C" fn wgpuCommandEncoderPopDebugGroup(
  commandEncoder : WGPUCommandEncoder,
) -> Unit = "wgpuCommandEncoderPopDebugGroup"

///|
pub extern "C" fn wgpuCommandEncoderPushDebugGroup(
  commandEncoder : WGPUCommandEncoder,
  groupLabel : WGPUStringView,
) -> Unit = "wgpuCommandEncoderPushDebugGroup"

///|
pub extern "C" fn wgpuCommandEncoderRelease(
  commandEncoder : WGPUCommandEncoder,
) -> Unit = "wgpuCommandEncoderRelease"

///|
pub extern "C" fn wgpuCommandEncoderResolveQuerySet(
  commandEncoder : WGPUCommandEncoder,
  querySet : WGPUQuerySet,
  firstQuery : UInt,
  queryCount : UInt,
  destination : WGPUBuffer,
  destinationOffset : UInt64,
) -> Unit = "wgpuCommandEncoderResolveQuerySet"

///|
pub extern "C" fn wgpuCommandEncoderSetLabel(
  commandEncoder : WGPUCommandEncoder,
  label : WGPUStringView,
) -> Unit = "wgpuCommandEncoderSetLabel"

///|
pub extern "C" fn wgpuCommandEncoderWriteTimestamp(
  commandEncoder : WGPUCommandEncoder,
  querySet : WGPUQuerySet,
  queryIndex : UInt,
) -> Unit = "wgpuCommandEncoderWriteTimestamp"

///|
pub extern "C" fn wgpuComputePassEncoderAddRef(
  computePassEncoder : WGPUComputePassEncoder,
) -> Unit = "wgpuComputePassEncoderAddRef"

///|
pub extern "C" fn wgpuComputePassEncoderBeginPipelineStatisticsQuery(
  computePassEncoder : WGPUComputePassEncoder,
  querySet : WGPUQuerySet,
  queryIndex : UInt,
) -> Unit = "wgpuComputePassEncoderBeginPipelineStatisticsQuery"

///|
pub extern "C" fn wgpuComputePassEncoderDispatchWorkgroups(
  computePassEncoder : WGPUComputePassEncoder,
  workgroupCountX : UInt,
  workgroupCountY : UInt,
  workgroupCountZ : UInt,
) -> Unit = "wgpuComputePassEncoderDispatchWorkgroups"

///|
pub extern "C" fn wgpuComputePassEncoderDispatchWorkgroupsIndirect(
  computePassEncoder : WGPUComputePassEncoder,
  indirectBuffer : WGPUBuffer,
  indirectOffset : UInt64,
) -> Unit = "wgpuComputePassEncoderDispatchWorkgroupsIndirect"

///|
pub extern "C" fn wgpuComputePassEncoderEnd(
  computePassEncoder : WGPUComputePassEncoder,
) -> Unit = "wgpuComputePassEncoderEnd"

///|
pub extern "C" fn wgpuComputePassEncoderEndPipelineStatisticsQuery(
  computePassEncoder : WGPUComputePassEncoder,
) -> Unit = "wgpuComputePassEncoderEndPipelineStatisticsQuery"

///|
pub extern "C" fn wgpuComputePassEncoderInsertDebugMarker(
  computePassEncoder : WGPUComputePassEncoder,
  markerLabel : WGPUStringView,
) -> Unit = "wgpuComputePassEncoderInsertDebugMarker"

///|
pub extern "C" fn wgpuComputePassEncoderPopDebugGroup(
  computePassEncoder : WGPUComputePassEncoder,
) -> Unit = "wgpuComputePassEncoderPopDebugGroup"

///|
pub extern "C" fn wgpuComputePassEncoderPushDebugGroup(
  computePassEncoder : WGPUComputePassEncoder,
  groupLabel : WGPUStringView,
) -> Unit = "wgpuComputePassEncoderPushDebugGroup"

///|
pub extern "C" fn wgpuComputePassEncoderRelease(
  computePassEncoder : WGPUComputePassEncoder,
) -> Unit = "wgpuComputePassEncoderRelease"

///|
#borrow(dynamicOffsets)
pub extern "C" fn wgpuComputePassEncoderSetBindGroup(
  computePassEncoder : WGPUComputePassEncoder,
  groupIndex : UInt,
  group : WGPUBindGroup,
  dynamicOffsetCount : UInt64,
  dynamicOffsets : UIntPtr,
) -> Unit = "wgpuComputePassEncoderSetBindGroup"

///|
#borrow(data)
pub extern "C" fn wgpuComputePassEncoderSetImmediates(
  computePassEncoder : WGPUComputePassEncoder,
  offset : UInt,
  data : UnitPtr,
  size : UInt64,
) -> Unit = "wgpuComputePassEncoderSetImmediates"

///|
pub extern "C" fn wgpuComputePassEncoderSetLabel(
  computePassEncoder : WGPUComputePassEncoder,
  label : WGPUStringView,
) -> Unit = "wgpuComputePassEncoderSetLabel"

///|
pub extern "C" fn wgpuComputePassEncoderSetPipeline(
  computePassEncoder : WGPUComputePassEncoder,
  pipeline : WGPUComputePipeline,
) -> Unit = "wgpuComputePassEncoderSetPipeline"

///|
pub extern "C" fn wgpuComputePassEncoderWriteTimestamp(
  computePassEncoder : WGPUComputePassEncoder,
  querySet : WGPUQuerySet,
  queryIndex : UInt,
) -> Unit = "wgpuComputePassEncoderWriteTimestamp"

///|
pub extern "C" fn wgpuComputePipelineAddRef(
  computePipeline : WGPUComputePipeline,
) -> Unit = "wgpuComputePipelineAddRef"

///|
pub extern "C" fn wgpuComputePipelineGetBindGroupLayout(
  computePipeline : WGPUComputePipeline,
  groupIndex : UInt,
) -> WGPUBindGroupLayout = "wgpuComputePipelineGetBindGroupLayout"

///|
pub extern "C" fn wgpuComputePipelineRelease(
  computePipeline : WGPUComputePipeline,
) -> Unit = "wgpuComputePipelineRelease"

///|
pub extern "C" fn wgpuComputePipelineSetLabel(
  computePipeline : WGPUComputePipeline,
  label : WGPUStringView,
) -> Unit = "wgpuComputePipelineSetLabel"

///|
#borrow(descriptor)
pub extern "C" fn wgpuCreateInstance(
  descriptor : WGPUInstanceDescriptorPtr,
) -> WGPUInstance = "wgpuCreateInstance"

///|
pub extern "C" fn wgpuDeviceAddRef(device : WGPUDevice) -> Unit = "wgpuDeviceAddRef"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateBindGroup(
  device : WGPUDevice,
  descriptor : WGPUBindGroupDescriptorPtr,
) -> WGPUBindGroup = "wgpuDeviceCreateBindGroup"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateBindGroupLayout(
  device : WGPUDevice,
  descriptor : WGPUBindGroupLayoutDescriptorPtr,
) -> WGPUBindGroupLayout = "wgpuDeviceCreateBindGroupLayout"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateBuffer(
  device : WGPUDevice,
  descriptor : WGPUBufferDescriptorPtr,
) -> WGPUBuffer = "wgpuDeviceCreateBuffer"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateCommandEncoder(
  device : WGPUDevice,
  descriptor : WGPUCommandEncoderDescriptorPtr,
) -> WGPUCommandEncoder = "wgpuDeviceCreateCommandEncoder"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateComputePipeline(
  device : WGPUDevice,
  descriptor : WGPUComputePipelineDescriptorPtr,
) -> WGPUComputePipeline = "wgpuDeviceCreateComputePipeline"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateComputePipelineAsync(
  device : WGPUDevice,
  descriptor : WGPUComputePipelineDescriptorPtr,
  callbackInfo : WGPUCreateComputePipelineAsyncCallbackInfo,
) -> WGPUFuture = "wgpuDeviceCreateComputePipelineAsync"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreatePipelineLayout(
  device : WGPUDevice,
  descriptor : WGPUPipelineLayoutDescriptorPtr,
) -> WGPUPipelineLayout = "wgpuDeviceCreatePipelineLayout"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateQuerySet(
  device : WGPUDevice,
  descriptor : WGPUQuerySetDescriptorPtr,
) -> WGPUQuerySet = "wgpuDeviceCreateQuerySet"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateRenderBundleEncoder(
  device : WGPUDevice,
  descriptor : WGPURenderBundleEncoderDescriptorPtr,
) -> WGPURenderBundleEncoder = "wgpuDeviceCreateRenderBundleEncoder"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateRenderPipeline(
  device : WGPUDevice,
  descriptor : WGPURenderPipelineDescriptorPtr,
) -> WGPURenderPipeline = "wgpuDeviceCreateRenderPipeline"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateRenderPipelineAsync(
  device : WGPUDevice,
  descriptor : WGPURenderPipelineDescriptorPtr,
  callbackInfo : WGPUCreateRenderPipelineAsyncCallbackInfo,
) -> WGPUFuture = "wgpuDeviceCreateRenderPipelineAsync"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateSampler(
  device : WGPUDevice,
  descriptor : WGPUSamplerDescriptorPtr,
) -> WGPUSampler = "wgpuDeviceCreateSampler"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateShaderModule(
  device : WGPUDevice,
  descriptor : WGPUShaderModuleDescriptorPtr,
) -> WGPUShaderModule = "wgpuDeviceCreateShaderModule"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateShaderModuleSpirV(
  device : WGPUDevice,
  descriptor : WGPUShaderModuleDescriptorSpirVPtr,
) -> WGPUShaderModule = "wgpuDeviceCreateShaderModuleSpirV"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateShaderModuleTrusted(
  device : WGPUDevice,
  descriptor : WGPUShaderModuleDescriptorPtr,
  runtimeChecks : WGPUShaderRuntimeChecks,
) -> WGPUShaderModule = "wgpuDeviceCreateShaderModuleTrusted"

///|
#borrow(descriptor)
pub extern "C" fn wgpuDeviceCreateTexture(
  device : WGPUDevice,
  descriptor : WGPUTextureDescriptorPtr,
) -> WGPUTexture = "wgpuDeviceCreateTexture"

///|
pub extern "C" fn wgpuDeviceDestroy(device : WGPUDevice) -> Unit = "wgpuDeviceDestroy"

///|
#borrow(adapterInfo)
pub extern "C" fn wgpuDeviceGetAdapterInfo(
  device : WGPUDevice,
  adapterInfo : WGPUAdapterInfoPtr,
) -> WGPUStatus = "wgpuDeviceGetAdapterInfo"

///|
#borrow(features)
pub extern "C" fn wgpuDeviceGetFeatures(
  device : WGPUDevice,
  features : WGPUSupportedFeaturesPtr,
) -> Unit = "wgpuDeviceGetFeatures"

///|
#borrow(limits)
pub extern "C" fn wgpuDeviceGetLimits(
  device : WGPUDevice,
  limits : WGPULimitsPtr,
) -> WGPUStatus = "wgpuDeviceGetLimits"

///|
pub extern "C" fn wgpuDeviceGetLostFuture(device : WGPUDevice) -> WGPUFuture = "wgpuDeviceGetLostFuture"

///|
pub extern "C" fn wgpuDeviceGetNativeMetalDevice(
  device : WGPUDevice,
) -> UnitPtr = "wgpuDeviceGetNativeMetalDevice"

///|
pub extern "C" fn wgpuDeviceGetQueue(device : WGPUDevice) -> WGPUQueue = "wgpuDeviceGetQueue"

///|
pub extern "C" fn wgpuDeviceHasFeature(
  device : WGPUDevice,
  feature : WGPUFeatureName,
) -> Bool = "wgpuDeviceHasFeature"

///|
#borrow(submissionIndex)
pub extern "C" fn wgpuDevicePoll(
  device : WGPUDevice,
  wait : Bool,
  submissionIndex : WGPUSubmissionIndexPtr,
) -> Bool = "wgpuDevicePoll"

///|
pub extern "C" fn wgpuDevicePopErrorScope(
  device : WGPUDevice,
  callbackInfo : WGPUPopErrorScopeCallbackInfo,
) -> WGPUFuture = "wgpuDevicePopErrorScope"

///|
pub extern "C" fn wgpuDevicePushErrorScope(
  device : WGPUDevice,
  filter : WGPUErrorFilter,
) -> Unit = "wgpuDevicePushErrorScope"

///|
pub extern "C" fn wgpuDeviceRelease(device : WGPUDevice) -> Unit = "wgpuDeviceRelease"

///|
pub extern "C" fn wgpuDeviceSetLabel(
  device : WGPUDevice,
  label : WGPUStringView,
) -> Unit = "wgpuDeviceSetLabel"

///|
pub extern "C" fn wgpuDeviceStartGraphicsDebuggerCapture(
  device : WGPUDevice,
) -> Bool = "wgpuDeviceStartGraphicsDebuggerCapture"

///|
pub extern "C" fn wgpuDeviceStopGraphicsDebuggerCapture(
  device : WGPUDevice,
) -> Unit = "wgpuDeviceStopGraphicsDebuggerCapture"

///|
pub extern "C" fn wgpuExternalTextureAddRef(
  externalTexture : WGPUExternalTexture,
) -> Unit = "wgpuExternalTextureAddRef"

///|
pub extern "C" fn wgpuExternalTextureRelease(
  externalTexture : WGPUExternalTexture,
) -> Unit = "wgpuExternalTextureRelease"

///|
pub extern "C" fn wgpuExternalTextureSetLabel(
  externalTexture : WGPUExternalTexture,
  label : WGPUStringView,
) -> Unit = "wgpuExternalTextureSetLabel"

///|
#borrow(report)
pub extern "C" fn wgpuGenerateReport(
  instance : WGPUInstance,
  report : WGPUGlobalReportPtr,
) -> Unit = "wgpuGenerateReport"

///|
#borrow(features)
pub extern "C" fn wgpuGetInstanceFeatures(
  features : WGPUSupportedInstanceFeaturesPtr,
) -> Unit = "wgpuGetInstanceFeatures"

///|
#borrow(limits)
pub extern "C" fn wgpuGetInstanceLimits(
  limits : WGPUInstanceLimitsPtr,
) -> WGPUStatus = "wgpuGetInstanceLimits"

///|
pub extern "C" fn wgpuGetProcAddress(procName : WGPUStringView) -> WGPUProc = "wgpuGetProcAddress"

///|
pub extern "C" fn wgpuGetVersion() -> UInt = "wgpuGetVersion"

///|
pub extern "C" fn wgpuHasInstanceFeature(
  feature : WGPUInstanceFeatureName,
) -> Bool = "wgpuHasInstanceFeature"

///|
pub extern "C" fn wgpuInstanceAddRef(instance : WGPUInstance) -> Unit = "wgpuInstanceAddRef"

///|
#borrow(descriptor)
pub extern "C" fn wgpuInstanceCreateSurface(
  instance : WGPUInstance,
  descriptor : WGPUSurfaceDescriptorPtr,
) -> WGPUSurface = "wgpuInstanceCreateSurface"

///|
#borrow(options, adapters)
pub extern "C" fn wgpuInstanceEnumerateAdapters(
  instance : WGPUInstance,
  options : WGPUInstanceEnumerateAdapterOptionsPtr,
  adapters : WGPUAdapterPtr,
) -> UInt64 = "wgpuInstanceEnumerateAdapters"

///|
#borrow(features)
pub extern "C" fn wgpuInstanceGetWGSLLanguageFeatures(
  instance : WGPUInstance,
  features : WGPUSupportedWGSLLanguageFeaturesPtr,
) -> Unit = "wgpuInstanceGetWGSLLanguageFeatures"

///|
pub extern "C" fn wgpuInstanceHasWGSLLanguageFeature(
  instance : WGPUInstance,
  feature : WGPUWGSLLanguageFeatureName,
) -> Bool = "wgpuInstanceHasWGSLLanguageFeature"

///|
pub extern "C" fn wgpuInstanceProcessEvents(instance : WGPUInstance) -> Unit = "wgpuInstanceProcessEvents"

///|
pub extern "C" fn wgpuInstanceRelease(instance : WGPUInstance) -> Unit = "wgpuInstanceRelease"

///|
#borrow(options)
pub extern "C" fn wgpuInstanceRequestAdapter(
  instance : WGPUInstance,
  options : WGPURequestAdapterOptionsPtr,
  callbackInfo : WGPURequestAdapterCallbackInfo,
) -> WGPUFuture = "wgpuInstanceRequestAdapter"

///|
#borrow(futures)
pub extern "C" fn wgpuInstanceWaitAny(
  instance : WGPUInstance,
  futureCount : UInt64,
  futures : WGPUFutureWaitInfoPtr,
  timeoutNS : UInt64,
) -> WGPUWaitStatus = "wgpuInstanceWaitAny"

///|
pub extern "C" fn wgpuPipelineLayoutAddRef(
  pipelineLayout : WGPUPipelineLayout,
) -> Unit = "wgpuPipelineLayoutAddRef"

///|
pub extern "C" fn wgpuPipelineLayoutRelease(
  pipelineLayout : WGPUPipelineLayout,
) -> Unit = "wgpuPipelineLayoutRelease"

///|
pub extern "C" fn wgpuPipelineLayoutSetLabel(
  pipelineLayout : WGPUPipelineLayout,
  label : WGPUStringView,
) -> Unit = "wgpuPipelineLayoutSetLabel"

///|
pub extern "C" fn wgpuQuerySetAddRef(querySet : WGPUQuerySet) -> Unit = "wgpuQuerySetAddRef"

///|
pub extern "C" fn wgpuQuerySetDestroy(querySet : WGPUQuerySet) -> Unit = "wgpuQuerySetDestroy"

///|
pub extern "C" fn wgpuQuerySetGetCount(querySet : WGPUQuerySet) -> UInt = "wgpuQuerySetGetCount"

///|
pub extern "C" fn wgpuQuerySetGetType(querySet : WGPUQuerySet) -> WGPUQueryType = "wgpuQuerySetGetType"

///|
pub extern "C" fn wgpuQuerySetRelease(querySet : WGPUQuerySet) -> Unit = "wgpuQuerySetRelease"

///|
pub extern "C" fn wgpuQuerySetSetLabel(
  querySet : WGPUQuerySet,
  label : WGPUStringView,
) -> Unit = "wgpuQuerySetSetLabel"

///|
pub extern "C" fn wgpuQueueAddRef(queue : WGPUQueue) -> Unit = "wgpuQueueAddRef"

///|
pub extern "C" fn wgpuQueueGetNativeMetalCommandQueue(
  queue : WGPUQueue,
) -> UnitPtr = "wgpuQueueGetNativeMetalCommandQueue"

///|
pub extern "C" fn wgpuQueueGetTimestampPeriod(queue : WGPUQueue) -> Float = "wgpuQueueGetTimestampPeriod"

///|
pub extern "C" fn wgpuQueueOnSubmittedWorkDone(
  queue : WGPUQueue,
  callbackInfo : WGPUQueueWorkDoneCallbackInfo,
) -> WGPUFuture = "wgpuQueueOnSubmittedWorkDone"

///|
pub extern "C" fn wgpuQueueRelease(queue : WGPUQueue) -> Unit = "wgpuQueueRelease"

///|
pub extern "C" fn wgpuQueueSetLabel(
  queue : WGPUQueue,
  label : WGPUStringView,
) -> Unit = "wgpuQueueSetLabel"

///|
#borrow(commands)
pub extern "C" fn wgpuQueueSubmit(
  queue : WGPUQueue,
  commandCount : UInt64,
  commands : WGPUCommandBufferPtr,
) -> Unit = "wgpuQueueSubmit"

///|
#borrow(commands)
pub extern "C" fn wgpuQueueSubmitForIndex(
  queue : WGPUQueue,
  commandCount : UInt64,
  commands : WGPUCommandBufferPtr,
) -> WGPUSubmissionIndex = "wgpuQueueSubmitForIndex"

///|
#borrow(data)
pub extern "C" fn wgpuQueueWriteBuffer(
  queue : WGPUQueue,
  buffer : WGPUBuffer,
  bufferOffset : UInt64,
  data : UnitPtr,
  size : UInt64,
) -> Unit = "wgpuQueueWriteBuffer"

///|
#borrow(destination, data, dataLayout, writeSize)
pub extern "C" fn wgpuQueueWriteTexture(
  queue : WGPUQueue,
  destination : WGPUTexelCopyTextureInfoPtr,
  data : UnitPtr,
  dataSize : UInt64,
  dataLayout : WGPUTexelCopyBufferLayoutPtr,
  writeSize : WGPUExtent3DPtr,
) -> Unit = "wgpuQueueWriteTexture"

///|
pub extern "C" fn wgpuRenderBundleAddRef(
  renderBundle : WGPURenderBundle,
) -> Unit = "wgpuRenderBundleAddRef"

///|
pub extern "C" fn wgpuRenderBundleEncoderAddRef(
  renderBundleEncoder : WGPURenderBundleEncoder,
) -> Unit = "wgpuRenderBundleEncoderAddRef"

///|
pub extern "C" fn wgpuRenderBundleEncoderDraw(
  renderBundleEncoder : WGPURenderBundleEncoder,
  vertexCount : UInt,
  instanceCount : UInt,
  firstVertex : UInt,
  firstInstance : UInt,
) -> Unit = "wgpuRenderBundleEncoderDraw"

///|
pub extern "C" fn wgpuRenderBundleEncoderDrawIndexed(
  renderBundleEncoder : WGPURenderBundleEncoder,
  indexCount : UInt,
  instanceCount : UInt,
  firstIndex : UInt,
  baseVertex : Int,
  firstInstance : UInt,
) -> Unit = "wgpuRenderBundleEncoderDrawIndexed"

///|
pub extern "C" fn wgpuRenderBundleEncoderDrawIndexedIndirect(
  renderBundleEncoder : WGPURenderBundleEncoder,
  indirectBuffer : WGPUBuffer,
  indirectOffset : UInt64,
) -> Unit = "wgpuRenderBundleEncoderDrawIndexedIndirect"

///|
pub extern "C" fn wgpuRenderBundleEncoderDrawIndirect(
  renderBundleEncoder : WGPURenderBundleEncoder,
  indirectBuffer : WGPUBuffer,
  indirectOffset : UInt64,
) -> Unit = "wgpuRenderBundleEncoderDrawIndirect"

///|
#borrow(descriptor)
pub extern "C" fn wgpuRenderBundleEncoderFinish(
  renderBundleEncoder : WGPURenderBundleEncoder,
  descriptor : WGPURenderBundleDescriptorPtr,
) -> WGPURenderBundle = "wgpuRenderBundleEncoderFinish"

///|
pub extern "C" fn wgpuRenderBundleEncoderInsertDebugMarker(
  renderBundleEncoder : WGPURenderBundleEncoder,
  markerLabel : WGPUStringView,
) -> Unit = "wgpuRenderBundleEncoderInsertDebugMarker"

///|
pub extern "C" fn wgpuRenderBundleEncoderPopDebugGroup(
  renderBundleEncoder : WGPURenderBundleEncoder,
) -> Unit = "wgpuRenderBundleEncoderPopDebugGroup"

///|
pub extern "C" fn wgpuRenderBundleEncoderPushDebugGroup(
  renderBundleEncoder : WGPURenderBundleEncoder,
  groupLabel : WGPUStringView,
) -> Unit = "wgpuRenderBundleEncoderPushDebugGroup"

///|
pub extern "C" fn wgpuRenderBundleEncoderRelease(
  renderBundleEncoder : WGPURenderBundleEncoder,
) -> Unit = "wgpuRenderBundleEncoderRelease"

///|
#borrow(dynamicOffsets)
pub extern "C" fn wgpuRenderBundleEncoderSetBindGroup(
  renderBundleEncoder : WGPURenderBundleEncoder,
  groupIndex : UInt,
  group : WGPUBindGroup,
  dynamicOffsetCount : UInt64,
  dynamicOffsets : UIntPtr,
) -> Unit = "wgpuRenderBundleEncoderSetBindGroup"

///|
#borrow(data)
pub extern "C" fn wgpuRenderBundleEncoderSetImmediates(
  renderBundleEncoder : WGPURenderBundleEncoder,
  offset : UInt,
  data : UnitPtr,
  size : UInt64,
) -> Unit = "wgpuRenderBundleEncoderSetImmediates"

///|
pub extern "C" fn wgpuRenderBundleEncoderSetIndexBuffer(
  renderBundleEncoder : WGPURenderBundleEncoder,
  buffer : WGPUBuffer,
  format : WGPUIndexFormat,
  offset : UInt64,
  size : UInt64,
) -> Unit = "wgpuRenderBundleEncoderSetIndexBuffer"

///|
pub extern "C" fn wgpuRenderBundleEncoderSetLabel(
  renderBundleEncoder : WGPURenderBundleEncoder,
  label : WGPUStringView,
) -> Unit = "wgpuRenderBundleEncoderSetLabel"

///|
pub extern "C" fn wgpuRenderBundleEncoderSetPipeline(
  renderBundleEncoder : WGPURenderBundleEncoder,
  pipeline : WGPURenderPipeline,
) -> Unit = "wgpuRenderBundleEncoderSetPipeline"

///|
pub extern "C" fn wgpuRenderBundleEncoderSetVertexBuffer(
  renderBundleEncoder : WGPURenderBundleEncoder,
  slot : UInt,
  buffer : WGPUBuffer,
  offset : UInt64,
  size : UInt64,
) -> Unit = "wgpuRenderBundleEncoderSetVertexBuffer"

///|
pub extern "C" fn wgpuRenderBundleRelease(
  renderBundle : WGPURenderBundle,
) -> Unit = "wgpuRenderBundleRelease"

///|
pub extern "C" fn wgpuRenderBundleSetLabel(
  renderBundle : WGPURenderBundle,
  label : WGPUStringView,
) -> Unit = "wgpuRenderBundleSetLabel"

///|
pub extern "C" fn wgpuRenderPassEncoderAddRef(
  renderPassEncoder : WGPURenderPassEncoder,
) -> Unit = "wgpuRenderPassEncoderAddRef"

///|
pub extern "C" fn wgpuRenderPassEncoderBeginOcclusionQuery(
  renderPassEncoder : WGPURenderPassEncoder,
  queryIndex : UInt,
) -> Unit = "wgpuRenderPassEncoderBeginOcclusionQuery"

///|
pub extern "C" fn wgpuRenderPassEncoderBeginPipelineStatisticsQuery(
  renderPassEncoder : WGPURenderPassEncoder,
  querySet : WGPUQuerySet,
  queryIndex : UInt,
) -> Unit = "wgpuRenderPassEncoderBeginPipelineStatisticsQuery"

///|
pub extern "C" fn wgpuRenderPassEncoderDraw(
  renderPassEncoder : WGPURenderPassEncoder,
  vertexCount : UInt,
  instanceCount : UInt,
  firstVertex : UInt,
  firstInstance : UInt,
) -> Unit = "wgpuRenderPassEncoderDraw"

///|
pub extern "C" fn wgpuRenderPassEncoderDrawIndexed(
  renderPassEncoder : WGPURenderPassEncoder,
  indexCount : UInt,
  instanceCount : UInt,
  firstIndex : UInt,
  baseVertex : Int,
  firstInstance : UInt,
) -> Unit = "wgpuRenderPassEncoderDrawIndexed"

///|
pub extern "C" fn wgpuRenderPassEncoderDrawIndexedIndirect(
  renderPassEncoder : WGPURenderPassEncoder,
  indirectBuffer : WGPUBuffer,
  indirectOffset : UInt64,
) -> Unit = "wgpuRenderPassEncoderDrawIndexedIndirect"

///|
pub extern "C" fn wgpuRenderPassEncoderDrawIndirect(
  renderPassEncoder : WGPURenderPassEncoder,
  indirectBuffer : WGPUBuffer,
  indirectOffset : UInt64,
) -> Unit = "wgpuRenderPassEncoderDrawIndirect"

///|
pub extern "C" fn wgpuRenderPassEncoderEnd(
  renderPassEncoder : WGPURenderPassEncoder,
) -> Unit = "wgpuRenderPassEncoderEnd"

///|
pub extern "C" fn wgpuRenderPassEncoderEndOcclusionQuery(
  renderPassEncoder : WGPURenderPassEncoder,
) -> Unit = "wgpuRenderPassEncoderEndOcclusionQuery"

///|
pub extern "C" fn wgpuRenderPassEncoderEndPipelineStatisticsQuery(
  renderPassEncoder : WGPURenderPassEncoder,
) -> Unit = "wgpuRenderPassEncoderEndPipelineStatisticsQuery"

///|
#borrow(bundles)
pub extern "C" fn wgpuRenderPassEncoderExecuteBundles(
  renderPassEncoder : WGPURenderPassEncoder,
  bundleCount : UInt64,
  bundles : WGPURenderBundlePtr,
) -> Unit = "wgpuRenderPassEncoderExecuteBundles"

///|
pub extern "C" fn wgpuRenderPassEncoderInsertDebugMarker(
  renderPassEncoder : WGPURenderPassEncoder,
  markerLabel : WGPUStringView,
) -> Unit = "wgpuRenderPassEncoderInsertDebugMarker"

///|
pub extern "C" fn wgpuRenderPassEncoderMultiDrawIndexedIndirect(
  encoder : WGPURenderPassEncoder,
  buffer : WGPUBuffer,
  offset : UInt64,
  count : UInt,
) -> Unit = "wgpuRenderPassEncoderMultiDrawIndexedIndirect"

///|
pub extern "C" fn wgpuRenderPassEncoderMultiDrawIndexedIndirectCount(
  encoder : WGPURenderPassEncoder,
  buffer : WGPUBuffer,
  offset : UInt64,
  count_buffer : WGPUBuffer,
  count_buffer_offset : UInt64,
  max_count : UInt,
) -> Unit = "wgpuRenderPassEncoderMultiDrawIndexedIndirectCount"

///|
pub extern "C" fn wgpuRenderPassEncoderMultiDrawIndirect(
  encoder : WGPURenderPassEncoder,
  buffer : WGPUBuffer,
  offset : UInt64,
  count : UInt,
) -> Unit = "wgpuRenderPassEncoderMultiDrawIndirect"

///|
pub extern "C" fn wgpuRenderPassEncoderMultiDrawIndirectCount(
  encoder : WGPURenderPassEncoder,
  buffer : WGPUBuffer,
  offset : UInt64,
  count_buffer : WGPUBuffer,
  count_buffer_offset : UInt64,
  max_count : UInt,
) -> Unit = "wgpuRenderPassEncoderMultiDrawIndirectCount"

///|
pub extern "C" fn wgpuRenderPassEncoderPopDebugGroup(
  renderPassEncoder : WGPURenderPassEncoder,
) -> Unit = "wgpuRenderPassEncoderPopDebugGroup"

///|
pub extern "C" fn wgpuRenderPassEncoderPushDebugGroup(
  renderPassEncoder : WGPURenderPassEncoder,
  groupLabel : WGPUStringView,
) -> Unit = "wgpuRenderPassEncoderPushDebugGroup"

///|
pub extern "C" fn wgpuRenderPassEncoderRelease(
  renderPassEncoder : WGPURenderPassEncoder,
) -> Unit = "wgpuRenderPassEncoderRelease"

///|
#borrow(dynamicOffsets)
pub extern "C" fn wgpuRenderPassEncoderSetBindGroup(
  renderPassEncoder : WGPURenderPassEncoder,
  groupIndex : UInt,
  group : WGPUBindGroup,
  dynamicOffsetCount : UInt64,
  dynamicOffsets : UIntPtr,
) -> Unit = "wgpuRenderPassEncoderSetBindGroup"

///|
#borrow(color)
pub extern "C" fn wgpuRenderPassEncoderSetBlendConstant(
  renderPassEncoder : WGPURenderPassEncoder,
  color : WGPUColorPtr,
) -> Unit = "wgpuRenderPassEncoderSetBlendConstant"

///|
#borrow(data)
pub extern "C" fn wgpuRenderPassEncoderSetImmediates(
  renderPassEncoder : WGPURenderPassEncoder,
  offset : UInt,
  data : UnitPtr,
  size : UInt64,
) -> Unit = "wgpuRenderPassEncoderSetImmediates"

///|
pub extern "C" fn wgpuRenderPassEncoderSetIndexBuffer(
  renderPassEncoder : WGPURenderPassEncoder,
  buffer : WGPUBuffer,
  format : WGPUIndexFormat,
  offset : UInt64,
  size : UInt64,
) -> Unit = "wgpuRenderPassEncoderSetIndexBuffer"

///|
pub extern "C" fn wgpuRenderPassEncoderSetLabel(
  renderPassEncoder : WGPURenderPassEncoder,
  label : WGPUStringView,
) -> Unit = "wgpuRenderPassEncoderSetLabel"

///|
pub extern "C" fn wgpuRenderPassEncoderSetPipeline(
  renderPassEncoder : WGPURenderPassEncoder,
  pipeline : WGPURenderPipeline,
) -> Unit = "wgpuRenderPassEncoderSetPipeline"

///|
pub extern "C" fn wgpuRenderPassEncoderSetScissorRect(
  renderPassEncoder : WGPURenderPassEncoder,
  x : UInt,
  y : UInt,
  width : UInt,
  height : UInt,
) -> Unit = "wgpuRenderPassEncoderSetScissorRect"

///|
pub extern "C" fn wgpuRenderPassEncoderSetStencilReference(
  renderPassEncoder : WGPURenderPassEncoder,
  reference : UInt,
) -> Unit = "wgpuRenderPassEncoderSetStencilReference"

///|
pub extern "C" fn wgpuRenderPassEncoderSetVertexBuffer(
  renderPassEncoder : WGPURenderPassEncoder,
  slot : UInt,
  buffer : WGPUBuffer,
  offset : UInt64,
  size : UInt64,
) -> Unit = "wgpuRenderPassEncoderSetVertexBuffer"

///|
pub extern "C" fn wgpuRenderPassEncoderSetViewport(
  renderPassEncoder : WGPURenderPassEncoder,
  x : Float,
  y : Float,
  width : Float,
  height : Float,
  minDepth : Float,
  maxDepth : Float,
) -> Unit = "wgpuRenderPassEncoderSetViewport"

///|
pub extern "C" fn wgpuRenderPassEncoderWriteTimestamp(
  renderPassEncoder : WGPURenderPassEncoder,
  querySet : WGPUQuerySet,
  queryIndex : UInt,
) -> Unit = "wgpuRenderPassEncoderWriteTimestamp"

///|
pub extern "C" fn wgpuRenderPipelineAddRef(
  renderPipeline : WGPURenderPipeline,
) -> Unit = "wgpuRenderPipelineAddRef"

///|
pub extern "C" fn wgpuRenderPipelineGetBindGroupLayout(
  renderPipeline : WGPURenderPipeline,
  groupIndex : UInt,
) -> WGPUBindGroupLayout = "wgpuRenderPipelineGetBindGroupLayout"

///|
pub extern "C" fn wgpuRenderPipelineRelease(
  renderPipeline : WGPURenderPipeline,
) -> Unit = "wgpuRenderPipelineRelease"

///|
pub extern "C" fn wgpuRenderPipelineSetLabel(
  renderPipeline : WGPURenderPipeline,
  label : WGPUStringView,
) -> Unit = "wgpuRenderPipelineSetLabel"

///|
pub extern "C" fn wgpuSamplerAddRef(sampler : WGPUSampler) -> Unit = "wgpuSamplerAddRef"

///|
pub extern "C" fn wgpuSamplerRelease(sampler : WGPUSampler) -> Unit = "wgpuSamplerRelease"

///|
pub extern "C" fn wgpuSamplerSetLabel(
  sampler : WGPUSampler,
  label : WGPUStringView,
) -> Unit = "wgpuSamplerSetLabel"

///|
#borrow(userdata)
pub extern "C" fn wgpuSetLogCallback(
  callback : WGPULogCallback,
  userdata : UnitPtr,
) -> Unit = "wgpuSetLogCallback"

///|
pub extern "C" fn wgpuSetLogLevel(level : WGPULogLevel) -> Unit = "wgpuSetLogLevel"

///|
pub extern "C" fn wgpuShaderModuleAddRef(
  shaderModule : WGPUShaderModule,
) -> Unit = "wgpuShaderModuleAddRef"

///|
pub extern "C" fn wgpuShaderModuleGetCompilationInfo(
  shaderModule : WGPUShaderModule,
  callbackInfo : WGPUCompilationInfoCallbackInfo,
) -> WGPUFuture = "wgpuShaderModuleGetCompilationInfo"

///|
pub extern "C" fn wgpuShaderModuleRelease(
  shaderModule : WGPUShaderModule,
) -> Unit = "wgpuShaderModuleRelease"

///|
pub extern "C" fn wgpuShaderModuleSetLabel(
  shaderModule : WGPUShaderModule,
  label : WGPUStringView,
) -> Unit = "wgpuShaderModuleSetLabel"

///|
pub extern "C" fn wgpuSupportedFeaturesFreeMembers(
  supportedFeatures : WGPUSupportedFeatures,
) -> Unit = "wgpuSupportedFeaturesFreeMembers"

///|
pub extern "C" fn wgpuSupportedInstanceFeaturesFreeMembers(
  supportedInstanceFeatures : WGPUSupportedInstanceFeatures,
) -> Unit = "wgpuSupportedInstanceFeaturesFreeMembers"

///|
pub extern "C" fn wgpuSupportedWGSLLanguageFeaturesFreeMembers(
  supportedWGSLLanguageFeatures : WGPUSupportedWGSLLanguageFeatures,
) -> Unit = "wgpuSupportedWGSLLanguageFeaturesFreeMembers"

///|
pub extern "C" fn wgpuSurfaceAddRef(surface : WGPUSurface) -> Unit = "wgpuSurfaceAddRef"

///|
pub extern "C" fn wgpuSurfaceCapabilitiesFreeMembers(
  surfaceCapabilities : WGPUSurfaceCapabilities,
) -> Unit = "wgpuSurfaceCapabilitiesFreeMembers"

///|
#borrow(config)
pub extern "C" fn wgpuSurfaceConfigure(
  surface : WGPUSurface,
  config : WGPUSurfaceConfigurationPtr,
) -> Unit = "wgpuSurfaceConfigure"

///|
#borrow(capabilities)
pub extern "C" fn wgpuSurfaceGetCapabilities(
  surface : WGPUSurface,
  adapter : WGPUAdapter,
  capabilities : WGPUSurfaceCapabilitiesPtr,
) -> WGPUStatus = "wgpuSurfaceGetCapabilities"

///|
#borrow(surfaceTexture)
pub extern "C" fn wgpuSurfaceGetCurrentTexture(
  surface : WGPUSurface,
  surfaceTexture : WGPUSurfaceTexturePtr,
) -> Unit = "wgpuSurfaceGetCurrentTexture"

///|
pub extern "C" fn wgpuSurfacePresent(surface : WGPUSurface) -> WGPUStatus = "wgpuSurfacePresent"

///|
pub extern "C" fn wgpuSurfaceRelease(surface : WGPUSurface) -> Unit = "wgpuSurfaceRelease"

///|
pub extern "C" fn wgpuSurfaceSetLabel(
  surface : WGPUSurface,
  label : WGPUStringView,
) -> Unit = "wgpuSurfaceSetLabel"

///|
pub extern "C" fn wgpuSurfaceUnconfigure(surface : WGPUSurface) -> Unit = "wgpuSurfaceUnconfigure"

///|
pub extern "C" fn wgpuTextureAddRef(texture : WGPUTexture) -> Unit = "wgpuTextureAddRef"

///|
#borrow(descriptor)
pub extern "C" fn wgpuTextureCreateView(
  texture : WGPUTexture,
  descriptor : WGPUTextureViewDescriptorPtr,
) -> WGPUTextureView = "wgpuTextureCreateView"

///|
pub extern "C" fn wgpuTextureDestroy(texture : WGPUTexture) -> Unit = "wgpuTextureDestroy"

///|
pub extern "C" fn wgpuTextureGetDepthOrArrayLayers(
  texture : WGPUTexture,
) -> UInt = "wgpuTextureGetDepthOrArrayLayers"

///|
pub extern "C" fn wgpuTextureGetDimension(
  texture : WGPUTexture,
) -> WGPUTextureDimension = "wgpuTextureGetDimension"

///|
pub extern "C" fn wgpuTextureGetFormat(
  texture : WGPUTexture,
) -> WGPUTextureFormat = "wgpuTextureGetFormat"

///|
pub extern "C" fn wgpuTextureGetHeight(texture : WGPUTexture) -> UInt = "wgpuTextureGetHeight"

///|
pub extern "C" fn wgpuTextureGetMipLevelCount(texture : WGPUTexture) -> UInt = "wgpuTextureGetMipLevelCount"

///|
pub extern "C" fn wgpuTextureGetNativeMetalTexture(
  texture : WGPUTexture,
) -> UnitPtr = "wgpuTextureGetNativeMetalTexture"

///|
pub extern "C" fn wgpuTextureGetSampleCount(texture : WGPUTexture) -> UInt = "wgpuTextureGetSampleCount"

///|
pub extern "C" fn wgpuTextureGetTextureBindingViewDimension(
  texture : WGPUTexture,
) -> WGPUTextureViewDimension = "wgpuTextureGetTextureBindingViewDimension"

///|
pub extern "C" fn wgpuTextureGetUsage(
  texture : WGPUTexture,
) -> WGPUTextureUsage = "wgpuTextureGetUsage"

///|
pub extern "C" fn wgpuTextureGetWidth(texture : WGPUTexture) -> UInt = "wgpuTextureGetWidth"

///|
pub extern "C" fn wgpuTextureRelease(texture : WGPUTexture) -> Unit = "wgpuTextureRelease"

///|
pub extern "C" fn wgpuTextureSetLabel(
  texture : WGPUTexture,
  label : WGPUStringView,
) -> Unit = "wgpuTextureSetLabel"

///|
pub extern "C" fn wgpuTextureViewAddRef(textureView : WGPUTextureView) -> Unit = "wgpuTextureViewAddRef"

///|
pub extern "C" fn wgpuTextureViewRelease(textureView : WGPUTextureView) -> Unit = "wgpuTextureViewRelease"

///|
pub extern "C" fn wgpuTextureViewSetLabel(
  textureView : WGPUTextureView,
  label : WGPUStringView,
) -> Unit = "wgpuTextureViewSetLabel"