import _Builtin_stdint import _math /** * Nullable value defining a pointer+length view into a UTF-8 encoded string. * * Values passed into the API may use the special length value @ref WGPU_STRLEN * to indicate a null-terminated string. * Non-null values passed out of the API (for example as callback arguments) * always provide an explicit length and **may or may not be null-terminated**. * * Some inputs to the API accept null values. Those which do not accept null * values "default" to the empty string when null values are passed. * * Values are encoded as follows: * - `{NULL, WGPU_STRLEN}`: the null value. * - `{non_null_pointer, WGPU_STRLEN}`: a null-terminated string view. * - `{any, 0}`: the empty string. * - `{NULL, non_zero_length}`: not allowed (null dereference). * - `{non_null_pointer, non_zero_length}`: an explictly-sized string view with * size `non_zero_length` (in bytes). * * For info on how this is used in various places, see \ref Strings. */ public struct WGPUStringView { public init() public init(data: UnsafePointer!, length: Int) public var data: UnsafePointer! public var length: Int } public typealias WGPUFlags = UInt64 public typealias WGPUBool = UInt32 public class WGPUAdapterImpl { } /** * \defgroup Objects Objects * \brief Opaque, non-dispatchable handles to WebGPU objects. * * @{ */ public typealias WGPUAdapter = WGPUAdapterImpl public class WGPUBindGroupImpl { } public typealias WGPUBindGroup = WGPUBindGroupImpl public class WGPUBindGroupLayoutImpl { } public typealias WGPUBindGroupLayout = WGPUBindGroupLayoutImpl public class WGPUBufferImpl { } public typealias WGPUBuffer = WGPUBufferImpl public class WGPUCommandBufferImpl { } public typealias WGPUCommandBuffer = WGPUCommandBufferImpl public class WGPUCommandEncoderImpl { } public typealias WGPUCommandEncoder = WGPUCommandEncoderImpl public class WGPUComputePassEncoderImpl { } public typealias WGPUComputePassEncoder = WGPUComputePassEncoderImpl public class WGPUComputePipelineImpl { } public typealias WGPUComputePipeline = WGPUComputePipelineImpl public class WGPUDeviceImpl { } /** * TODO * * Releasing the last ref to a `WGPUDevice` also calls @ref wgpuDeviceDestroy. * For more info, see @ref DeviceRelease. */ public typealias WGPUDevice = WGPUDeviceImpl public class WGPUInstanceImpl { } public typealias WGPUInstance = WGPUInstanceImpl public class WGPUPipelineLayoutImpl { } public typealias WGPUPipelineLayout = WGPUPipelineLayoutImpl public class WGPUQuerySetImpl { } public typealias WGPUQuerySet = WGPUQuerySetImpl public class WGPUQueueImpl { } public typealias WGPUQueue = WGPUQueueImpl public class WGPURenderBundleImpl { } public typealias WGPURenderBundle = WGPURenderBundleImpl public class WGPURenderBundleEncoderImpl { } public typealias WGPURenderBundleEncoder = WGPURenderBundleEncoderImpl public class WGPURenderPassEncoderImpl { } public typealias WGPURenderPassEncoder = WGPURenderPassEncoderImpl public class WGPURenderPipelineImpl { } public typealias WGPURenderPipeline = WGPURenderPipelineImpl public class WGPUSamplerImpl { } public typealias WGPUSampler = WGPUSamplerImpl public class WGPUShaderModuleImpl { } public typealias WGPUShaderModule = WGPUShaderModuleImpl public class WGPUSurfaceImpl { } /** * An object used to continuously present image data to the user, see @ref Surfaces for more details. */ public typealias WGPUSurface = WGPUSurfaceImpl public class WGPUTextureImpl { } public typealias WGPUTexture = WGPUTextureImpl public class WGPUTextureViewImpl { } public typealias WGPUTextureView = WGPUTextureViewImpl /** * \defgroup Enumerations Enumerations * \brief Enums. * * @{ */ @frozen public enum WGPUAdapterType : UInt32, @unchecked Sendable { case discreteGPU = 1 case integratedGPU = 2 case CPU = 3 case unknown = 4 case force32 = 2147483647 } @frozen public enum WGPUAddressMode : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case clampToEdge = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case `repeat` = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case mirrorRepeat = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUBackendType : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case null = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case webGPU = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case D3D11 = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case D3D12 = 4 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case metal = 5 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case vulkan = 6 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case openGL = 7 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case openGLES = 8 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUBlendFactor : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case zero = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case one = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case src = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case oneMinusSrc = 4 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case srcAlpha = 5 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case oneMinusSrcAlpha = 6 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case dst = 7 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case oneMinusDst = 8 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case dstAlpha = 9 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case oneMinusDstAlpha = 10 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case srcAlphaSaturated = 11 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case constant = 12 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case oneMinusConstant = 13 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case src1 = 14 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case oneMinusSrc1 = 15 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case src1Alpha = 16 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case oneMinusSrc1Alpha = 17 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUBlendOperation : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case add = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case subtract = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case reverseSubtract = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case min = 4 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case max = 5 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUBufferBindingType : UInt32, @unchecked Sendable { /** * `0`. Indicates that this @ref WGPUBufferBindingLayout member of * its parent @ref WGPUBindGroupLayoutEntry is not used. * (See also @ref SentinelValues.) */ case bindingNotUsed = 0 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 1 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case uniform = 2 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case storage = 3 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case readOnlyStorage = 4 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUBufferMapState : UInt32, @unchecked Sendable { case unmapped = 1 case pending = 2 case mapped = 3 case force32 = 2147483647 } /** * The callback mode controls how a callback for an asynchronous operation may be fired. See @ref Asynchronous-Operations for how these are used. */ @frozen public enum WGPUCallbackMode : UInt32, @unchecked Sendable { /** * Callbacks created with `WGPUCallbackMode_WaitAnyOnly`: * - fire when the asynchronous operation's future is passed to a call to @ref wgpuInstanceWaitAny * AND the operation has already completed or it completes inside the call to @ref wgpuInstanceWaitAny. */ case waitAnyOnly = 1 /** * Callbacks created with `WGPUCallbackMode_AllowProcessEvents`: * - fire for the same reasons as callbacks created with `WGPUCallbackMode_WaitAnyOnly` * - fire inside a call to @ref wgpuInstanceProcessEvents if the asynchronous operation is complete. */ case allowProcessEvents = 2 /** * Callbacks created with `WGPUCallbackMode_AllowSpontaneous`: * - fire for the same reasons as callbacks created with `WGPUCallbackMode_AllowProcessEvents` * - **may** fire spontaneously on an arbitrary or application thread, when the WebGPU implementations discovers that the asynchronous operation is complete. * * Implementations _should_ fire spontaneous callbacks as soon as possible. * * @note Because spontaneous callbacks may fire at an arbitrary time on an arbitrary thread, applications should take extra care when acquiring locks or mutating state inside the callback. It undefined behavior to re-entrantly call into the webgpu.h API if the callback fires while inside the callstack of another webgpu.h function that is not `wgpuInstanceWaitAny` or `wgpuInstanceProcessEvents`. */ case allowSpontaneous = 3 /** * Callbacks created with `WGPUCallbackMode_AllowSpontaneous`: * - fire for the same reasons as callbacks created with `WGPUCallbackMode_AllowProcessEvents` * - **may** fire spontaneously on an arbitrary or application thread, when the WebGPU implementations discovers that the asynchronous operation is complete. * * Implementations _should_ fire spontaneous callbacks as soon as possible. * * @note Because spontaneous callbacks may fire at an arbitrary time on an arbitrary thread, applications should take extra care when acquiring locks or mutating state inside the callback. It undefined behavior to re-entrantly call into the webgpu.h API if the callback fires while inside the callstack of another webgpu.h function that is not `wgpuInstanceWaitAny` or `wgpuInstanceProcessEvents`. */ case force32 = 2147483647 } @frozen public enum WGPUCompareFunction : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case never = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case less = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case equal = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case lessEqual = 4 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case greater = 5 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case notEqual = 6 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case greaterEqual = 7 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case always = 8 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUCompilationInfoRequestStatus : UInt32, @unchecked Sendable { case success = 1 /** * See @ref CallbackStatuses. */ case callbackCancelled = 2 /** * See @ref CallbackStatuses. */ case force32 = 2147483647 } @frozen public enum WGPUCompilationMessageType : UInt32, @unchecked Sendable { case error = 1 case warning = 2 case info = 3 case force32 = 2147483647 } /** * Describes how frames are composited with other contents on the screen when @ref wgpuSurfacePresent is called. */ @frozen public enum WGPUCompositeAlphaMode : UInt32, @unchecked Sendable { /** * `0`. Lets the WebGPU implementation choose the best mode (supported, and with the best performance) between @ref WGPUCompositeAlphaMode_Opaque or @ref WGPUCompositeAlphaMode_Inherit. */ case auto = 0 /** * The alpha component of the image is ignored and teated as if it is always 1.0. */ case opaque = 1 /** * The alpha component is respected and non-alpha components are assumed to be already multiplied with the alpha component. For example, (0.5, 0, 0, 0.5) is semi-transparent bright red. */ case premultiplied = 2 /** * The alpha component is respected and non-alpha components are assumed to NOT be already multiplied with the alpha component. For example, (1.0, 0, 0, 0.5) is semi-transparent bright red. */ case unpremultiplied = 3 /** * The handling of the alpha component is unknown to WebGPU and should be handled by the application using system-specific APIs. This mode may be unavailable (for example on Wasm). */ case inherit = 4 /** * The handling of the alpha component is unknown to WebGPU and should be handled by the application using system-specific APIs. This mode may be unavailable (for example on Wasm). */ case force32 = 2147483647 } @frozen public enum WGPUCreatePipelineAsyncStatus : UInt32, @unchecked Sendable { case success = 1 /** * See @ref CallbackStatuses. */ case callbackCancelled = 2 /** * See @ref CallbackStatuses. */ case validationError = 3 /** * See @ref CallbackStatuses. */ case internalError = 4 /** * See @ref CallbackStatuses. */ case force32 = 2147483647 } @frozen public enum WGPUCullMode : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case none = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case front = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case back = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUDeviceLostReason : UInt32, @unchecked Sendable { case unknown = 1 case destroyed = 2 /** * See @ref CallbackStatuses. */ case callbackCancelled = 3 /** * See @ref CallbackStatuses. */ case failedCreation = 4 /** * See @ref CallbackStatuses. */ case force32 = 2147483647 } @frozen public enum WGPUErrorFilter : UInt32, @unchecked Sendable { case validation = 1 case outOfMemory = 2 case `internal` = 3 case force32 = 2147483647 } @frozen public enum WGPUErrorType : UInt32, @unchecked Sendable { case noError = 1 case validation = 2 case outOfMemory = 3 case `internal` = 4 case unknown = 5 case force32 = 2147483647 } /** * See @ref WGPURequestAdapterOptions::featureLevel. */ @frozen public enum WGPUFeatureLevel : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * "Compatibility" profile which can be supported on OpenGL ES 3.1 and D3D11. */ case compatibility = 1 /** * "Core" profile which can be supported on Vulkan/Metal/D3D12 (at least). */ case core = 2 /** * "Core" profile which can be supported on Vulkan/Metal/D3D12 (at least). */ case force32 = 2147483647 } @frozen public enum WGPUFeatureName : UInt32, @unchecked Sendable { case coreFeaturesAndLimits = 1 case depthClipControl = 2 case depth32FloatStencil8 = 3 case textureCompressionBC = 4 case textureCompressionBCSliced3D = 5 case textureCompressionETC2 = 6 case textureCompressionASTC = 7 case textureCompressionASTCSliced3D = 8 case timestampQuery = 9 case indirectFirstInstance = 10 case shaderF16 = 11 case rg11B10UfloatRenderable = 12 case bgra8UnormStorage = 13 case float32Filterable = 14 case float32Blendable = 15 case clipDistances = 16 case dualSourceBlending = 17 case subgroups = 18 case textureFormatsTier1 = 19 case textureFormatsTier2 = 20 case force32 = 2147483647 } @frozen public enum WGPUFilterMode : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case nearest = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case linear = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUFrontFace : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case CCW = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case CW = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUIndexFormat : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case uint16 = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case uint32 = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUInstanceFeatureName : UInt32, @unchecked Sendable { /** * Enable use of ::wgpuInstanceWaitAny with `timeoutNS > 0`. */ case timedWaitAny = 1 /** * Enable passing SPIR-V shaders to @ref wgpuDeviceCreateShaderModule, * via @ref WGPUShaderSourceSPIRV. */ case shaderSourceSPIRV = 2 /** * Normally, a @ref WGPUAdapter can only create a single device. If this is * available and enabled, then adapters won't immediately expire when they * create a device, so can be reused to make multiple devices. They may * still expire for other reasons. */ case multipleDevicesPerAdapter = 3 /** * Normally, a @ref WGPUAdapter can only create a single device. If this is * available and enabled, then adapters won't immediately expire when they * create a device, so can be reused to make multiple devices. They may * still expire for other reasons. */ case force32 = 2147483647 } @frozen public enum WGPULoadOp : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case load = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case clear = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUMapAsyncStatus : UInt32, @unchecked Sendable { case success = 1 /** * See @ref CallbackStatuses. */ case callbackCancelled = 2 /** * See @ref CallbackStatuses. */ case error = 3 /** * See @ref CallbackStatuses. */ case aborted = 4 /** * See @ref CallbackStatuses. */ case force32 = 2147483647 } @frozen public enum WGPUMipmapFilterMode : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case nearest = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case linear = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUOptionalBool : UInt32, @unchecked Sendable { /** * `0`. */ case `false` = 0 /** * `0`. */ case `true` = 1 /** * `0`. */ case undefined = 2 /** * `0`. */ case force32 = 2147483647 } @frozen public enum WGPUPopErrorScopeStatus : UInt32, @unchecked Sendable { /** * The error scope stack was successfully popped and a result was reported. */ case success = 1 /** * See @ref CallbackStatuses. */ case callbackCancelled = 2 /** * The error scope stack could not be popped, because it was empty. */ case error = 3 /** * The error scope stack could not be popped, because it was empty. */ case force32 = 2147483647 } @frozen public enum WGPUPowerPreference : UInt32, @unchecked Sendable { /** * `0`. No preference. (See also @ref SentinelValues.) */ case undefined = 0 /** * `0`. No preference. (See also @ref SentinelValues.) */ case lowPower = 1 /** * `0`. No preference. (See also @ref SentinelValues.) */ case highPerformance = 2 /** * `0`. No preference. (See also @ref SentinelValues.) */ case force32 = 2147483647 } @frozen public enum WGPUPredefinedColorSpace : UInt32, @unchecked Sendable { case SRGB = 1 case displayP3 = 2 case force32 = 2147483647 } /** * Describes when and in which order frames are presented on the screen when @ref wgpuSurfacePresent is called. */ @frozen public enum WGPUPresentMode : UInt32, @unchecked Sendable { /** * `0`. Present mode is not specified. Use the default. */ case undefined = 0 /** * The presentation of the image to the user waits for the next vertical blanking period to update in a first-in, first-out manner. * Tearing cannot be observed and frame-loop will be limited to the display's refresh rate. * This is the only mode that's always available. */ case fifo = 1 /** * The presentation of the image to the user tries to wait for the next vertical blanking period but may decide to not wait if a frame is presented late. * Tearing can sometimes be observed but late-frame don't produce a full-frame stutter in the presentation. * This is still a first-in, first-out mechanism so a frame-loop will be limited to the display's refresh rate. */ case fifoRelaxed = 2 /** * The presentation of the image to the user is updated immediately without waiting for a vertical blank. * Tearing can be observed but latency is minimized. */ case immediate = 3 /** * The presentation of the image to the user waits for the next vertical blanking period to update to the latest provided image. * Tearing cannot be observed and a frame-loop is not limited to the display's refresh rate. */ case mailbox = 4 /** * The presentation of the image to the user waits for the next vertical blanking period to update to the latest provided image. * Tearing cannot be observed and a frame-loop is not limited to the display's refresh rate. */ case force32 = 2147483647 } @frozen public enum WGPUPrimitiveTopology : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case pointList = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case lineList = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case lineStrip = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case triangleList = 4 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case triangleStrip = 5 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUQueryType : UInt32, @unchecked Sendable { case occlusion = 1 case timestamp = 2 case force32 = 2147483647 } @frozen public enum WGPUQueueWorkDoneStatus : UInt32, @unchecked Sendable { case success = 1 /** * See @ref CallbackStatuses. */ case callbackCancelled = 2 /** * There was some deterministic error. (Note this is currently never used, * but it will be relevant when it's possible to create a queue object.) */ case error = 3 /** * There was some deterministic error. (Note this is currently never used, * but it will be relevant when it's possible to create a queue object.) */ case force32 = 2147483647 } @frozen public enum WGPURequestAdapterStatus : UInt32, @unchecked Sendable { case success = 1 /** * See @ref CallbackStatuses. */ case callbackCancelled = 2 /** * See @ref CallbackStatuses. */ case unavailable = 3 /** * See @ref CallbackStatuses. */ case error = 4 /** * See @ref CallbackStatuses. */ case force32 = 2147483647 } @frozen public enum WGPURequestDeviceStatus : UInt32, @unchecked Sendable { case success = 1 /** * See @ref CallbackStatuses. */ case callbackCancelled = 2 /** * See @ref CallbackStatuses. */ case error = 3 /** * See @ref CallbackStatuses. */ case force32 = 2147483647 } @frozen public enum WGPUSamplerBindingType : UInt32, @unchecked Sendable { /** * `0`. Indicates that this @ref WGPUSamplerBindingLayout member of * its parent @ref WGPUBindGroupLayoutEntry is not used. * (See also @ref SentinelValues.) */ case bindingNotUsed = 0 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 1 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case filtering = 2 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case nonFiltering = 3 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case comparison = 4 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } /** * Status code returned (synchronously) from many operations. Generally * indicates an invalid input like an unknown enum value or @ref OutStructChainError. * Read the function's documentation for specific error conditions. */ @frozen public enum WGPUStatus : UInt32, @unchecked Sendable { case success = 1 case error = 2 case force32 = 2147483647 } @frozen public enum WGPUStencilOperation : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case keep = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case zero = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case replace = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case invert = 4 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case incrementClamp = 5 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case decrementClamp = 6 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case incrementWrap = 7 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case decrementWrap = 8 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUStorageTextureAccess : UInt32, @unchecked Sendable { /** * `0`. Indicates that this @ref WGPUStorageTextureBindingLayout member of * its parent @ref WGPUBindGroupLayoutEntry is not used. * (See also @ref SentinelValues.) */ case bindingNotUsed = 0 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 1 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case writeOnly = 2 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case readOnly = 3 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case readWrite = 4 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUStoreOp : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case store = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case discard = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUSType : UInt32, @unchecked Sendable { case shaderSourceSPIRV = 1 case shaderSourceWGSL = 2 case renderPassMaxDrawCount = 3 case surfaceSourceMetalLayer = 4 case surfaceSourceWindowsHWND = 5 case surfaceSourceXlibWindow = 6 case surfaceSourceWaylandSurface = 7 case surfaceSourceAndroidNativeWindow = 8 case surfaceSourceXCBWindow = 9 case surfaceColorManagement = 10 case requestAdapterWebXROptions = 11 case force32 = 2147483647 } /** * The status enum for @ref wgpuSurfaceGetCurrentTexture. */ @frozen public enum WGPUSurfaceGetCurrentTextureStatus : UInt32, @unchecked Sendable { /** * Yay! Everything is good and we can render this frame. */ case successOptimal = 1 /** * Still OK - the surface can present the frame, but in a suboptimal way. The surface may need reconfiguration. */ case successSuboptimal = 2 /** * Some operation timed out while trying to acquire the frame. */ case timeout = 3 /** * The surface is too different to be used, compared to when it was originally created. */ case outdated = 4 /** * The connection to whatever owns the surface was lost, or generally needs to be fully reinitialized. */ case lost = 5 /** * There was some deterministic error (for example, the surface is not configured, or there was an @ref OutStructChainError). Should produce @ref ImplementationDefinedLogging containing details. */ case error = 6 /** * There was some deterministic error (for example, the surface is not configured, or there was an @ref OutStructChainError). Should produce @ref ImplementationDefinedLogging containing details. */ case force32 = 2147483647 } @frozen public enum WGPUTextureAspect : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case all = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case stencilOnly = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case depthOnly = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUTextureDimension : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _Undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _1D = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _2D = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _3D = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _Force32 = 2147483647 } @frozen public enum WGPUTextureFormat : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r8Unorm = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r8Snorm = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r8Uint = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r8Sint = 4 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r16Unorm = 5 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r16Snorm = 6 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r16Uint = 7 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r16Sint = 8 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r16Float = 9 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg8Unorm = 10 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg8Snorm = 11 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg8Uint = 12 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg8Sint = 13 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r32Float = 14 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r32Uint = 15 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case r32Sint = 16 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg16Unorm = 17 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg16Snorm = 18 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg16Uint = 19 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg16Sint = 20 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg16Float = 21 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba8Unorm = 22 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba8UnormSrgb = 23 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba8Snorm = 24 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba8Uint = 25 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba8Sint = 26 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bgra8Unorm = 27 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bgra8UnormSrgb = 28 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgb10A2Uint = 29 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgb10A2Unorm = 30 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg11B10Ufloat = 31 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgb9E5Ufloat = 32 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg32Float = 33 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg32Uint = 34 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rg32Sint = 35 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba16Unorm = 36 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba16Snorm = 37 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba16Uint = 38 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba16Sint = 39 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba16Float = 40 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba32Float = 41 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba32Uint = 42 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case rgba32Sint = 43 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case stencil8 = 44 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case depth16Unorm = 45 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case depth24Plus = 46 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case depth24PlusStencil8 = 47 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case depth32Float = 48 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case depth32FloatStencil8 = 49 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc1RGBAUnorm = 50 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc1RGBAUnormSrgb = 51 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc2RGBAUnorm = 52 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc2RGBAUnormSrgb = 53 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc3RGBAUnorm = 54 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc3RGBAUnormSrgb = 55 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc4RUnorm = 56 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc4RSnorm = 57 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc5RGUnorm = 58 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc5RGSnorm = 59 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc6HRGBUfloat = 60 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc6HRGBFloat = 61 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc7RGBAUnorm = 62 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case bc7RGBAUnormSrgb = 63 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case etc2RGB8Unorm = 64 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case etc2RGB8UnormSrgb = 65 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case etc2RGB8A1Unorm = 66 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case etc2RGB8A1UnormSrgb = 67 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case etc2RGBA8Unorm = 68 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case etc2RGBA8UnormSrgb = 69 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case eacr11Unorm = 70 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case eacr11Snorm = 71 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case eacrg11Unorm = 72 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case eacrg11Snorm = 73 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc4x4Unorm = 74 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc4x4UnormSrgb = 75 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc5x4Unorm = 76 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc5x4UnormSrgb = 77 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc5x5Unorm = 78 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc5x5UnormSrgb = 79 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc6x5Unorm = 80 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc6x5UnormSrgb = 81 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc6x6Unorm = 82 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc6x6UnormSrgb = 83 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc8x5Unorm = 84 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc8x5UnormSrgb = 85 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc8x6Unorm = 86 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc8x6UnormSrgb = 87 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc8x8Unorm = 88 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc8x8UnormSrgb = 89 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc10x5Unorm = 90 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc10x5UnormSrgb = 91 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc10x6Unorm = 92 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc10x6UnormSrgb = 93 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc10x8Unorm = 94 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc10x8UnormSrgb = 95 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc10x10Unorm = 96 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc10x10UnormSrgb = 97 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc12x10Unorm = 98 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc12x10UnormSrgb = 99 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc12x12Unorm = 100 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case astc12x12UnormSrgb = 101 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUTextureSampleType : UInt32, @unchecked Sendable { /** * `0`. Indicates that this @ref WGPUTextureBindingLayout member of * its parent @ref WGPUBindGroupLayoutEntry is not used. * (See also @ref SentinelValues.) */ case bindingNotUsed = 0 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 1 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case float = 2 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case unfilterableFloat = 3 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case depth = 4 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case sint = 5 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case uint = 6 /** * `1`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } @frozen public enum WGPUTextureViewDimension : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _Undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _1D = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _2D = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _2DArray = 3 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _Cube = 4 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _CubeArray = 5 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _3D = 6 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case _Force32 = 2147483647 } @frozen public enum WGPUToneMappingMode : UInt32, @unchecked Sendable { case standard = 1 case extended = 2 case force32 = 2147483647 } @frozen public enum WGPUVertexFormat : UInt32, @unchecked Sendable { case uint8 = 1 case uint8x2 = 2 case uint8x4 = 3 case sint8 = 4 case sint8x2 = 5 case sint8x4 = 6 case unorm8 = 7 case unorm8x2 = 8 case unorm8x4 = 9 case snorm8 = 10 case snorm8x2 = 11 case snorm8x4 = 12 case uint16 = 13 case uint16x2 = 14 case uint16x4 = 15 case sint16 = 16 case sint16x2 = 17 case sint16x4 = 18 case unorm16 = 19 case unorm16x2 = 20 case unorm16x4 = 21 case snorm16 = 22 case snorm16x2 = 23 case snorm16x4 = 24 case float16 = 25 case float16x2 = 26 case float16x4 = 27 case float32 = 28 case float32x2 = 29 case float32x3 = 30 case float32x4 = 31 case uint32 = 32 case uint32x2 = 33 case uint32x3 = 34 case uint32x4 = 35 case sint32 = 36 case sint32x2 = 37 case sint32x3 = 38 case sint32x4 = 39 case unorm10_10_10_2 = 40 case unorm8x4BGRA = 41 case force32 = 2147483647 } @frozen public enum WGPUVertexStepMode : UInt32, @unchecked Sendable { /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case undefined = 0 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case vertex = 1 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case instance = 2 /** * `0`. Indicates no value is passed for this argument. See @ref SentinelValues. */ case force32 = 2147483647 } /** * Status returned from a call to ::wgpuInstanceWaitAny. */ @frozen public enum WGPUWaitStatus : UInt32, @unchecked Sendable { /** * At least one WGPUFuture completed successfully. */ case success = 1 /** * The wait operation succeeded, but no WGPUFutures completed within the timeout. */ case timedOut = 2 /** * The call was invalid for some reason (see @ref Wait-Any). * Should produce @ref ImplementationDefinedLogging containing details. */ case error = 3 /** * The call was invalid for some reason (see @ref Wait-Any). * Should produce @ref ImplementationDefinedLogging containing details. */ case force32 = 2147483647 } @frozen public enum WGPUWGSLLanguageFeatureName : UInt32, @unchecked Sendable { case readonlyAndReadwriteStorageTextures = 1 case packed4x8IntegerDotProduct = 2 case unrestrictedPointerParameters = 3 case pointerCompositeAccess = 4 case force32 = 2147483647 } /** * For reserved non-standard bitflag values, see @ref BitflagRegistry. */ public struct WGPUBufferUsage : Hashable, Equatable, RawRepresentable, @unchecked Sendable { public init(_ rawValue: WGPUFlags) public init(rawValue: WGPUFlags) } extension WGPUBufferUsage { /** * `0`. */ public static var none: WGPUBufferUsage { get } /** * The buffer can be *mapped* on the CPU side in *read* mode (using @ref WGPUMapMode_Read). */ public static var mapRead: WGPUBufferUsage { get } /** * The buffer can be *mapped* on the CPU side in *write* mode (using @ref WGPUMapMode_Write). * * @note This usage is **not** required to set `mappedAtCreation` to `true` in @ref WGPUBufferDescriptor. */ public static var mapWrite: WGPUBufferUsage { get } /** * The buffer can be used as the *source* of a GPU-side copy operation. */ public static var copySrc: WGPUBufferUsage { get } /** * The buffer can be used as the *destination* of a GPU-side copy operation. */ public static var copyDst: WGPUBufferUsage { get } /** * The buffer can be used as an Index buffer when doing indexed drawing in a render pipeline. */ public static var index: WGPUBufferUsage { get } /** * The buffer can be used as an Vertex buffer when using a render pipeline. */ public static var vertex: WGPUBufferUsage { get } /** * The buffer can be bound to a shader as a uniform buffer. */ public static var uniform: WGPUBufferUsage { get } /** * The buffer can be bound to a shader as a storage buffer. */ public static var storage: WGPUBufferUsage { get } /** * The buffer can store arguments for an indirect draw call. */ public static var indirect: WGPUBufferUsage { get } /** * The buffer can store the result of a timestamp or occlusion query. */ public static var queryResolve: WGPUBufferUsage { get } } /** * For reserved non-standard bitflag values, see @ref BitflagRegistry. */ public struct WGPUColorWriteMask : Hashable, Equatable, RawRepresentable, @unchecked Sendable { public init(_ rawValue: WGPUFlags) public init(rawValue: WGPUFlags) } extension WGPUColorWriteMask { /** * `0`. */ public static var none: WGPUColorWriteMask { get } public static var red: WGPUColorWriteMask { get } public static var green: WGPUColorWriteMask { get } public static var blue: WGPUColorWriteMask { get } public static var alpha: WGPUColorWriteMask { get } /** * `Red | Green | Blue | Alpha`. */ public static var all: WGPUColorWriteMask { get } } /** * For reserved non-standard bitflag values, see @ref BitflagRegistry. */ public struct WGPUMapMode : Hashable, Equatable, RawRepresentable, @unchecked Sendable { public init(_ rawValue: WGPUFlags) public init(rawValue: WGPUFlags) } extension WGPUMapMode { /** * `0`. */ public static var none: WGPUMapMode { get } public static var read: WGPUMapMode { get } public static var write: WGPUMapMode { get } } /** * For reserved non-standard bitflag values, see @ref BitflagRegistry. */ public struct WGPUShaderStage : Hashable, Equatable, RawRepresentable, @unchecked Sendable { public init(_ rawValue: WGPUFlags) public init(rawValue: WGPUFlags) } extension WGPUShaderStage { /** * `0`. */ public static var none: WGPUShaderStage { get } public static var vertex: WGPUShaderStage { get } public static var fragment: WGPUShaderStage { get } public static var compute: WGPUShaderStage { get } } /** * For reserved non-standard bitflag values, see @ref BitflagRegistry. */ public struct WGPUTextureUsage : Hashable, Equatable, RawRepresentable, @unchecked Sendable { public init(_ rawValue: WGPUFlags) public init(rawValue: WGPUFlags) } extension WGPUTextureUsage { /** * `0`. */ public static var none: WGPUTextureUsage { get } public static var copySrc: WGPUTextureUsage { get } public static var copyDst: WGPUTextureUsage { get } public static var textureBinding: WGPUTextureUsage { get } public static var storageBinding: WGPUTextureUsage { get } public static var renderAttachment: WGPUTextureUsage { get } } /** @} */ public typealias WGPUProc = @convention(c) () -> Void /** * See also @ref CallbackError. * * @param message * This parameter is @ref PassedWithoutOwnership. */ public typealias WGPUBufferMapCallback = @convention(c) (WGPUMapAsyncStatus, WGPUStringView, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void /** * See also @ref CallbackError. * * @param compilationInfo * This argument contains multiple @ref ImplementationAllocatedStructChain roots. * Arbitrary chains must be handled gracefully by the application! * This parameter is @ref PassedWithoutOwnership. */ public typealias WGPUCompilationInfoCallback = @convention(c) (WGPUCompilationInfoRequestStatus, UnsafePointer?, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void /** * See also @ref CallbackError. * * @param pipeline * This parameter is @ref PassedWithOwnership. */ public typealias WGPUCreateComputePipelineAsyncCallback = @convention(c) (WGPUCreatePipelineAsyncStatus, WGPUComputePipeline?, WGPUStringView, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void /** * See also @ref CallbackError. * * @param pipeline * This parameter is @ref PassedWithOwnership. */ public typealias WGPUCreateRenderPipelineAsyncCallback = @convention(c) (WGPUCreatePipelineAsyncStatus, WGPURenderPipeline?, WGPUStringView, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void /** * See also @ref CallbackError. * * @param device * Pointer to the device which was lost. This is always a non-null pointer. * The pointed-to @ref WGPUDevice will be null if, and only if, either: * (1) The `reason` is @ref WGPUDeviceLostReason_FailedCreation. * (2) The last ref of the device has been (or is being) released: see @ref DeviceRelease. * This parameter is @ref PassedWithoutOwnership. * * @param message * This parameter is @ref PassedWithoutOwnership. */ public typealias WGPUDeviceLostCallback = @convention(c) (UnsafePointer?, WGPUDeviceLostReason, WGPUStringView, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void /** * See also @ref CallbackError. * * @param status * See @ref WGPUPopErrorScopeStatus. * * @param type * The type of the error caught by the scope, or @ref WGPUErrorType_NoError if there was none. * If the `status` is not @ref WGPUPopErrorScopeStatus_Success, this is @ref WGPUErrorType_NoError. * * @param message * If the `status` is not @ref WGPUPopErrorScopeStatus_Success **or** * the `type` is not @ref WGPUErrorType_NoError, this is a non-empty * @ref LocalizableHumanReadableMessageString; * otherwise, this is an empty string. * This parameter is @ref PassedWithoutOwnership. */ public typealias WGPUPopErrorScopeCallback = @convention(c) (WGPUPopErrorScopeStatus, WGPUErrorType, WGPUStringView, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void /** * See also @ref CallbackError. * * @param status * See @ref WGPUQueueWorkDoneStatus. * * @param message * If the `status` is not @ref WGPUQueueWorkDoneStatus_Success, * this is a non-empty @ref LocalizableHumanReadableMessageString; * otherwise, this is an empty string. * This parameter is @ref PassedWithoutOwnership. */ public typealias WGPUQueueWorkDoneCallback = @convention(c) (WGPUQueueWorkDoneStatus, WGPUStringView, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void /** * See also @ref CallbackError. * * @param adapter * This parameter is @ref PassedWithOwnership. * * @param message * This parameter is @ref PassedWithoutOwnership. */ public typealias WGPURequestAdapterCallback = @convention(c) (WGPURequestAdapterStatus, WGPUAdapter?, WGPUStringView, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void /** * See also @ref CallbackError. * * @param device * This parameter is @ref PassedWithOwnership. * * @param message * This parameter is @ref PassedWithoutOwnership. */ public typealias WGPURequestDeviceCallback = @convention(c) (WGPURequestDeviceStatus, WGPUDevice?, WGPUStringView, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void /** * See also @ref CallbackError. * * @param device * This parameter is @ref PassedWithoutOwnership. * * @param message * This parameter is @ref PassedWithoutOwnership. */ public typealias WGPUUncapturedErrorCallback = @convention(c) (UnsafePointer?, WGPUErrorType, WGPUStringView, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void /** @} */ /** * \defgroup ChainedStructures Chained Structures * \brief Structures used to extend descriptors. * * @{ */ public struct WGPUChainedStruct { public init() public init(next: UnsafeMutablePointer!, sType: WGPUSType) public var next: UnsafeMutablePointer! public var sType: WGPUSType } /** * \defgroup CallbackInfoStructs Callback Info Structs * \brief Callback info structures that are used in asynchronous functions. * * @{ */ public struct WGPUBufferMapCallbackInfo { public init() public init(nextInChain: UnsafeMutablePointer!, mode: WGPUCallbackMode, callback: WGPUBufferMapCallback!, userdata1: UnsafeMutableRawPointer!, userdata2: UnsafeMutableRawPointer!) public var nextInChain: UnsafeMutablePointer! /** * Controls when the callback may be called. * * Has no default. The `INIT` macro sets this to (@ref WGPUCallbackMode)0. */ public var mode: WGPUCallbackMode public var callback: WGPUBufferMapCallback! public var userdata1: UnsafeMutableRawPointer! public var userdata2: UnsafeMutableRawPointer! } public struct WGPUCompilationInfoCallbackInfo { public init() public init(nextInChain: UnsafeMutablePointer!, mode: WGPUCallbackMode, callback: WGPUCompilationInfoCallback!, userdata1: UnsafeMutableRawPointer!, userdata2: UnsafeMutableRawPointer!) public var nextInChain: UnsafeMutablePointer! /** * Controls when the callback may be called. * * Has no default. The `INIT` macro sets this to (@ref WGPUCallbackMode)0. */ public var mode: WGPUCallbackMode public var callback: WGPUCompilationInfoCallback! public var userdata1: UnsafeMutableRawPointer! public var userdata2: UnsafeMutableRawPointer! } public struct WGPUCreateComputePipelineAsyncCallbackInfo { public init() public init(nextInChain: UnsafeMutablePointer!, mode: WGPUCallbackMode, callback: WGPUCreateComputePipelineAsyncCallback!, userdata1: UnsafeMutableRawPointer!, userdata2: UnsafeMutableRawPointer!) public var nextInChain: UnsafeMutablePointer! /** * Controls when the callback may be called. * * Has no default. The `INIT` macro sets this to (@ref WGPUCallbackMode)0. */ public var mode: WGPUCallbackMode public var callback: WGPUCreateComputePipelineAsyncCallback! public var userdata1: UnsafeMutableRawPointer! public var userdata2: UnsafeMutableRawPointer! } public struct WGPUCreateRenderPipelineAsyncCallbackInfo { public init() public init(nextInChain: UnsafeMutablePointer!, mode: WGPUCallbackMode, callback: WGPUCreateRenderPipelineAsyncCallback!, userdata1: UnsafeMutableRawPointer!, userdata2: UnsafeMutableRawPointer!) public var nextInChain: UnsafeMutablePointer! /** * Controls when the callback may be called. * * Has no default. The `INIT` macro sets this to (@ref WGPUCallbackMode)0. */ public var mode: WGPUCallbackMode public var callback: WGPUCreateRenderPipelineAsyncCallback! public var userdata1: UnsafeMutableRawPointer! public var userdata2: UnsafeMutableRawPointer! } public struct WGPUDeviceLostCallbackInfo { public init() public init(nextInChain: UnsafeMutablePointer!, mode: WGPUCallbackMode, callback: WGPUDeviceLostCallback!, userdata1: UnsafeMutableRawPointer!, userdata2: UnsafeMutableRawPointer!) public var nextInChain: UnsafeMutablePointer! /** * Controls when the callback may be called. * * Has no default. The `INIT` macro sets this to (@ref WGPUCallbackMode)0. */ public var mode: WGPUCallbackMode public var callback: WGPUDeviceLostCallback! public var userdata1: UnsafeMutableRawPointer! public var userdata2: UnsafeMutableRawPointer! } public struct WGPUPopErrorScopeCallbackInfo { public init() public init(nextInChain: UnsafeMutablePointer!, mode: WGPUCallbackMode, callback: WGPUPopErrorScopeCallback!, userdata1: UnsafeMutableRawPointer!, userdata2: UnsafeMutableRawPointer!) public var nextInChain: UnsafeMutablePointer! /** * Controls when the callback may be called. * * Has no default. The `INIT` macro sets this to (@ref WGPUCallbackMode)0. */ public var mode: WGPUCallbackMode public var callback: WGPUPopErrorScopeCallback! public var userdata1: UnsafeMutableRawPointer! public var userdata2: UnsafeMutableRawPointer! } public struct WGPUQueueWorkDoneCallbackInfo { public init() public init(nextInChain: UnsafeMutablePointer!, mode: WGPUCallbackMode, callback: WGPUQueueWorkDoneCallback!, userdata1: UnsafeMutableRawPointer!, userdata2: UnsafeMutableRawPointer!) public var nextInChain: UnsafeMutablePointer! /** * Controls when the callback may be called. * * Has no default. The `INIT` macro sets this to (@ref WGPUCallbackMode)0. */ public var mode: WGPUCallbackMode public var callback: WGPUQueueWorkDoneCallback! public var userdata1: UnsafeMutableRawPointer! public var userdata2: UnsafeMutableRawPointer! } public struct WGPURequestAdapterCallbackInfo { public init() public init(nextInChain: UnsafeMutablePointer!, mode: WGPUCallbackMode, callback: WGPURequestAdapterCallback!, userdata1: UnsafeMutableRawPointer!, userdata2: UnsafeMutableRawPointer!) public var nextInChain: UnsafeMutablePointer! /** * Controls when the callback may be called. * * Has no default. The `INIT` macro sets this to (@ref WGPUCallbackMode)0. */ public var mode: WGPUCallbackMode public var callback: WGPURequestAdapterCallback! public var userdata1: UnsafeMutableRawPointer! public var userdata2: UnsafeMutableRawPointer! } public struct WGPURequestDeviceCallbackInfo { public init() public init(nextInChain: UnsafeMutablePointer!, mode: WGPUCallbackMode, callback: WGPURequestDeviceCallback!, userdata1: UnsafeMutableRawPointer!, userdata2: UnsafeMutableRawPointer!) public var nextInChain: UnsafeMutablePointer! /** * Controls when the callback may be called. * * Has no default. The `INIT` macro sets this to (@ref WGPUCallbackMode)0. */ public var mode: WGPUCallbackMode public var callback: WGPURequestDeviceCallback! public var userdata1: UnsafeMutableRawPointer! public var userdata2: UnsafeMutableRawPointer! } public struct WGPUUncapturedErrorCallbackInfo { public init() public init(nextInChain: UnsafeMutablePointer!, callback: WGPUUncapturedErrorCallback!, userdata1: UnsafeMutableRawPointer!, userdata2: UnsafeMutableRawPointer!) public var nextInChain: UnsafeMutablePointer! public var callback: WGPUUncapturedErrorCallback! public var userdata1: UnsafeMutableRawPointer! public var userdata2: UnsafeMutableRawPointer! } /** * Default values can be set using @ref WGPU_ADAPTER_INFO_INIT as initializer. */ public struct WGPUAdapterInfo { public init() public init(nextInChain: UnsafeMutablePointer!, vendor: WGPUStringView, architecture: WGPUStringView, device: WGPUStringView, description: WGPUStringView, backendType: WGPUBackendType, adapterType: WGPUAdapterType, vendorID: UInt32, deviceID: UInt32, subgroupMinSize: UInt32, subgroupMaxSize: UInt32) public var nextInChain: UnsafeMutablePointer! /** * This is an \ref OutputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var vendor: WGPUStringView /** * This is an \ref OutputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var architecture: WGPUStringView /** * This is an \ref OutputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var device: WGPUStringView /** * This is an \ref OutputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var description: WGPUStringView /** * The `INIT` macro sets this to @ref WGPUBackendType_Undefined. */ public var backendType: WGPUBackendType /** * The `INIT` macro sets this to (@ref WGPUAdapterType)0. */ public var adapterType: WGPUAdapterType /** * The `INIT` macro sets this to `0`. */ public var vendorID: UInt32 /** * The `INIT` macro sets this to `0`. */ public var deviceID: UInt32 /** * The `INIT` macro sets this to `0`. */ public var subgroupMinSize: UInt32 /** * The `INIT` macro sets this to `0`. */ public var subgroupMaxSize: UInt32 } /** * Default values can be set using @ref WGPU_BIND_GROUP_ENTRY_INIT as initializer. */ public struct WGPUBindGroupEntry { public init() public init(nextInChain: UnsafeMutablePointer!, binding: UInt32, buffer: WGPUBuffer!, offset: UInt64, size: UInt64, sampler: WGPUSampler!, textureView: WGPUTextureView!) public var nextInChain: UnsafeMutablePointer! /** * Binding index in the bind group. * * The `INIT` macro sets this to `0`. */ public var binding: UInt32 /** * Set this if the binding is a buffer object. * Otherwise must be null. * * The `INIT` macro sets this to `NULL`. */ public var buffer: WGPUBuffer! /** * If the binding is a buffer, this is the byte offset of the binding range. * Otherwise ignored. * * The `INIT` macro sets this to `0`. */ public var offset: UInt64 /** * If the binding is a buffer, this is the byte size of the binding range * (@ref WGPU_WHOLE_SIZE means the binding ends at the end of the buffer). * Otherwise ignored. * * The `INIT` macro sets this to @ref WGPU_WHOLE_SIZE. */ public var size: UInt64 /** * Set this if the binding is a sampler object. * Otherwise must be null. * * The `INIT` macro sets this to `NULL`. */ public var sampler: WGPUSampler! /** * Set this if the binding is a texture view object. * Otherwise must be null. * * The `INIT` macro sets this to `NULL`. */ public var textureView: WGPUTextureView! } /** * Default values can be set using @ref WGPU_BLEND_COMPONENT_INIT as initializer. */ public struct WGPUBlendComponent { public init() public init(operation: WGPUBlendOperation, srcFactor: WGPUBlendFactor, dstFactor: WGPUBlendFactor) /** * If set to @ref WGPUBlendOperation_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUBlendOperation_Add. * * The `INIT` macro sets this to @ref WGPUBlendOperation_Undefined. */ public var operation: WGPUBlendOperation /** * If set to @ref WGPUBlendFactor_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUBlendFactor_One. * * The `INIT` macro sets this to @ref WGPUBlendFactor_Undefined. */ public var srcFactor: WGPUBlendFactor /** * If set to @ref WGPUBlendFactor_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUBlendFactor_Zero. * * The `INIT` macro sets this to @ref WGPUBlendFactor_Undefined. */ public var dstFactor: WGPUBlendFactor } /** * Default values can be set using @ref WGPU_BUFFER_BINDING_LAYOUT_INIT as initializer. */ public struct WGPUBufferBindingLayout { public init() public init(nextInChain: UnsafeMutablePointer!, type: WGPUBufferBindingType, hasDynamicOffset: WGPUBool, minBindingSize: UInt64) public var nextInChain: UnsafeMutablePointer! /** * If set to @ref WGPUBufferBindingType_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUBufferBindingType_Uniform. * * The `INIT` macro sets this to @ref WGPUBufferBindingType_Undefined. */ public var type: WGPUBufferBindingType /** * The `INIT` macro sets this to `WGPU_FALSE`. */ public var hasDynamicOffset: WGPUBool /** * The `INIT` macro sets this to `0`. */ public var minBindingSize: UInt64 } /** * Default values can be set using @ref WGPU_BUFFER_DESCRIPTOR_INIT as initializer. */ public struct WGPUBufferDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, usage: WGPUBufferUsage, size: UInt64, mappedAtCreation: WGPUBool) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * The `INIT` macro sets this to @ref WGPUBufferUsage_None. */ public var usage: WGPUBufferUsage /** * The `INIT` macro sets this to `0`. */ public var size: UInt64 /** * When true, the buffer is mapped in write mode at creation. It should thus be unmapped once its initial data has been written. * * @note Mapping at creation does **not** require the usage @ref WGPUBufferUsage_MapWrite. * * The `INIT` macro sets this to `WGPU_FALSE`. */ public var mappedAtCreation: WGPUBool } /** * An RGBA color. Represents a `f32`, `i32`, or `u32` color using @ref DoubleAsSupertype. * * If any channel is non-finite, produces a @ref NonFiniteFloatValueError. * * Default values can be set using @ref WGPU_COLOR_INIT as initializer. */ public struct WGPUColor { public init() public init(r: Double, g: Double, b: Double, a: Double) /** * The `INIT` macro sets this to `0.`. */ public var r: Double /** * The `INIT` macro sets this to `0.`. */ public var g: Double /** * The `INIT` macro sets this to `0.`. */ public var b: Double /** * The `INIT` macro sets this to `0.`. */ public var a: Double } /** * Default values can be set using @ref WGPU_COMMAND_BUFFER_DESCRIPTOR_INIT as initializer. */ public struct WGPUCommandBufferDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView } /** * Default values can be set using @ref WGPU_COMMAND_ENCODER_DESCRIPTOR_INIT as initializer. */ public struct WGPUCommandEncoderDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView } /** * This is an @ref ImplementationAllocatedStructChain root. * Arbitrary chains must be handled gracefully by the application! * * Default values can be set using @ref WGPU_COMPILATION_MESSAGE_INIT as initializer. */ public struct WGPUCompilationMessage { public init() public init(nextInChain: UnsafeMutablePointer!, message: WGPUStringView, type: WGPUCompilationMessageType, lineNum: UInt64, linePos: UInt64, offset: UInt64, length: UInt64) public var nextInChain: UnsafeMutablePointer! /** * A @ref LocalizableHumanReadableMessageString. * * This is an \ref OutputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var message: WGPUStringView /** * Severity level of the message. * * The `INIT` macro sets this to (@ref WGPUCompilationMessageType)0. */ public var type: WGPUCompilationMessageType /** * Line number where the message is attached, starting at 1. * * The `INIT` macro sets this to `0`. */ public var lineNum: UInt64 /** * Offset in UTF-8 code units (bytes) from the beginning of the line, starting at 1. * * The `INIT` macro sets this to `0`. */ public var linePos: UInt64 /** * Offset in UTF-8 code units (bytes) from the beginning of the shader code, starting at 0. * * The `INIT` macro sets this to `0`. */ public var offset: UInt64 /** * Length in UTF-8 code units (bytes) of the span the message corresponds to. * * The `INIT` macro sets this to `0`. */ public var length: UInt64 } /** * Default values can be set using @ref WGPU_CONSTANT_ENTRY_INIT as initializer. */ public struct WGPUConstantEntry { public init() public init(nextInChain: UnsafeMutablePointer!, key: WGPUStringView, value: Double) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var key: WGPUStringView /** * Represents a WGSL numeric or boolean value using @ref DoubleAsSupertype. * * If non-finite, produces a @ref NonFiniteFloatValueError. * * The `INIT` macro sets this to `0.`. */ public var value: Double } /** * Default values can be set using @ref WGPU_EXTENT_3D_INIT as initializer. */ public struct WGPUExtent3D { public init() public init(width: UInt32, height: UInt32, depthOrArrayLayers: UInt32) /** * The `INIT` macro sets this to `0`. */ public var width: UInt32 /** * The `INIT` macro sets this to `1`. */ public var height: UInt32 /** * The `INIT` macro sets this to `1`. */ public var depthOrArrayLayers: UInt32 } /** * Opaque handle to an asynchronous operation. See @ref Asynchronous-Operations for more information. * * Default values can be set using @ref WGPU_FUTURE_INIT as initializer. */ public struct WGPUFuture { public init() public init(id: UInt64) /** * Opaque id of the @ref WGPUFuture * * The `INIT` macro sets this to `0`. */ public var id: UInt64 } /** * Default values can be set using @ref WGPU_INSTANCE_LIMITS_INIT as initializer. */ public struct WGPUInstanceLimits { public init() public init(nextInChain: UnsafeMutablePointer!, timedWaitAnyMaxCount: Int) public var nextInChain: UnsafeMutablePointer! /** * The maximum number @ref WGPUFutureWaitInfo supported in a call to ::wgpuInstanceWaitAny with `timeoutNS > 0`. * * The `INIT` macro sets this to `0`. */ public var timedWaitAnyMaxCount: Int } /** * Default values can be set using @ref WGPU_LIMITS_INIT as initializer. */ public struct WGPULimits { public init() public init(nextInChain: UnsafeMutablePointer!, maxTextureDimension1D: UInt32, maxTextureDimension2D: UInt32, maxTextureDimension3D: UInt32, maxTextureArrayLayers: UInt32, maxBindGroups: UInt32, maxBindGroupsPlusVertexBuffers: UInt32, maxBindingsPerBindGroup: UInt32, maxDynamicUniformBuffersPerPipelineLayout: UInt32, maxDynamicStorageBuffersPerPipelineLayout: UInt32, maxSampledTexturesPerShaderStage: UInt32, maxSamplersPerShaderStage: UInt32, maxStorageBuffersPerShaderStage: UInt32, maxStorageTexturesPerShaderStage: UInt32, maxUniformBuffersPerShaderStage: UInt32, maxUniformBufferBindingSize: UInt64, maxStorageBufferBindingSize: UInt64, minUniformBufferOffsetAlignment: UInt32, minStorageBufferOffsetAlignment: UInt32, maxVertexBuffers: UInt32, maxBufferSize: UInt64, maxVertexAttributes: UInt32, maxVertexBufferArrayStride: UInt32, maxInterStageShaderVariables: UInt32, maxColorAttachments: UInt32, maxColorAttachmentBytesPerSample: UInt32, maxComputeWorkgroupStorageSize: UInt32, maxComputeInvocationsPerWorkgroup: UInt32, maxComputeWorkgroupSizeX: UInt32, maxComputeWorkgroupSizeY: UInt32, maxComputeWorkgroupSizeZ: UInt32, maxComputeWorkgroupsPerDimension: UInt32, maxImmediateSize: UInt32) public var nextInChain: UnsafeMutablePointer! /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxTextureDimension1D: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxTextureDimension2D: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxTextureDimension3D: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxTextureArrayLayers: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxBindGroups: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxBindGroupsPlusVertexBuffers: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxBindingsPerBindGroup: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxDynamicUniformBuffersPerPipelineLayout: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxDynamicStorageBuffersPerPipelineLayout: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxSampledTexturesPerShaderStage: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxSamplersPerShaderStage: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxStorageBuffersPerShaderStage: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxStorageTexturesPerShaderStage: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxUniformBuffersPerShaderStage: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U64_UNDEFINED. */ public var maxUniformBufferBindingSize: UInt64 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U64_UNDEFINED. */ public var maxStorageBufferBindingSize: UInt64 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var minUniformBufferOffsetAlignment: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var minStorageBufferOffsetAlignment: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxVertexBuffers: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U64_UNDEFINED. */ public var maxBufferSize: UInt64 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxVertexAttributes: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxVertexBufferArrayStride: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxInterStageShaderVariables: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxColorAttachments: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxColorAttachmentBytesPerSample: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxComputeWorkgroupStorageSize: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxComputeInvocationsPerWorkgroup: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxComputeWorkgroupSizeX: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxComputeWorkgroupSizeY: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxComputeWorkgroupSizeZ: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxComputeWorkgroupsPerDimension: UInt32 /** * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. */ public var maxImmediateSize: UInt32 } /** * Default values can be set using @ref WGPU_MULTISAMPLE_STATE_INIT as initializer. */ public struct WGPUMultisampleState { public init() public init(nextInChain: UnsafeMutablePointer!, count: UInt32, mask: UInt32, alphaToCoverageEnabled: WGPUBool) public var nextInChain: UnsafeMutablePointer! /** * The `INIT` macro sets this to `1`. */ public var count: UInt32 /** * The `INIT` macro sets this to `0xFFFFFFFF`. */ public var mask: UInt32 /** * The `INIT` macro sets this to `WGPU_FALSE`. */ public var alphaToCoverageEnabled: WGPUBool } /** * Default values can be set using @ref WGPU_ORIGIN_3D_INIT as initializer. */ public struct WGPUOrigin3D { public init() public init(x: UInt32, y: UInt32, z: UInt32) /** * The `INIT` macro sets this to `0`. */ public var x: UInt32 /** * The `INIT` macro sets this to `0`. */ public var y: UInt32 /** * The `INIT` macro sets this to `0`. */ public var z: UInt32 } /** * Default values can be set using @ref WGPU_PASS_TIMESTAMP_WRITES_INIT as initializer. */ public struct WGPUPassTimestampWrites { public init() public init(nextInChain: UnsafeMutablePointer!, querySet: WGPUQuerySet!, beginningOfPassWriteIndex: UInt32, endOfPassWriteIndex: UInt32) public var nextInChain: UnsafeMutablePointer! /** * Query set to write timestamps to. * * The `INIT` macro sets this to `NULL`. */ public var querySet: WGPUQuerySet! /** * The `INIT` macro sets this to @ref WGPU_QUERY_SET_INDEX_UNDEFINED. */ public var beginningOfPassWriteIndex: UInt32 /** * The `INIT` macro sets this to @ref WGPU_QUERY_SET_INDEX_UNDEFINED. */ public var endOfPassWriteIndex: UInt32 } /** * Default values can be set using @ref WGPU_PIPELINE_LAYOUT_DESCRIPTOR_INIT as initializer. */ public struct WGPUPipelineLayoutDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, bindGroupLayoutCount: Int, bindGroupLayouts: UnsafePointer!, immediateSize: UInt32) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * Array count for `bindGroupLayouts`. The `INIT` macro sets this to 0. */ public var bindGroupLayoutCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var bindGroupLayouts: UnsafePointer! /** * The `INIT` macro sets this to `0`. */ public var immediateSize: UInt32 } /** * Default values can be set using @ref WGPU_PRIMITIVE_STATE_INIT as initializer. */ public struct WGPUPrimitiveState { public init() public init(nextInChain: UnsafeMutablePointer!, topology: WGPUPrimitiveTopology, stripIndexFormat: WGPUIndexFormat, frontFace: WGPUFrontFace, cullMode: WGPUCullMode, unclippedDepth: WGPUBool) public var nextInChain: UnsafeMutablePointer! /** * If set to @ref WGPUPrimitiveTopology_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUPrimitiveTopology_TriangleList. * * The `INIT` macro sets this to @ref WGPUPrimitiveTopology_Undefined. */ public var topology: WGPUPrimitiveTopology /** * The `INIT` macro sets this to @ref WGPUIndexFormat_Undefined. */ public var stripIndexFormat: WGPUIndexFormat /** * If set to @ref WGPUFrontFace_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUFrontFace_CCW. * * The `INIT` macro sets this to @ref WGPUFrontFace_Undefined. */ public var frontFace: WGPUFrontFace /** * If set to @ref WGPUCullMode_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUCullMode_None. * * The `INIT` macro sets this to @ref WGPUCullMode_Undefined. */ public var cullMode: WGPUCullMode /** * The `INIT` macro sets this to `WGPU_FALSE`. */ public var unclippedDepth: WGPUBool } /** * Default values can be set using @ref WGPU_QUERY_SET_DESCRIPTOR_INIT as initializer. */ public struct WGPUQuerySetDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, type: WGPUQueryType, count: UInt32) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * The `INIT` macro sets this to (@ref WGPUQueryType)0. */ public var type: WGPUQueryType /** * The `INIT` macro sets this to `0`. */ public var count: UInt32 } /** * Default values can be set using @ref WGPU_QUEUE_DESCRIPTOR_INIT as initializer. */ public struct WGPUQueueDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView } /** * Default values can be set using @ref WGPU_RENDER_BUNDLE_DESCRIPTOR_INIT as initializer. */ public struct WGPURenderBundleDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView } /** * Default values can be set using @ref WGPU_RENDER_BUNDLE_ENCODER_DESCRIPTOR_INIT as initializer. */ public struct WGPURenderBundleEncoderDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, colorFormatCount: Int, colorFormats: UnsafePointer!, depthStencilFormat: WGPUTextureFormat, sampleCount: UInt32, depthReadOnly: WGPUBool, stencilReadOnly: WGPUBool) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * Array count for `colorFormats`. The `INIT` macro sets this to 0. */ public var colorFormatCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var colorFormats: UnsafePointer! /** * The `INIT` macro sets this to @ref WGPUTextureFormat_Undefined. */ public var depthStencilFormat: WGPUTextureFormat /** * The `INIT` macro sets this to `1`. */ public var sampleCount: UInt32 /** * The `INIT` macro sets this to `WGPU_FALSE`. */ public var depthReadOnly: WGPUBool /** * The `INIT` macro sets this to `WGPU_FALSE`. */ public var stencilReadOnly: WGPUBool } /** * Default values can be set using @ref WGPU_RENDER_PASS_DEPTH_STENCIL_ATTACHMENT_INIT as initializer. */ public struct WGPURenderPassDepthStencilAttachment { public init() public init(nextInChain: UnsafeMutablePointer!, view: WGPUTextureView!, depthLoadOp: WGPULoadOp, depthStoreOp: WGPUStoreOp, depthClearValue: Float, depthReadOnly: WGPUBool, stencilLoadOp: WGPULoadOp, stencilStoreOp: WGPUStoreOp, stencilClearValue: UInt32, stencilReadOnly: WGPUBool) public var nextInChain: UnsafeMutablePointer! /** * The `INIT` macro sets this to `NULL`. */ public var view: WGPUTextureView! /** * The `INIT` macro sets this to @ref WGPULoadOp_Undefined. */ public var depthLoadOp: WGPULoadOp /** * The `INIT` macro sets this to @ref WGPUStoreOp_Undefined. */ public var depthStoreOp: WGPUStoreOp /** * This is a @ref NullableFloatingPointType. * * If `NaN`, indicates an `undefined` value (as defined by the JS spec). * Use @ref WGPU_DEPTH_CLEAR_VALUE_UNDEFINED to indicate this semantically. * * If infinite, produces a @ref NonFiniteFloatValueError. * * The `INIT` macro sets this to @ref WGPU_DEPTH_CLEAR_VALUE_UNDEFINED. */ public var depthClearValue: Float /** * The `INIT` macro sets this to `WGPU_FALSE`. */ public var depthReadOnly: WGPUBool /** * The `INIT` macro sets this to @ref WGPULoadOp_Undefined. */ public var stencilLoadOp: WGPULoadOp /** * The `INIT` macro sets this to @ref WGPUStoreOp_Undefined. */ public var stencilStoreOp: WGPUStoreOp /** * The `INIT` macro sets this to `0`. */ public var stencilClearValue: UInt32 /** * The `INIT` macro sets this to `WGPU_FALSE`. */ public var stencilReadOnly: WGPUBool } /** * Default values can be set using @ref WGPU_RENDER_PASS_MAX_DRAW_COUNT_INIT as initializer. */ public struct WGPURenderPassMaxDrawCount { public init() public init(chain: WGPUChainedStruct, maxDrawCount: UInt64) public var chain: WGPUChainedStruct /** * The `INIT` macro sets this to `50000000`. */ public var maxDrawCount: UInt64 } /** * Extension providing requestAdapter options for implementations with WebXR interop (i.e. Wasm). * * Default values can be set using @ref WGPU_REQUEST_ADAPTER_WEBXR_OPTIONS_INIT as initializer. */ public struct WGPURequestAdapterWebXROptions { public init() public init(chain: WGPUChainedStruct, xrCompatible: WGPUBool) public var chain: WGPUChainedStruct /** * Sets the `xrCompatible` option in the JS API. * * The `INIT` macro sets this to `WGPU_FALSE`. */ public var xrCompatible: WGPUBool } /** * Default values can be set using @ref WGPU_SAMPLER_BINDING_LAYOUT_INIT as initializer. */ public struct WGPUSamplerBindingLayout { public init() public init(nextInChain: UnsafeMutablePointer!, type: WGPUSamplerBindingType) public var nextInChain: UnsafeMutablePointer! /** * If set to @ref WGPUSamplerBindingType_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUSamplerBindingType_Filtering. * * The `INIT` macro sets this to @ref WGPUSamplerBindingType_Undefined. */ public var type: WGPUSamplerBindingType } /** * Default values can be set using @ref WGPU_SAMPLER_DESCRIPTOR_INIT as initializer. */ public struct WGPUSamplerDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, addressModeU: WGPUAddressMode, addressModeV: WGPUAddressMode, addressModeW: WGPUAddressMode, magFilter: WGPUFilterMode, minFilter: WGPUFilterMode, mipmapFilter: WGPUMipmapFilterMode, lodMinClamp: Float, lodMaxClamp: Float, compare: WGPUCompareFunction, maxAnisotropy: UInt16) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * If set to @ref WGPUAddressMode_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUAddressMode_ClampToEdge. * * The `INIT` macro sets this to @ref WGPUAddressMode_Undefined. */ public var addressModeU: WGPUAddressMode /** * If set to @ref WGPUAddressMode_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUAddressMode_ClampToEdge. * * The `INIT` macro sets this to @ref WGPUAddressMode_Undefined. */ public var addressModeV: WGPUAddressMode /** * If set to @ref WGPUAddressMode_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUAddressMode_ClampToEdge. * * The `INIT` macro sets this to @ref WGPUAddressMode_Undefined. */ public var addressModeW: WGPUAddressMode /** * If set to @ref WGPUFilterMode_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUFilterMode_Nearest. * * The `INIT` macro sets this to @ref WGPUFilterMode_Undefined. */ public var magFilter: WGPUFilterMode /** * If set to @ref WGPUFilterMode_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUFilterMode_Nearest. * * The `INIT` macro sets this to @ref WGPUFilterMode_Undefined. */ public var minFilter: WGPUFilterMode /** * If set to @ref WGPUFilterMode_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUMipmapFilterMode_Nearest. * * The `INIT` macro sets this to @ref WGPUMipmapFilterMode_Undefined. */ public var mipmapFilter: WGPUMipmapFilterMode /** * TODO * * If non-finite, produces a @ref NonFiniteFloatValueError. * * The `INIT` macro sets this to `0.f`. */ public var lodMinClamp: Float /** * TODO * * If non-finite, produces a @ref NonFiniteFloatValueError. * * The `INIT` macro sets this to `32.f`. */ public var lodMaxClamp: Float /** * The `INIT` macro sets this to @ref WGPUCompareFunction_Undefined. */ public var compare: WGPUCompareFunction /** * The `INIT` macro sets this to `1`. */ public var maxAnisotropy: UInt16 } /** * Default values can be set using @ref WGPU_SHADER_SOURCE_SPIRV_INIT as initializer. */ public struct WGPUShaderSourceSPIRV { public init() public init(chain: WGPUChainedStruct, codeSize: UInt32, code: UnsafePointer!) public var chain: WGPUChainedStruct /** * The `INIT` macro sets this to `0`. */ public var codeSize: UInt32 /** * The `INIT` macro sets this to `NULL`. */ public var code: UnsafePointer! } /** * Default values can be set using @ref WGPU_SHADER_SOURCE_WGSL_INIT as initializer. */ public struct WGPUShaderSourceWGSL { public init() public init(chain: WGPUChainedStruct, code: WGPUStringView) public var chain: WGPUChainedStruct /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var code: WGPUStringView } /** * Default values can be set using @ref WGPU_STENCIL_FACE_STATE_INIT as initializer. */ public struct WGPUStencilFaceState { public init() public init(compare: WGPUCompareFunction, failOp: WGPUStencilOperation, depthFailOp: WGPUStencilOperation, passOp: WGPUStencilOperation) /** * If set to @ref WGPUCompareFunction_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUCompareFunction_Always. * * The `INIT` macro sets this to @ref WGPUCompareFunction_Undefined. */ public var compare: WGPUCompareFunction /** * If set to @ref WGPUStencilOperation_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUStencilOperation_Keep. * * The `INIT` macro sets this to @ref WGPUStencilOperation_Undefined. */ public var failOp: WGPUStencilOperation /** * If set to @ref WGPUStencilOperation_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUStencilOperation_Keep. * * The `INIT` macro sets this to @ref WGPUStencilOperation_Undefined. */ public var depthFailOp: WGPUStencilOperation /** * If set to @ref WGPUStencilOperation_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUStencilOperation_Keep. * * The `INIT` macro sets this to @ref WGPUStencilOperation_Undefined. */ public var passOp: WGPUStencilOperation } /** * Default values can be set using @ref WGPU_STORAGE_TEXTURE_BINDING_LAYOUT_INIT as initializer. */ public struct WGPUStorageTextureBindingLayout { public init() public init(nextInChain: UnsafeMutablePointer!, access: WGPUStorageTextureAccess, format: WGPUTextureFormat, viewDimension: WGPUTextureViewDimension) public var nextInChain: UnsafeMutablePointer! /** * If set to @ref WGPUStorageTextureAccess_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUStorageTextureAccess_WriteOnly. * * The `INIT` macro sets this to @ref WGPUStorageTextureAccess_Undefined. */ public var access: WGPUStorageTextureAccess /** * The `INIT` macro sets this to @ref WGPUTextureFormat_Undefined. */ public var format: WGPUTextureFormat /** * If set to @ref WGPUTextureViewDimension_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUTextureViewDimension_2D. * * The `INIT` macro sets this to @ref WGPUTextureViewDimension_Undefined. */ public var viewDimension: WGPUTextureViewDimension } /** * Default values can be set using @ref WGPU_SUPPORTED_FEATURES_INIT as initializer. */ public struct WGPUSupportedFeatures { public init() public init(featureCount: Int, features: UnsafePointer!) /** * Array count for `features`. The `INIT` macro sets this to 0. */ public var featureCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var features: UnsafePointer! } /** * Default values can be set using @ref WGPU_SUPPORTED_INSTANCE_FEATURES_INIT as initializer. */ public struct WGPUSupportedInstanceFeatures { public init() public init(featureCount: Int, features: UnsafePointer!) /** * Array count for `features`. The `INIT` macro sets this to 0. */ public var featureCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var features: UnsafePointer! } /** * Default values can be set using @ref WGPU_SUPPORTED_WGSL_LANGUAGE_FEATURES_INIT as initializer. */ public struct WGPUSupportedWGSLLanguageFeatures { public init() public init(featureCount: Int, features: UnsafePointer!) /** * Array count for `features`. The `INIT` macro sets this to 0. */ public var featureCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var features: UnsafePointer! } /** * Filled by @ref wgpuSurfaceGetCapabilities with what's supported for @ref wgpuSurfaceConfigure for a pair of @ref WGPUSurface and @ref WGPUAdapter. * * Default values can be set using @ref WGPU_SURFACE_CAPABILITIES_INIT as initializer. */ public struct WGPUSurfaceCapabilities { public init() public init(nextInChain: UnsafeMutablePointer!, usages: WGPUTextureUsage, formatCount: Int, formats: UnsafePointer!, presentModeCount: Int, presentModes: UnsafePointer!, alphaModeCount: Int, alphaModes: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * The bit set of supported @ref WGPUTextureUsage bits. * Guaranteed to contain @ref WGPUTextureUsage_RenderAttachment. * * The `INIT` macro sets this to @ref WGPUTextureUsage_None. */ public var usages: WGPUTextureUsage /** * Array count for `formats`. The `INIT` macro sets this to 0. */ public var formatCount: Int /** * A list of supported @ref WGPUTextureFormat values, in order of preference. * * The `INIT` macro sets this to `NULL`. */ public var formats: UnsafePointer! /** * Array count for `presentModes`. The `INIT` macro sets this to 0. */ public var presentModeCount: Int /** * A list of supported @ref WGPUPresentMode values. * Guaranteed to contain @ref WGPUPresentMode_Fifo. * * The `INIT` macro sets this to `NULL`. */ public var presentModes: UnsafePointer! /** * Array count for `alphaModes`. The `INIT` macro sets this to 0. */ public var alphaModeCount: Int /** * A list of supported @ref WGPUCompositeAlphaMode values. * @ref WGPUCompositeAlphaMode_Auto will be an alias for the first element and will never be present in this array. * * The `INIT` macro sets this to `NULL`. */ public var alphaModes: UnsafePointer! } /** * Extension of @ref WGPUSurfaceConfiguration for color spaces and HDR. * * Default values can be set using @ref WGPU_SURFACE_COLOR_MANAGEMENT_INIT as initializer. */ public struct WGPUSurfaceColorManagement { public init() public init(chain: WGPUChainedStruct, colorSpace: WGPUPredefinedColorSpace, toneMappingMode: WGPUToneMappingMode) public var chain: WGPUChainedStruct /** * The `INIT` macro sets this to (@ref WGPUPredefinedColorSpace)0. */ public var colorSpace: WGPUPredefinedColorSpace /** * The `INIT` macro sets this to (@ref WGPUToneMappingMode)0. */ public var toneMappingMode: WGPUToneMappingMode } /** * Options to @ref wgpuSurfaceConfigure for defining how a @ref WGPUSurface will be rendered to and presented to the user. * See @ref Surface-Configuration for more details. * * Default values can be set using @ref WGPU_SURFACE_CONFIGURATION_INIT as initializer. */ public struct WGPUSurfaceConfiguration { public init() public init(nextInChain: UnsafeMutablePointer!, device: WGPUDevice!, format: WGPUTextureFormat, usage: WGPUTextureUsage, width: UInt32, height: UInt32, viewFormatCount: Int, viewFormats: UnsafePointer!, alphaMode: WGPUCompositeAlphaMode, presentMode: WGPUPresentMode) public var nextInChain: UnsafeMutablePointer! /** * The @ref WGPUDevice to use to render to surface's textures. * * The `INIT` macro sets this to `NULL`. */ public var device: WGPUDevice! /** * The @ref WGPUTextureFormat of the surface's textures. * * The `INIT` macro sets this to @ref WGPUTextureFormat_Undefined. */ public var format: WGPUTextureFormat /** * The @ref WGPUTextureUsage of the surface's textures. * * The `INIT` macro sets this to @ref WGPUTextureUsage_RenderAttachment. */ public var usage: WGPUTextureUsage /** * The width of the surface's textures. * * The `INIT` macro sets this to `0`. */ public var width: UInt32 /** * The height of the surface's textures. * * The `INIT` macro sets this to `0`. */ public var height: UInt32 /** * Array count for `viewFormats`. The `INIT` macro sets this to 0. */ public var viewFormatCount: Int /** * The additional @ref WGPUTextureFormat for @ref WGPUTextureView format reinterpretation of the surface's textures. * * The `INIT` macro sets this to `NULL`. */ public var viewFormats: UnsafePointer! /** * How the surface's frames will be composited on the screen. * * If set to @ref WGPUCompositeAlphaMode_Auto, * [defaults] to @ref WGPUCompositeAlphaMode_Inherit in native (allowing the mode * to be configured externally), and to @ref WGPUCompositeAlphaMode_Opaque in Wasm. * * The `INIT` macro sets this to @ref WGPUCompositeAlphaMode_Auto. */ public var alphaMode: WGPUCompositeAlphaMode /** * When and in which order the surface's frames will be shown on the screen. * * If set to @ref WGPUPresentMode_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUPresentMode_Fifo. * * The `INIT` macro sets this to @ref WGPUPresentMode_Undefined. */ public var presentMode: WGPUPresentMode } /** * Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping an Android [`ANativeWindow`](https://developer.android.com/ndk/reference/group/a-native-window). * * Default values can be set using @ref WGPU_SURFACE_SOURCE_ANDROID_NATIVE_WINDOW_INIT as initializer. */ public struct WGPUSurfaceSourceAndroidNativeWindow { public init() public init(chain: WGPUChainedStruct, window: UnsafeMutableRawPointer!) public var chain: WGPUChainedStruct /** * The pointer to the [`ANativeWindow`](https://developer.android.com/ndk/reference/group/a-native-window) that will be wrapped by the @ref WGPUSurface. * * The `INIT` macro sets this to `NULL`. */ public var window: UnsafeMutableRawPointer! } /** * Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping a [`CAMetalLayer`](https://developer.apple.com/documentation/quartzcore/cametallayer?language=objc). * * Default values can be set using @ref WGPU_SURFACE_SOURCE_METAL_LAYER_INIT as initializer. */ public struct WGPUSurfaceSourceMetalLayer { public init() public init(chain: WGPUChainedStruct, layer: UnsafeMutableRawPointer!) public var chain: WGPUChainedStruct /** * The pointer to the [`CAMetalLayer`](https://developer.apple.com/documentation/quartzcore/cametallayer?language=objc) that will be wrapped by the @ref WGPUSurface. * * The `INIT` macro sets this to `NULL`. */ public var layer: UnsafeMutableRawPointer! } /** * Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping a [Wayland](https://wayland.freedesktop.org/) [`wl_surface`](https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface). * * Default values can be set using @ref WGPU_SURFACE_SOURCE_WAYLAND_SURFACE_INIT as initializer. */ public struct WGPUSurfaceSourceWaylandSurface { public init() public init(chain: WGPUChainedStruct, display: UnsafeMutableRawPointer!, surface: UnsafeMutableRawPointer!) public var chain: WGPUChainedStruct /** * A [`wl_display`](https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_display) for this Wayland instance. * * The `INIT` macro sets this to `NULL`. */ public var display: UnsafeMutableRawPointer! /** * A [`wl_surface`](https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface) that will be wrapped by the @ref WGPUSurface * * The `INIT` macro sets this to `NULL`. */ public var surface: UnsafeMutableRawPointer! } /** * Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping a Windows [`HWND`](https://learn.microsoft.com/en-us/windows/apps/develop/ui-input/retrieve-hwnd). * * Default values can be set using @ref WGPU_SURFACE_SOURCE_WINDOWS_HWND_INIT as initializer. */ public struct WGPUSurfaceSourceWindowsHWND { public init() public init(chain: WGPUChainedStruct, hinstance: UnsafeMutableRawPointer!, hwnd: UnsafeMutableRawPointer!) public var chain: WGPUChainedStruct /** * The [`HINSTANCE`](https://learn.microsoft.com/en-us/windows/win32/learnwin32/winmain--the-application-entry-point) for this application. * Most commonly `GetModuleHandle(nullptr)`. * * The `INIT` macro sets this to `NULL`. */ public var hinstance: UnsafeMutableRawPointer! /** * The [`HWND`](https://learn.microsoft.com/en-us/windows/apps/develop/ui-input/retrieve-hwnd) that will be wrapped by the @ref WGPUSurface. * * The `INIT` macro sets this to `NULL`. */ public var hwnd: UnsafeMutableRawPointer! } /** * Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping an [XCB](https://xcb.freedesktop.org/) `xcb_window_t`. * * Default values can be set using @ref WGPU_SURFACE_SOURCE_XCB_WINDOW_INIT as initializer. */ public struct WGPUSurfaceSourceXCBWindow { public init() public init(chain: WGPUChainedStruct, connection: UnsafeMutableRawPointer!, window: UInt32) public var chain: WGPUChainedStruct /** * The `xcb_connection_t` for the connection to the X server. * * The `INIT` macro sets this to `NULL`. */ public var connection: UnsafeMutableRawPointer! /** * The `xcb_window_t` for the window that will be wrapped by the @ref WGPUSurface. * * The `INIT` macro sets this to `0`. */ public var window: UInt32 } /** * Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping an [Xlib](https://www.x.org/releases/current/doc/libX11/libX11/libX11.html) `Window`. * * Default values can be set using @ref WGPU_SURFACE_SOURCE_XLIB_WINDOW_INIT as initializer. */ public struct WGPUSurfaceSourceXlibWindow { public init() public init(chain: WGPUChainedStruct, display: UnsafeMutableRawPointer!, window: UInt64) public var chain: WGPUChainedStruct /** * A pointer to the [`Display`](https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#Opening_the_Display) connected to the X server. * * The `INIT` macro sets this to `NULL`. */ public var display: UnsafeMutableRawPointer! /** * The [`Window`](https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#Creating_Windows) that will be wrapped by the @ref WGPUSurface. * * The `INIT` macro sets this to `0`. */ public var window: UInt64 } /** * Queried each frame from a @ref WGPUSurface to get a @ref WGPUTexture to render to along with some metadata. * See @ref Surface-Presenting for more details. * * Default values can be set using @ref WGPU_SURFACE_TEXTURE_INIT as initializer. */ public struct WGPUSurfaceTexture { public init() public init(nextInChain: UnsafeMutablePointer!, texture: WGPUTexture!, status: WGPUSurfaceGetCurrentTextureStatus) public var nextInChain: UnsafeMutablePointer! /** * The @ref WGPUTexture representing the frame that will be shown on the surface. * It is @ref ReturnedWithOwnership from @ref wgpuSurfaceGetCurrentTexture. * * The `INIT` macro sets this to `NULL`. */ public var texture: WGPUTexture! /** * Whether the call to @ref wgpuSurfaceGetCurrentTexture succeeded and a hint as to why it might not have. * * The `INIT` macro sets this to (@ref WGPUSurfaceGetCurrentTextureStatus)0. */ public var status: WGPUSurfaceGetCurrentTextureStatus } /** * Default values can be set using @ref WGPU_TEXEL_COPY_BUFFER_LAYOUT_INIT as initializer. */ public struct WGPUTexelCopyBufferLayout { public init() public init(offset: UInt64, bytesPerRow: UInt32, rowsPerImage: UInt32) /** * The `INIT` macro sets this to `0`. */ public var offset: UInt64 /** * The `INIT` macro sets this to @ref WGPU_COPY_STRIDE_UNDEFINED. */ public var bytesPerRow: UInt32 /** * The `INIT` macro sets this to @ref WGPU_COPY_STRIDE_UNDEFINED. */ public var rowsPerImage: UInt32 } /** * Default values can be set using @ref WGPU_TEXTURE_BINDING_LAYOUT_INIT as initializer. */ public struct WGPUTextureBindingLayout { public init() public init(nextInChain: UnsafeMutablePointer!, sampleType: WGPUTextureSampleType, viewDimension: WGPUTextureViewDimension, multisampled: WGPUBool) public var nextInChain: UnsafeMutablePointer! /** * If set to @ref WGPUTextureSampleType_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUTextureSampleType_Float. * * The `INIT` macro sets this to @ref WGPUTextureSampleType_Undefined. */ public var sampleType: WGPUTextureSampleType /** * If set to @ref WGPUTextureViewDimension_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUTextureViewDimension_2D. * * The `INIT` macro sets this to @ref WGPUTextureViewDimension_Undefined. */ public var viewDimension: WGPUTextureViewDimension /** * The `INIT` macro sets this to `WGPU_FALSE`. */ public var multisampled: WGPUBool } /** * Default values can be set using @ref WGPU_TEXTURE_VIEW_DESCRIPTOR_INIT as initializer. */ public struct WGPUTextureViewDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, format: WGPUTextureFormat, dimension: WGPUTextureViewDimension, baseMipLevel: UInt32, mipLevelCount: UInt32, baseArrayLayer: UInt32, arrayLayerCount: UInt32, aspect: WGPUTextureAspect, usage: WGPUTextureUsage) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * The `INIT` macro sets this to @ref WGPUTextureFormat_Undefined. */ public var format: WGPUTextureFormat /** * The `INIT` macro sets this to @ref WGPUTextureViewDimension_Undefined. */ public var dimension: WGPUTextureViewDimension /** * The `INIT` macro sets this to `0`. */ public var baseMipLevel: UInt32 /** * The `INIT` macro sets this to @ref WGPU_MIP_LEVEL_COUNT_UNDEFINED. */ public var mipLevelCount: UInt32 /** * The `INIT` macro sets this to `0`. */ public var baseArrayLayer: UInt32 /** * The `INIT` macro sets this to @ref WGPU_ARRAY_LAYER_COUNT_UNDEFINED. */ public var arrayLayerCount: UInt32 /** * If set to @ref WGPUTextureAspect_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUTextureAspect_All. * * The `INIT` macro sets this to @ref WGPUTextureAspect_Undefined. */ public var aspect: WGPUTextureAspect /** * The `INIT` macro sets this to @ref WGPUTextureUsage_None. */ public var usage: WGPUTextureUsage } /** * Default values can be set using @ref WGPU_VERTEX_ATTRIBUTE_INIT as initializer. */ public struct WGPUVertexAttribute { public init() public init(nextInChain: UnsafeMutablePointer!, format: WGPUVertexFormat, offset: UInt64, shaderLocation: UInt32) public var nextInChain: UnsafeMutablePointer! /** * The `INIT` macro sets this to (@ref WGPUVertexFormat)0. */ public var format: WGPUVertexFormat /** * The `INIT` macro sets this to `0`. */ public var offset: UInt64 /** * The `INIT` macro sets this to `0`. */ public var shaderLocation: UInt32 } /** * Default values can be set using @ref WGPU_BIND_GROUP_DESCRIPTOR_INIT as initializer. */ public struct WGPUBindGroupDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, layout: WGPUBindGroupLayout!, entryCount: Int, entries: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * The `INIT` macro sets this to `NULL`. */ public var layout: WGPUBindGroupLayout! /** * Array count for `entries`. The `INIT` macro sets this to 0. */ public var entryCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var entries: UnsafePointer! } /** * Default values can be set using @ref WGPU_BIND_GROUP_LAYOUT_ENTRY_INIT as initializer. */ public struct WGPUBindGroupLayoutEntry { public init() public init(nextInChain: UnsafeMutablePointer!, binding: UInt32, visibility: WGPUShaderStage, bindingArraySize: UInt32, buffer: WGPUBufferBindingLayout, sampler: WGPUSamplerBindingLayout, texture: WGPUTextureBindingLayout, storageTexture: WGPUStorageTextureBindingLayout) public var nextInChain: UnsafeMutablePointer! /** * The `INIT` macro sets this to `0`. */ public var binding: UInt32 /** * The `INIT` macro sets this to @ref WGPUShaderStage_None. */ public var visibility: WGPUShaderStage /** * If non-zero, this entry defines a binding array with this size. * * The `INIT` macro sets this to `0`. */ public var bindingArraySize: UInt32 /** * The `INIT` macro sets this to zero (which sets the entry to `BindingNotUsed`). */ public var buffer: WGPUBufferBindingLayout /** * The `INIT` macro sets this to zero (which sets the entry to `BindingNotUsed`). */ public var sampler: WGPUSamplerBindingLayout /** * The `INIT` macro sets this to zero (which sets the entry to `BindingNotUsed`). */ public var texture: WGPUTextureBindingLayout /** * The `INIT` macro sets this to zero (which sets the entry to `BindingNotUsed`). */ public var storageTexture: WGPUStorageTextureBindingLayout } /** * Default values can be set using @ref WGPU_BLEND_STATE_INIT as initializer. */ public struct WGPUBlendState { public init() public init(color: WGPUBlendComponent, alpha: WGPUBlendComponent) /** * The `INIT` macro sets this to @ref WGPU_BLEND_COMPONENT_INIT. */ public var color: WGPUBlendComponent /** * The `INIT` macro sets this to @ref WGPU_BLEND_COMPONENT_INIT. */ public var alpha: WGPUBlendComponent } /** * This is an @ref ImplementationAllocatedStructChain root. * Arbitrary chains must be handled gracefully by the application! * * Default values can be set using @ref WGPU_COMPILATION_INFO_INIT as initializer. */ public struct WGPUCompilationInfo { public init() public init(nextInChain: UnsafeMutablePointer!, messageCount: Int, messages: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * Array count for `messages`. The `INIT` macro sets this to 0. */ public var messageCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var messages: UnsafePointer! } /** * Default values can be set using @ref WGPU_COMPUTE_PASS_DESCRIPTOR_INIT as initializer. */ public struct WGPUComputePassDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, timestampWrites: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * The `INIT` macro sets this to `NULL`. */ public var timestampWrites: UnsafePointer! } /** * Default values can be set using @ref WGPU_COMPUTE_STATE_INIT as initializer. */ public struct WGPUComputeState { public init() public init(nextInChain: UnsafeMutablePointer!, module: WGPUShaderModule!, entryPoint: WGPUStringView, constantCount: Int, constants: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * The `INIT` macro sets this to `NULL`. */ public var module: WGPUShaderModule! /** * This is a \ref NullableInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var entryPoint: WGPUStringView /** * Array count for `constants`. The `INIT` macro sets this to 0. */ public var constantCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var constants: UnsafePointer! } /** * Default values can be set using @ref WGPU_DEPTH_STENCIL_STATE_INIT as initializer. */ public struct WGPUDepthStencilState { public init() public init(nextInChain: UnsafeMutablePointer!, format: WGPUTextureFormat, depthWriteEnabled: WGPUOptionalBool, depthCompare: WGPUCompareFunction, stencilFront: WGPUStencilFaceState, stencilBack: WGPUStencilFaceState, stencilReadMask: UInt32, stencilWriteMask: UInt32, depthBias: Int32, depthBiasSlopeScale: Float, depthBiasClamp: Float) public var nextInChain: UnsafeMutablePointer! /** * The `INIT` macro sets this to @ref WGPUTextureFormat_Undefined. */ public var format: WGPUTextureFormat /** * The `INIT` macro sets this to @ref WGPUOptionalBool_Undefined. */ public var depthWriteEnabled: WGPUOptionalBool /** * The `INIT` macro sets this to @ref WGPUCompareFunction_Undefined. */ public var depthCompare: WGPUCompareFunction /** * The `INIT` macro sets this to @ref WGPU_STENCIL_FACE_STATE_INIT. */ public var stencilFront: WGPUStencilFaceState /** * The `INIT` macro sets this to @ref WGPU_STENCIL_FACE_STATE_INIT. */ public var stencilBack: WGPUStencilFaceState /** * The `INIT` macro sets this to `0xFFFFFFFF`. */ public var stencilReadMask: UInt32 /** * The `INIT` macro sets this to `0xFFFFFFFF`. */ public var stencilWriteMask: UInt32 /** * The `INIT` macro sets this to `0`. */ public var depthBias: Int32 /** * TODO * * If non-finite, produces a @ref NonFiniteFloatValueError. * * The `INIT` macro sets this to `0.f`. */ public var depthBiasSlopeScale: Float /** * TODO * * If non-finite, produces a @ref NonFiniteFloatValueError. * * The `INIT` macro sets this to `0.f`. */ public var depthBiasClamp: Float } /** * Default values can be set using @ref WGPU_DEVICE_DESCRIPTOR_INIT as initializer. */ public struct WGPUDeviceDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, requiredFeatureCount: Int, requiredFeatures: UnsafePointer!, requiredLimits: UnsafePointer!, defaultQueue: WGPUQueueDescriptor, deviceLostCallbackInfo: WGPUDeviceLostCallbackInfo, uncapturedErrorCallbackInfo: WGPUUncapturedErrorCallbackInfo) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * Array count for `requiredFeatures`. The `INIT` macro sets this to 0. */ public var requiredFeatureCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var requiredFeatures: UnsafePointer! /** * The `INIT` macro sets this to `NULL`. */ public var requiredLimits: UnsafePointer! /** * The `INIT` macro sets this to @ref WGPU_QUEUE_DESCRIPTOR_INIT. */ public var defaultQueue: WGPUQueueDescriptor /** * The `INIT` macro sets this to @ref WGPU_DEVICE_LOST_CALLBACK_INFO_INIT. */ public var deviceLostCallbackInfo: WGPUDeviceLostCallbackInfo /** * Called when there is an uncaptured error on this device, from any thread. * See @ref ErrorScopes. * * **Important:** This callback does not have a configurable @ref WGPUCallbackMode; it may be called at any time (like @ref WGPUCallbackMode_AllowSpontaneous). As such, calls into the `webgpu.h` API from this callback are unsafe. See @ref CallbackReentrancy. * * The `INIT` macro sets this to @ref WGPU_UNCAPTURED_ERROR_CALLBACK_INFO_INIT. */ public var uncapturedErrorCallbackInfo: WGPUUncapturedErrorCallbackInfo } /** * Struct holding a future to wait on, and a `completed` boolean flag. * * Default values can be set using @ref WGPU_FUTURE_WAIT_INFO_INIT as initializer. */ public struct WGPUFutureWaitInfo { public init() public init(future: WGPUFuture, completed: WGPUBool) /** * The future to wait on. * * The `INIT` macro sets this to @ref WGPU_FUTURE_INIT. */ public var future: WGPUFuture /** * Whether or not the future completed. * * The `INIT` macro sets this to `WGPU_FALSE`. */ public var completed: WGPUBool } /** * Default values can be set using @ref WGPU_INSTANCE_DESCRIPTOR_INIT as initializer. */ public struct WGPUInstanceDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, requiredFeatureCount: Int, requiredFeatures: UnsafePointer!, requiredLimits: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * Array count for `requiredFeatures`. The `INIT` macro sets this to 0. */ public var requiredFeatureCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var requiredFeatures: UnsafePointer! /** * The `INIT` macro sets this to `NULL`. */ public var requiredLimits: UnsafePointer! } /** * Default values can be set using @ref WGPU_RENDER_PASS_COLOR_ATTACHMENT_INIT as initializer. */ public struct WGPURenderPassColorAttachment { public init() public init(nextInChain: UnsafeMutablePointer!, view: WGPUTextureView!, depthSlice: UInt32, resolveTarget: WGPUTextureView!, loadOp: WGPULoadOp, storeOp: WGPUStoreOp, clearValue: WGPUColor) public var nextInChain: UnsafeMutablePointer! /** * If `NULL`, indicates a hole in the parent * @ref WGPURenderPassDescriptor::colorAttachments array. * * The `INIT` macro sets this to `NULL`. */ public var view: WGPUTextureView! /** * The `INIT` macro sets this to @ref WGPU_DEPTH_SLICE_UNDEFINED. */ public var depthSlice: UInt32 /** * The `INIT` macro sets this to `NULL`. */ public var resolveTarget: WGPUTextureView! /** * The `INIT` macro sets this to @ref WGPULoadOp_Undefined. */ public var loadOp: WGPULoadOp /** * The `INIT` macro sets this to @ref WGPUStoreOp_Undefined. */ public var storeOp: WGPUStoreOp /** * The `INIT` macro sets this to @ref WGPU_COLOR_INIT. */ public var clearValue: WGPUColor } /** * Default values can be set using @ref WGPU_REQUEST_ADAPTER_OPTIONS_INIT as initializer. */ public struct WGPURequestAdapterOptions { public init() public init(nextInChain: UnsafeMutablePointer!, featureLevel: WGPUFeatureLevel, powerPreference: WGPUPowerPreference, forceFallbackAdapter: WGPUBool, backendType: WGPUBackendType, compatibleSurface: WGPUSurface!) public var nextInChain: UnsafeMutablePointer! /** * "Feature level" for the adapter request. If an adapter is returned, it must support the features and limits in the requested feature level. * * If set to @ref WGPUFeatureLevel_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUFeatureLevel_Core. * Additionally, implementations may ignore @ref WGPUFeatureLevel_Compatibility * and provide @ref WGPUFeatureLevel_Core instead. * * The `INIT` macro sets this to @ref WGPUFeatureLevel_Undefined. */ public var featureLevel: WGPUFeatureLevel /** * The `INIT` macro sets this to @ref WGPUPowerPreference_Undefined. */ public var powerPreference: WGPUPowerPreference /** * If true, requires the adapter to be a "fallback" adapter as defined by the JS spec. * If this is not possible, the request returns null. * * The `INIT` macro sets this to `WGPU_FALSE`. */ public var forceFallbackAdapter: WGPUBool /** * If set, requires the adapter to have a particular backend type. * If this is not possible, the request returns null. * * The `INIT` macro sets this to @ref WGPUBackendType_Undefined. */ public var backendType: WGPUBackendType /** * If set, requires the adapter to be able to output to a particular surface. * If this is not possible, the request returns null. * * The `INIT` macro sets this to `NULL`. */ public var compatibleSurface: WGPUSurface! } /** * Default values can be set using @ref WGPU_SHADER_MODULE_DESCRIPTOR_INIT as initializer. */ public struct WGPUShaderModuleDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView } /** * The root descriptor for the creation of an @ref WGPUSurface with @ref wgpuInstanceCreateSurface. * It isn't sufficient by itself and must have one of the `WGPUSurfaceSource*` in its chain. * See @ref Surface-Creation for more details. * * Default values can be set using @ref WGPU_SURFACE_DESCRIPTOR_INIT as initializer. */ public struct WGPUSurfaceDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView) public var nextInChain: UnsafeMutablePointer! /** * Label used to refer to the object. * * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView } /** * Default values can be set using @ref WGPU_TEXEL_COPY_BUFFER_INFO_INIT as initializer. */ public struct WGPUTexelCopyBufferInfo { public init() public init(layout: WGPUTexelCopyBufferLayout, buffer: WGPUBuffer!) /** * The `INIT` macro sets this to @ref WGPU_TEXEL_COPY_BUFFER_LAYOUT_INIT. */ public var layout: WGPUTexelCopyBufferLayout /** * The `INIT` macro sets this to `NULL`. */ public var buffer: WGPUBuffer! } /** * Default values can be set using @ref WGPU_TEXEL_COPY_TEXTURE_INFO_INIT as initializer. */ public struct WGPUTexelCopyTextureInfo { public init() public init(texture: WGPUTexture!, mipLevel: UInt32, origin: WGPUOrigin3D, aspect: WGPUTextureAspect) /** * The `INIT` macro sets this to `NULL`. */ public var texture: WGPUTexture! /** * The `INIT` macro sets this to `0`. */ public var mipLevel: UInt32 /** * The `INIT` macro sets this to @ref WGPU_ORIGIN_3D_INIT. */ public var origin: WGPUOrigin3D /** * If set to @ref WGPUTextureAspect_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUTextureAspect_All. * * The `INIT` macro sets this to @ref WGPUTextureAspect_Undefined. */ public var aspect: WGPUTextureAspect } /** * Default values can be set using @ref WGPU_TEXTURE_DESCRIPTOR_INIT as initializer. */ public struct WGPUTextureDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, usage: WGPUTextureUsage, dimension: WGPUTextureDimension, size: WGPUExtent3D, format: WGPUTextureFormat, mipLevelCount: UInt32, sampleCount: UInt32, viewFormatCount: Int, viewFormats: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * The `INIT` macro sets this to @ref WGPUTextureUsage_None. */ public var usage: WGPUTextureUsage /** * If set to @ref WGPUTextureDimension_Undefined, * [defaults](@ref SentinelValues) to @ref WGPUTextureDimension_2D. * * The `INIT` macro sets this to @ref WGPUTextureDimension_Undefined. */ public var dimension: WGPUTextureDimension /** * The `INIT` macro sets this to @ref WGPU_EXTENT_3D_INIT. */ public var size: WGPUExtent3D /** * The `INIT` macro sets this to @ref WGPUTextureFormat_Undefined. */ public var format: WGPUTextureFormat /** * The `INIT` macro sets this to `1`. */ public var mipLevelCount: UInt32 /** * The `INIT` macro sets this to `1`. */ public var sampleCount: UInt32 /** * Array count for `viewFormats`. The `INIT` macro sets this to 0. */ public var viewFormatCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var viewFormats: UnsafePointer! } /** * If `attributes` is empty *and* `stepMode` is @ref WGPUVertexStepMode_Undefined, * indicates a "hole" in the parent @ref WGPUVertexState `buffers` array, * with behavior equivalent to `null` in the JS API. * * If `attributes` is empty but `stepMode` is *not* @ref WGPUVertexStepMode_Undefined, * indicates a vertex buffer with no attributes, with behavior equivalent to * `{ attributes: [] }` in the JS API. (TODO: If the JS API changes not to * distinguish these cases, then this distinction doesn't matter and we can * remove this documentation.) * * If `stepMode` is @ref WGPUVertexStepMode_Undefined but `attributes` is *not* empty, * `stepMode` [defaults](@ref SentinelValues) to @ref WGPUVertexStepMode_Vertex. * * Default values can be set using @ref WGPU_VERTEX_BUFFER_LAYOUT_INIT as initializer. */ public struct WGPUVertexBufferLayout { public init() public init(nextInChain: UnsafeMutablePointer!, stepMode: WGPUVertexStepMode, arrayStride: UInt64, attributeCount: Int, attributes: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * The `INIT` macro sets this to @ref WGPUVertexStepMode_Undefined. */ public var stepMode: WGPUVertexStepMode /** * The `INIT` macro sets this to `0`. */ public var arrayStride: UInt64 /** * Array count for `attributes`. The `INIT` macro sets this to 0. */ public var attributeCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var attributes: UnsafePointer! } /** * Default values can be set using @ref WGPU_BIND_GROUP_LAYOUT_DESCRIPTOR_INIT as initializer. */ public struct WGPUBindGroupLayoutDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, entryCount: Int, entries: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * Array count for `entries`. The `INIT` macro sets this to 0. */ public var entryCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var entries: UnsafePointer! } /** * Default values can be set using @ref WGPU_COLOR_TARGET_STATE_INIT as initializer. */ public struct WGPUColorTargetState { public init() public init(nextInChain: UnsafeMutablePointer!, format: WGPUTextureFormat, blend: UnsafePointer!, writeMask: WGPUColorWriteMask) public var nextInChain: UnsafeMutablePointer! /** * The texture format of the target. If @ref WGPUTextureFormat_Undefined, * indicates a "hole" in the parent @ref WGPUFragmentState `targets` array: * the pipeline does not output a value at this `location`. * * The `INIT` macro sets this to @ref WGPUTextureFormat_Undefined. */ public var format: WGPUTextureFormat /** * The `INIT` macro sets this to `NULL`. */ public var blend: UnsafePointer! /** * The `INIT` macro sets this to @ref WGPUColorWriteMask_All. */ public var writeMask: WGPUColorWriteMask } /** * Default values can be set using @ref WGPU_COMPUTE_PIPELINE_DESCRIPTOR_INIT as initializer. */ public struct WGPUComputePipelineDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, layout: WGPUPipelineLayout!, compute: WGPUComputeState) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * The `INIT` macro sets this to `NULL`. */ public var layout: WGPUPipelineLayout! /** * The `INIT` macro sets this to @ref WGPU_COMPUTE_STATE_INIT. */ public var compute: WGPUComputeState } /** * Default values can be set using @ref WGPU_RENDER_PASS_DESCRIPTOR_INIT as initializer. */ public struct WGPURenderPassDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, colorAttachmentCount: Int, colorAttachments: UnsafePointer!, depthStencilAttachment: UnsafePointer!, occlusionQuerySet: WGPUQuerySet!, timestampWrites: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * Array count for `colorAttachments`. The `INIT` macro sets this to 0. */ public var colorAttachmentCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var colorAttachments: UnsafePointer! /** * The `INIT` macro sets this to `NULL`. */ public var depthStencilAttachment: UnsafePointer! /** * The `INIT` macro sets this to `NULL`. */ public var occlusionQuerySet: WGPUQuerySet! /** * The `INIT` macro sets this to `NULL`. */ public var timestampWrites: UnsafePointer! } /** * Default values can be set using @ref WGPU_VERTEX_STATE_INIT as initializer. */ public struct WGPUVertexState { public init() public init(nextInChain: UnsafeMutablePointer!, module: WGPUShaderModule!, entryPoint: WGPUStringView, constantCount: Int, constants: UnsafePointer!, bufferCount: Int, buffers: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * The `INIT` macro sets this to `NULL`. */ public var module: WGPUShaderModule! /** * This is a \ref NullableInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var entryPoint: WGPUStringView /** * Array count for `constants`. The `INIT` macro sets this to 0. */ public var constantCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var constants: UnsafePointer! /** * Array count for `buffers`. The `INIT` macro sets this to 0. */ public var bufferCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var buffers: UnsafePointer! } /** * Default values can be set using @ref WGPU_FRAGMENT_STATE_INIT as initializer. */ public struct WGPUFragmentState { public init() public init(nextInChain: UnsafeMutablePointer!, module: WGPUShaderModule!, entryPoint: WGPUStringView, constantCount: Int, constants: UnsafePointer!, targetCount: Int, targets: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * The `INIT` macro sets this to `NULL`. */ public var module: WGPUShaderModule! /** * This is a \ref NullableInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var entryPoint: WGPUStringView /** * Array count for `constants`. The `INIT` macro sets this to 0. */ public var constantCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var constants: UnsafePointer! /** * Array count for `targets`. The `INIT` macro sets this to 0. */ public var targetCount: Int /** * The `INIT` macro sets this to `NULL`. */ public var targets: UnsafePointer! } /** * Default values can be set using @ref WGPU_RENDER_PIPELINE_DESCRIPTOR_INIT as initializer. */ public struct WGPURenderPipelineDescriptor { public init() public init(nextInChain: UnsafeMutablePointer!, label: WGPUStringView, layout: WGPUPipelineLayout!, vertex: WGPUVertexState, primitive: WGPUPrimitiveState, depthStencil: UnsafePointer!, multisample: WGPUMultisampleState, fragment: UnsafePointer!) public var nextInChain: UnsafeMutablePointer! /** * This is a \ref NonNullInputString. * * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. */ public var label: WGPUStringView /** * The `INIT` macro sets this to `NULL`. */ public var layout: WGPUPipelineLayout! /** * The `INIT` macro sets this to @ref WGPU_VERTEX_STATE_INIT. */ public var vertex: WGPUVertexState /** * The `INIT` macro sets this to @ref WGPU_PRIMITIVE_STATE_INIT. */ public var primitive: WGPUPrimitiveState /** * The `INIT` macro sets this to `NULL`. */ public var depthStencil: UnsafePointer! /** * The `INIT` macro sets this to @ref WGPU_MULTISAMPLE_STATE_INIT. */ public var multisample: WGPUMultisampleState /** * The `INIT` macro sets this to `NULL`. */ public var fragment: UnsafePointer! } /** * Proc pointer type for @ref wgpuCreateInstance: * > @copydoc wgpuCreateInstance */ public typealias WGPUProcCreateInstance = @convention(c) (UnsafePointer?) -> WGPUInstance? /** * Proc pointer type for @ref wgpuGetInstanceFeatures: * > @copydoc wgpuGetInstanceFeatures */ public typealias WGPUProcGetInstanceFeatures = @convention(c) (UnsafeMutablePointer?) -> Void /** * Proc pointer type for @ref wgpuGetInstanceLimits: * > @copydoc wgpuGetInstanceLimits */ public typealias WGPUProcGetInstanceLimits = @convention(c) (UnsafeMutablePointer?) -> WGPUStatus /** * Proc pointer type for @ref wgpuHasInstanceFeature: * > @copydoc wgpuHasInstanceFeature */ public typealias WGPUProcHasInstanceFeature = @convention(c) (WGPUInstanceFeatureName) -> WGPUBool /** * Proc pointer type for @ref wgpuGetProcAddress: * > @copydoc wgpuGetProcAddress */ public typealias WGPUProcGetProcAddress = @convention(c) (WGPUStringView) -> WGPUProc? /** * Proc pointer type for @ref wgpuAdapterGetFeatures: * > @copydoc wgpuAdapterGetFeatures */ public typealias WGPUProcAdapterGetFeatures = @convention(c) (WGPUAdapter?, UnsafeMutablePointer?) -> Void /** * Proc pointer type for @ref wgpuAdapterGetInfo: * > @copydoc wgpuAdapterGetInfo */ public typealias WGPUProcAdapterGetInfo = @convention(c) (WGPUAdapter?, UnsafeMutablePointer?) -> WGPUStatus /** * Proc pointer type for @ref wgpuAdapterGetLimits: * > @copydoc wgpuAdapterGetLimits */ public typealias WGPUProcAdapterGetLimits = @convention(c) (WGPUAdapter?, UnsafeMutablePointer?) -> WGPUStatus /** * Proc pointer type for @ref wgpuAdapterHasFeature: * > @copydoc wgpuAdapterHasFeature */ public typealias WGPUProcAdapterHasFeature = @convention(c) (WGPUAdapter?, WGPUFeatureName) -> WGPUBool /** * Proc pointer type for @ref wgpuAdapterRequestDevice: * > @copydoc wgpuAdapterRequestDevice */ public typealias WGPUProcAdapterRequestDevice = @convention(c) (WGPUAdapter?, UnsafePointer?, WGPURequestDeviceCallbackInfo) -> WGPUFuture /** * Proc pointer type for @ref wgpuAdapterAddRef: * > @copydoc wgpuAdapterAddRef */ public typealias WGPUProcAdapterAddRef = @convention(c) (WGPUAdapter?) -> Void /** * Proc pointer type for @ref wgpuAdapterRelease: * > @copydoc wgpuAdapterRelease */ public typealias WGPUProcAdapterRelease = @convention(c) (WGPUAdapter?) -> Void /** * Proc pointer type for @ref wgpuAdapterInfoFreeMembers: * > @copydoc wgpuAdapterInfoFreeMembers */ public typealias WGPUProcAdapterInfoFreeMembers = @convention(c) (WGPUAdapterInfo) -> Void /** * Proc pointer type for @ref wgpuBindGroupSetLabel: * > @copydoc wgpuBindGroupSetLabel */ public typealias WGPUProcBindGroupSetLabel = @convention(c) (WGPUBindGroup?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuBindGroupAddRef: * > @copydoc wgpuBindGroupAddRef */ public typealias WGPUProcBindGroupAddRef = @convention(c) (WGPUBindGroup?) -> Void /** * Proc pointer type for @ref wgpuBindGroupRelease: * > @copydoc wgpuBindGroupRelease */ public typealias WGPUProcBindGroupRelease = @convention(c) (WGPUBindGroup?) -> Void /** * Proc pointer type for @ref wgpuBindGroupLayoutSetLabel: * > @copydoc wgpuBindGroupLayoutSetLabel */ public typealias WGPUProcBindGroupLayoutSetLabel = @convention(c) (WGPUBindGroupLayout?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuBindGroupLayoutAddRef: * > @copydoc wgpuBindGroupLayoutAddRef */ public typealias WGPUProcBindGroupLayoutAddRef = @convention(c) (WGPUBindGroupLayout?) -> Void /** * Proc pointer type for @ref wgpuBindGroupLayoutRelease: * > @copydoc wgpuBindGroupLayoutRelease */ public typealias WGPUProcBindGroupLayoutRelease = @convention(c) (WGPUBindGroupLayout?) -> Void /** * Proc pointer type for @ref wgpuBufferDestroy: * > @copydoc wgpuBufferDestroy */ public typealias WGPUProcBufferDestroy = @convention(c) (WGPUBuffer?) -> Void /** * Proc pointer type for @ref wgpuBufferGetConstMappedRange: * > @copydoc wgpuBufferGetConstMappedRange */ public typealias WGPUProcBufferGetConstMappedRange = @convention(c, cType: "const void *(*)(WGPUBuffer, size_t, size_t)") (WGPUBuffer?, Int, Int) -> UnsafeRawPointer? /** * Proc pointer type for @ref wgpuBufferGetMappedRange: * > @copydoc wgpuBufferGetMappedRange */ public typealias WGPUProcBufferGetMappedRange = @convention(c, cType: "void *(*)(WGPUBuffer, size_t, size_t)") (WGPUBuffer?, Int, Int) -> UnsafeMutableRawPointer? /** * Proc pointer type for @ref wgpuBufferGetMapState: * > @copydoc wgpuBufferGetMapState */ public typealias WGPUProcBufferGetMapState = @convention(c) (WGPUBuffer?) -> WGPUBufferMapState /** * Proc pointer type for @ref wgpuBufferGetSize: * > @copydoc wgpuBufferGetSize */ public typealias WGPUProcBufferGetSize = @convention(c) (WGPUBuffer?) -> UInt64 /** * Proc pointer type for @ref wgpuBufferGetUsage: * > @copydoc wgpuBufferGetUsage */ public typealias WGPUProcBufferGetUsage = @convention(c) (WGPUBuffer?) -> WGPUBufferUsage /** * Proc pointer type for @ref wgpuBufferMapAsync: * > @copydoc wgpuBufferMapAsync */ public typealias WGPUProcBufferMapAsync = @convention(c, cType: "WGPUFuture (*)(WGPUBuffer, WGPUMapMode, size_t, size_t, WGPUBufferMapCallbackInfo)") (WGPUBuffer?, WGPUMapMode, Int, Int, WGPUBufferMapCallbackInfo) -> WGPUFuture /** * Proc pointer type for @ref wgpuBufferReadMappedRange: * > @copydoc wgpuBufferReadMappedRange */ public typealias WGPUProcBufferReadMappedRange = @convention(c, cType: "WGPUStatus (*)(WGPUBuffer, size_t, void *, size_t)") (WGPUBuffer?, Int, UnsafeMutableRawPointer?, Int) -> WGPUStatus /** * Proc pointer type for @ref wgpuBufferSetLabel: * > @copydoc wgpuBufferSetLabel */ public typealias WGPUProcBufferSetLabel = @convention(c) (WGPUBuffer?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuBufferUnmap: * > @copydoc wgpuBufferUnmap */ public typealias WGPUProcBufferUnmap = @convention(c) (WGPUBuffer?) -> Void /** * Proc pointer type for @ref wgpuBufferWriteMappedRange: * > @copydoc wgpuBufferWriteMappedRange */ public typealias WGPUProcBufferWriteMappedRange = @convention(c, cType: "WGPUStatus (*)(WGPUBuffer, size_t, const void *, size_t)") (WGPUBuffer?, Int, UnsafeRawPointer?, Int) -> WGPUStatus /** * Proc pointer type for @ref wgpuBufferAddRef: * > @copydoc wgpuBufferAddRef */ public typealias WGPUProcBufferAddRef = @convention(c) (WGPUBuffer?) -> Void /** * Proc pointer type for @ref wgpuBufferRelease: * > @copydoc wgpuBufferRelease */ public typealias WGPUProcBufferRelease = @convention(c) (WGPUBuffer?) -> Void /** * Proc pointer type for @ref wgpuCommandBufferSetLabel: * > @copydoc wgpuCommandBufferSetLabel */ public typealias WGPUProcCommandBufferSetLabel = @convention(c) (WGPUCommandBuffer?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuCommandBufferAddRef: * > @copydoc wgpuCommandBufferAddRef */ public typealias WGPUProcCommandBufferAddRef = @convention(c) (WGPUCommandBuffer?) -> Void /** * Proc pointer type for @ref wgpuCommandBufferRelease: * > @copydoc wgpuCommandBufferRelease */ public typealias WGPUProcCommandBufferRelease = @convention(c) (WGPUCommandBuffer?) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderBeginComputePass: * > @copydoc wgpuCommandEncoderBeginComputePass */ public typealias WGPUProcCommandEncoderBeginComputePass = @convention(c) (WGPUCommandEncoder?, UnsafePointer?) -> WGPUComputePassEncoder? /** * Proc pointer type for @ref wgpuCommandEncoderBeginRenderPass: * > @copydoc wgpuCommandEncoderBeginRenderPass */ public typealias WGPUProcCommandEncoderBeginRenderPass = @convention(c) (WGPUCommandEncoder?, UnsafePointer?) -> WGPURenderPassEncoder? /** * Proc pointer type for @ref wgpuCommandEncoderClearBuffer: * > @copydoc wgpuCommandEncoderClearBuffer */ public typealias WGPUProcCommandEncoderClearBuffer = @convention(c) (WGPUCommandEncoder?, WGPUBuffer?, UInt64, UInt64) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderCopyBufferToBuffer: * > @copydoc wgpuCommandEncoderCopyBufferToBuffer */ public typealias WGPUProcCommandEncoderCopyBufferToBuffer = @convention(c) (WGPUCommandEncoder?, WGPUBuffer?, UInt64, WGPUBuffer?, UInt64, UInt64) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderCopyBufferToTexture: * > @copydoc wgpuCommandEncoderCopyBufferToTexture */ public typealias WGPUProcCommandEncoderCopyBufferToTexture = @convention(c) (WGPUCommandEncoder?, UnsafePointer?, UnsafePointer?, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderCopyTextureToBuffer: * > @copydoc wgpuCommandEncoderCopyTextureToBuffer */ public typealias WGPUProcCommandEncoderCopyTextureToBuffer = @convention(c) (WGPUCommandEncoder?, UnsafePointer?, UnsafePointer?, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderCopyTextureToTexture: * > @copydoc wgpuCommandEncoderCopyTextureToTexture */ public typealias WGPUProcCommandEncoderCopyTextureToTexture = @convention(c) (WGPUCommandEncoder?, UnsafePointer?, UnsafePointer?, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderFinish: * > @copydoc wgpuCommandEncoderFinish */ public typealias WGPUProcCommandEncoderFinish = @convention(c) (WGPUCommandEncoder?, UnsafePointer?) -> WGPUCommandBuffer? /** * Proc pointer type for @ref wgpuCommandEncoderInsertDebugMarker: * > @copydoc wgpuCommandEncoderInsertDebugMarker */ public typealias WGPUProcCommandEncoderInsertDebugMarker = @convention(c) (WGPUCommandEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderPopDebugGroup: * > @copydoc wgpuCommandEncoderPopDebugGroup */ public typealias WGPUProcCommandEncoderPopDebugGroup = @convention(c) (WGPUCommandEncoder?) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderPushDebugGroup: * > @copydoc wgpuCommandEncoderPushDebugGroup */ public typealias WGPUProcCommandEncoderPushDebugGroup = @convention(c) (WGPUCommandEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderResolveQuerySet: * > @copydoc wgpuCommandEncoderResolveQuerySet */ public typealias WGPUProcCommandEncoderResolveQuerySet = @convention(c) (WGPUCommandEncoder?, WGPUQuerySet?, UInt32, UInt32, WGPUBuffer?, UInt64) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderSetLabel: * > @copydoc wgpuCommandEncoderSetLabel */ public typealias WGPUProcCommandEncoderSetLabel = @convention(c) (WGPUCommandEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderWriteTimestamp: * > @copydoc wgpuCommandEncoderWriteTimestamp */ public typealias WGPUProcCommandEncoderWriteTimestamp = @convention(c) (WGPUCommandEncoder?, WGPUQuerySet?, UInt32) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderAddRef: * > @copydoc wgpuCommandEncoderAddRef */ public typealias WGPUProcCommandEncoderAddRef = @convention(c) (WGPUCommandEncoder?) -> Void /** * Proc pointer type for @ref wgpuCommandEncoderRelease: * > @copydoc wgpuCommandEncoderRelease */ public typealias WGPUProcCommandEncoderRelease = @convention(c) (WGPUCommandEncoder?) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderDispatchWorkgroups: * > @copydoc wgpuComputePassEncoderDispatchWorkgroups */ public typealias WGPUProcComputePassEncoderDispatchWorkgroups = @convention(c) (WGPUComputePassEncoder?, UInt32, UInt32, UInt32) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderDispatchWorkgroupsIndirect: * > @copydoc wgpuComputePassEncoderDispatchWorkgroupsIndirect */ public typealias WGPUProcComputePassEncoderDispatchWorkgroupsIndirect = @convention(c) (WGPUComputePassEncoder?, WGPUBuffer?, UInt64) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderEnd: * > @copydoc wgpuComputePassEncoderEnd */ public typealias WGPUProcComputePassEncoderEnd = @convention(c) (WGPUComputePassEncoder?) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderInsertDebugMarker: * > @copydoc wgpuComputePassEncoderInsertDebugMarker */ public typealias WGPUProcComputePassEncoderInsertDebugMarker = @convention(c) (WGPUComputePassEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderPopDebugGroup: * > @copydoc wgpuComputePassEncoderPopDebugGroup */ public typealias WGPUProcComputePassEncoderPopDebugGroup = @convention(c) (WGPUComputePassEncoder?) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderPushDebugGroup: * > @copydoc wgpuComputePassEncoderPushDebugGroup */ public typealias WGPUProcComputePassEncoderPushDebugGroup = @convention(c) (WGPUComputePassEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderSetBindGroup: * > @copydoc wgpuComputePassEncoderSetBindGroup */ public typealias WGPUProcComputePassEncoderSetBindGroup = @convention(c, cType: "void (*)(WGPUComputePassEncoder, uint32_t, WGPUBindGroup, size_t, const uint32_t *)") (WGPUComputePassEncoder?, UInt32, WGPUBindGroup?, Int, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderSetLabel: * > @copydoc wgpuComputePassEncoderSetLabel */ public typealias WGPUProcComputePassEncoderSetLabel = @convention(c) (WGPUComputePassEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderSetPipeline: * > @copydoc wgpuComputePassEncoderSetPipeline */ public typealias WGPUProcComputePassEncoderSetPipeline = @convention(c) (WGPUComputePassEncoder?, WGPUComputePipeline?) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderAddRef: * > @copydoc wgpuComputePassEncoderAddRef */ public typealias WGPUProcComputePassEncoderAddRef = @convention(c) (WGPUComputePassEncoder?) -> Void /** * Proc pointer type for @ref wgpuComputePassEncoderRelease: * > @copydoc wgpuComputePassEncoderRelease */ public typealias WGPUProcComputePassEncoderRelease = @convention(c) (WGPUComputePassEncoder?) -> Void /** * Proc pointer type for @ref wgpuComputePipelineGetBindGroupLayout: * > @copydoc wgpuComputePipelineGetBindGroupLayout */ public typealias WGPUProcComputePipelineGetBindGroupLayout = @convention(c) (WGPUComputePipeline?, UInt32) -> WGPUBindGroupLayout? /** * Proc pointer type for @ref wgpuComputePipelineSetLabel: * > @copydoc wgpuComputePipelineSetLabel */ public typealias WGPUProcComputePipelineSetLabel = @convention(c) (WGPUComputePipeline?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuComputePipelineAddRef: * > @copydoc wgpuComputePipelineAddRef */ public typealias WGPUProcComputePipelineAddRef = @convention(c) (WGPUComputePipeline?) -> Void /** * Proc pointer type for @ref wgpuComputePipelineRelease: * > @copydoc wgpuComputePipelineRelease */ public typealias WGPUProcComputePipelineRelease = @convention(c) (WGPUComputePipeline?) -> Void /** * Proc pointer type for @ref wgpuDeviceCreateBindGroup: * > @copydoc wgpuDeviceCreateBindGroup */ public typealias WGPUProcDeviceCreateBindGroup = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPUBindGroup? /** * Proc pointer type for @ref wgpuDeviceCreateBindGroupLayout: * > @copydoc wgpuDeviceCreateBindGroupLayout */ public typealias WGPUProcDeviceCreateBindGroupLayout = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPUBindGroupLayout? /** * Proc pointer type for @ref wgpuDeviceCreateBuffer: * > @copydoc wgpuDeviceCreateBuffer */ public typealias WGPUProcDeviceCreateBuffer = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPUBuffer? /** * Proc pointer type for @ref wgpuDeviceCreateCommandEncoder: * > @copydoc wgpuDeviceCreateCommandEncoder */ public typealias WGPUProcDeviceCreateCommandEncoder = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPUCommandEncoder? /** * Proc pointer type for @ref wgpuDeviceCreateComputePipeline: * > @copydoc wgpuDeviceCreateComputePipeline */ public typealias WGPUProcDeviceCreateComputePipeline = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPUComputePipeline? /** * Proc pointer type for @ref wgpuDeviceCreateComputePipelineAsync: * > @copydoc wgpuDeviceCreateComputePipelineAsync */ public typealias WGPUProcDeviceCreateComputePipelineAsync = @convention(c) (WGPUDevice?, UnsafePointer?, WGPUCreateComputePipelineAsyncCallbackInfo) -> WGPUFuture /** * Proc pointer type for @ref wgpuDeviceCreatePipelineLayout: * > @copydoc wgpuDeviceCreatePipelineLayout */ public typealias WGPUProcDeviceCreatePipelineLayout = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPUPipelineLayout? /** * Proc pointer type for @ref wgpuDeviceCreateQuerySet: * > @copydoc wgpuDeviceCreateQuerySet */ public typealias WGPUProcDeviceCreateQuerySet = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPUQuerySet? /** * Proc pointer type for @ref wgpuDeviceCreateRenderBundleEncoder: * > @copydoc wgpuDeviceCreateRenderBundleEncoder */ public typealias WGPUProcDeviceCreateRenderBundleEncoder = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPURenderBundleEncoder? /** * Proc pointer type for @ref wgpuDeviceCreateRenderPipeline: * > @copydoc wgpuDeviceCreateRenderPipeline */ public typealias WGPUProcDeviceCreateRenderPipeline = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPURenderPipeline? /** * Proc pointer type for @ref wgpuDeviceCreateRenderPipelineAsync: * > @copydoc wgpuDeviceCreateRenderPipelineAsync */ public typealias WGPUProcDeviceCreateRenderPipelineAsync = @convention(c) (WGPUDevice?, UnsafePointer?, WGPUCreateRenderPipelineAsyncCallbackInfo) -> WGPUFuture /** * Proc pointer type for @ref wgpuDeviceCreateSampler: * > @copydoc wgpuDeviceCreateSampler */ public typealias WGPUProcDeviceCreateSampler = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPUSampler? /** * Proc pointer type for @ref wgpuDeviceCreateShaderModule: * > @copydoc wgpuDeviceCreateShaderModule */ public typealias WGPUProcDeviceCreateShaderModule = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPUShaderModule? /** * Proc pointer type for @ref wgpuDeviceCreateTexture: * > @copydoc wgpuDeviceCreateTexture */ public typealias WGPUProcDeviceCreateTexture = @convention(c) (WGPUDevice?, UnsafePointer?) -> WGPUTexture? /** * Proc pointer type for @ref wgpuDeviceDestroy: * > @copydoc wgpuDeviceDestroy */ public typealias WGPUProcDeviceDestroy = @convention(c) (WGPUDevice?) -> Void /** * Proc pointer type for @ref wgpuDeviceGetAdapterInfo: * > @copydoc wgpuDeviceGetAdapterInfo */ public typealias WGPUProcDeviceGetAdapterInfo = @convention(c) (WGPUDevice?, UnsafeMutablePointer?) -> WGPUStatus /** * Proc pointer type for @ref wgpuDeviceGetFeatures: * > @copydoc wgpuDeviceGetFeatures */ public typealias WGPUProcDeviceGetFeatures = @convention(c) (WGPUDevice?, UnsafeMutablePointer?) -> Void /** * Proc pointer type for @ref wgpuDeviceGetLimits: * > @copydoc wgpuDeviceGetLimits */ public typealias WGPUProcDeviceGetLimits = @convention(c) (WGPUDevice?, UnsafeMutablePointer?) -> WGPUStatus /** * Proc pointer type for @ref wgpuDeviceGetLostFuture: * > @copydoc wgpuDeviceGetLostFuture */ public typealias WGPUProcDeviceGetLostFuture = @convention(c) (WGPUDevice?) -> WGPUFuture /** * Proc pointer type for @ref wgpuDeviceGetQueue: * > @copydoc wgpuDeviceGetQueue */ public typealias WGPUProcDeviceGetQueue = @convention(c) (WGPUDevice?) -> WGPUQueue? /** * Proc pointer type for @ref wgpuDeviceHasFeature: * > @copydoc wgpuDeviceHasFeature */ public typealias WGPUProcDeviceHasFeature = @convention(c) (WGPUDevice?, WGPUFeatureName) -> WGPUBool /** * Proc pointer type for @ref wgpuDevicePopErrorScope: * > @copydoc wgpuDevicePopErrorScope */ public typealias WGPUProcDevicePopErrorScope = @convention(c) (WGPUDevice?, WGPUPopErrorScopeCallbackInfo) -> WGPUFuture /** * Proc pointer type for @ref wgpuDevicePushErrorScope: * > @copydoc wgpuDevicePushErrorScope */ public typealias WGPUProcDevicePushErrorScope = @convention(c) (WGPUDevice?, WGPUErrorFilter) -> Void /** * Proc pointer type for @ref wgpuDeviceSetLabel: * > @copydoc wgpuDeviceSetLabel */ public typealias WGPUProcDeviceSetLabel = @convention(c) (WGPUDevice?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuDeviceAddRef: * > @copydoc wgpuDeviceAddRef */ public typealias WGPUProcDeviceAddRef = @convention(c) (WGPUDevice?) -> Void /** * Proc pointer type for @ref wgpuDeviceRelease: * > @copydoc wgpuDeviceRelease */ public typealias WGPUProcDeviceRelease = @convention(c) (WGPUDevice?) -> Void /** * Proc pointer type for @ref wgpuInstanceCreateSurface: * > @copydoc wgpuInstanceCreateSurface */ public typealias WGPUProcInstanceCreateSurface = @convention(c) (WGPUInstance?, UnsafePointer?) -> WGPUSurface? /** * Proc pointer type for @ref wgpuInstanceGetWGSLLanguageFeatures: * > @copydoc wgpuInstanceGetWGSLLanguageFeatures */ public typealias WGPUProcInstanceGetWGSLLanguageFeatures = @convention(c) (WGPUInstance?, UnsafeMutablePointer?) -> Void /** * Proc pointer type for @ref wgpuInstanceHasWGSLLanguageFeature: * > @copydoc wgpuInstanceHasWGSLLanguageFeature */ public typealias WGPUProcInstanceHasWGSLLanguageFeature = @convention(c) (WGPUInstance?, WGPUWGSLLanguageFeatureName) -> WGPUBool /** * Proc pointer type for @ref wgpuInstanceProcessEvents: * > @copydoc wgpuInstanceProcessEvents */ public typealias WGPUProcInstanceProcessEvents = @convention(c) (WGPUInstance?) -> Void /** * Proc pointer type for @ref wgpuInstanceRequestAdapter: * > @copydoc wgpuInstanceRequestAdapter */ public typealias WGPUProcInstanceRequestAdapter = @convention(c) (WGPUInstance?, UnsafePointer?, WGPURequestAdapterCallbackInfo) -> WGPUFuture /** * Proc pointer type for @ref wgpuInstanceWaitAny: * > @copydoc wgpuInstanceWaitAny */ public typealias WGPUProcInstanceWaitAny = @convention(c, cType: "WGPUWaitStatus (*)(WGPUInstance, size_t, WGPUFutureWaitInfo *, uint64_t)") (WGPUInstance?, Int, UnsafeMutablePointer?, UInt64) -> WGPUWaitStatus /** * Proc pointer type for @ref wgpuInstanceAddRef: * > @copydoc wgpuInstanceAddRef */ public typealias WGPUProcInstanceAddRef = @convention(c) (WGPUInstance?) -> Void /** * Proc pointer type for @ref wgpuInstanceRelease: * > @copydoc wgpuInstanceRelease */ public typealias WGPUProcInstanceRelease = @convention(c) (WGPUInstance?) -> Void /** * Proc pointer type for @ref wgpuPipelineLayoutSetLabel: * > @copydoc wgpuPipelineLayoutSetLabel */ public typealias WGPUProcPipelineLayoutSetLabel = @convention(c) (WGPUPipelineLayout?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuPipelineLayoutAddRef: * > @copydoc wgpuPipelineLayoutAddRef */ public typealias WGPUProcPipelineLayoutAddRef = @convention(c) (WGPUPipelineLayout?) -> Void /** * Proc pointer type for @ref wgpuPipelineLayoutRelease: * > @copydoc wgpuPipelineLayoutRelease */ public typealias WGPUProcPipelineLayoutRelease = @convention(c) (WGPUPipelineLayout?) -> Void /** * Proc pointer type for @ref wgpuQuerySetDestroy: * > @copydoc wgpuQuerySetDestroy */ public typealias WGPUProcQuerySetDestroy = @convention(c) (WGPUQuerySet?) -> Void /** * Proc pointer type for @ref wgpuQuerySetGetCount: * > @copydoc wgpuQuerySetGetCount */ public typealias WGPUProcQuerySetGetCount = @convention(c) (WGPUQuerySet?) -> UInt32 /** * Proc pointer type for @ref wgpuQuerySetGetType: * > @copydoc wgpuQuerySetGetType */ public typealias WGPUProcQuerySetGetType = @convention(c) (WGPUQuerySet?) -> WGPUQueryType /** * Proc pointer type for @ref wgpuQuerySetSetLabel: * > @copydoc wgpuQuerySetSetLabel */ public typealias WGPUProcQuerySetSetLabel = @convention(c) (WGPUQuerySet?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuQuerySetAddRef: * > @copydoc wgpuQuerySetAddRef */ public typealias WGPUProcQuerySetAddRef = @convention(c) (WGPUQuerySet?) -> Void /** * Proc pointer type for @ref wgpuQuerySetRelease: * > @copydoc wgpuQuerySetRelease */ public typealias WGPUProcQuerySetRelease = @convention(c) (WGPUQuerySet?) -> Void /** * Proc pointer type for @ref wgpuQueueOnSubmittedWorkDone: * > @copydoc wgpuQueueOnSubmittedWorkDone */ public typealias WGPUProcQueueOnSubmittedWorkDone = @convention(c) (WGPUQueue?, WGPUQueueWorkDoneCallbackInfo) -> WGPUFuture /** * Proc pointer type for @ref wgpuQueueSetLabel: * > @copydoc wgpuQueueSetLabel */ public typealias WGPUProcQueueSetLabel = @convention(c) (WGPUQueue?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuQueueSubmit: * > @copydoc wgpuQueueSubmit */ public typealias WGPUProcQueueSubmit = @convention(c, cType: "void (*)(WGPUQueue, size_t, const WGPUCommandBuffer *)") (WGPUQueue?, Int, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuQueueWriteBuffer: * > @copydoc wgpuQueueWriteBuffer */ public typealias WGPUProcQueueWriteBuffer = @convention(c, cType: "void (*)(WGPUQueue, WGPUBuffer, uint64_t, const void *, size_t)") (WGPUQueue?, WGPUBuffer?, UInt64, UnsafeRawPointer?, Int) -> Void /** * Proc pointer type for @ref wgpuQueueWriteTexture: * > @copydoc wgpuQueueWriteTexture */ public typealias WGPUProcQueueWriteTexture = @convention(c, cType: "void (*)(WGPUQueue, const WGPUTexelCopyTextureInfo *, const void *, size_t, const WGPUTexelCopyBufferLayout *, const WGPUExtent3D *)") (WGPUQueue?, UnsafePointer?, UnsafeRawPointer?, Int, UnsafePointer?, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuQueueAddRef: * > @copydoc wgpuQueueAddRef */ public typealias WGPUProcQueueAddRef = @convention(c) (WGPUQueue?) -> Void /** * Proc pointer type for @ref wgpuQueueRelease: * > @copydoc wgpuQueueRelease */ public typealias WGPUProcQueueRelease = @convention(c) (WGPUQueue?) -> Void /** * Proc pointer type for @ref wgpuRenderBundleSetLabel: * > @copydoc wgpuRenderBundleSetLabel */ public typealias WGPUProcRenderBundleSetLabel = @convention(c) (WGPURenderBundle?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuRenderBundleAddRef: * > @copydoc wgpuRenderBundleAddRef */ public typealias WGPUProcRenderBundleAddRef = @convention(c) (WGPURenderBundle?) -> Void /** * Proc pointer type for @ref wgpuRenderBundleRelease: * > @copydoc wgpuRenderBundleRelease */ public typealias WGPUProcRenderBundleRelease = @convention(c) (WGPURenderBundle?) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderDraw: * > @copydoc wgpuRenderBundleEncoderDraw */ public typealias WGPUProcRenderBundleEncoderDraw = @convention(c) (WGPURenderBundleEncoder?, UInt32, UInt32, UInt32, UInt32) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderDrawIndexed: * > @copydoc wgpuRenderBundleEncoderDrawIndexed */ public typealias WGPUProcRenderBundleEncoderDrawIndexed = @convention(c) (WGPURenderBundleEncoder?, UInt32, UInt32, UInt32, Int32, UInt32) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderDrawIndexedIndirect: * > @copydoc wgpuRenderBundleEncoderDrawIndexedIndirect */ public typealias WGPUProcRenderBundleEncoderDrawIndexedIndirect = @convention(c) (WGPURenderBundleEncoder?, WGPUBuffer?, UInt64) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderDrawIndirect: * > @copydoc wgpuRenderBundleEncoderDrawIndirect */ public typealias WGPUProcRenderBundleEncoderDrawIndirect = @convention(c) (WGPURenderBundleEncoder?, WGPUBuffer?, UInt64) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderFinish: * > @copydoc wgpuRenderBundleEncoderFinish */ public typealias WGPUProcRenderBundleEncoderFinish = @convention(c) (WGPURenderBundleEncoder?, UnsafePointer?) -> WGPURenderBundle? /** * Proc pointer type for @ref wgpuRenderBundleEncoderInsertDebugMarker: * > @copydoc wgpuRenderBundleEncoderInsertDebugMarker */ public typealias WGPUProcRenderBundleEncoderInsertDebugMarker = @convention(c) (WGPURenderBundleEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderPopDebugGroup: * > @copydoc wgpuRenderBundleEncoderPopDebugGroup */ public typealias WGPUProcRenderBundleEncoderPopDebugGroup = @convention(c) (WGPURenderBundleEncoder?) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderPushDebugGroup: * > @copydoc wgpuRenderBundleEncoderPushDebugGroup */ public typealias WGPUProcRenderBundleEncoderPushDebugGroup = @convention(c) (WGPURenderBundleEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderSetBindGroup: * > @copydoc wgpuRenderBundleEncoderSetBindGroup */ public typealias WGPUProcRenderBundleEncoderSetBindGroup = @convention(c, cType: "void (*)(WGPURenderBundleEncoder, uint32_t, WGPUBindGroup, size_t, const uint32_t *)") (WGPURenderBundleEncoder?, UInt32, WGPUBindGroup?, Int, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderSetIndexBuffer: * > @copydoc wgpuRenderBundleEncoderSetIndexBuffer */ public typealias WGPUProcRenderBundleEncoderSetIndexBuffer = @convention(c) (WGPURenderBundleEncoder?, WGPUBuffer?, WGPUIndexFormat, UInt64, UInt64) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderSetLabel: * > @copydoc wgpuRenderBundleEncoderSetLabel */ public typealias WGPUProcRenderBundleEncoderSetLabel = @convention(c) (WGPURenderBundleEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderSetPipeline: * > @copydoc wgpuRenderBundleEncoderSetPipeline */ public typealias WGPUProcRenderBundleEncoderSetPipeline = @convention(c) (WGPURenderBundleEncoder?, WGPURenderPipeline?) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderSetVertexBuffer: * > @copydoc wgpuRenderBundleEncoderSetVertexBuffer */ public typealias WGPUProcRenderBundleEncoderSetVertexBuffer = @convention(c) (WGPURenderBundleEncoder?, UInt32, WGPUBuffer?, UInt64, UInt64) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderAddRef: * > @copydoc wgpuRenderBundleEncoderAddRef */ public typealias WGPUProcRenderBundleEncoderAddRef = @convention(c) (WGPURenderBundleEncoder?) -> Void /** * Proc pointer type for @ref wgpuRenderBundleEncoderRelease: * > @copydoc wgpuRenderBundleEncoderRelease */ public typealias WGPUProcRenderBundleEncoderRelease = @convention(c) (WGPURenderBundleEncoder?) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderBeginOcclusionQuery: * > @copydoc wgpuRenderPassEncoderBeginOcclusionQuery */ public typealias WGPUProcRenderPassEncoderBeginOcclusionQuery = @convention(c) (WGPURenderPassEncoder?, UInt32) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderDraw: * > @copydoc wgpuRenderPassEncoderDraw */ public typealias WGPUProcRenderPassEncoderDraw = @convention(c) (WGPURenderPassEncoder?, UInt32, UInt32, UInt32, UInt32) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderDrawIndexed: * > @copydoc wgpuRenderPassEncoderDrawIndexed */ public typealias WGPUProcRenderPassEncoderDrawIndexed = @convention(c) (WGPURenderPassEncoder?, UInt32, UInt32, UInt32, Int32, UInt32) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderDrawIndexedIndirect: * > @copydoc wgpuRenderPassEncoderDrawIndexedIndirect */ public typealias WGPUProcRenderPassEncoderDrawIndexedIndirect = @convention(c) (WGPURenderPassEncoder?, WGPUBuffer?, UInt64) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderDrawIndirect: * > @copydoc wgpuRenderPassEncoderDrawIndirect */ public typealias WGPUProcRenderPassEncoderDrawIndirect = @convention(c) (WGPURenderPassEncoder?, WGPUBuffer?, UInt64) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderEnd: * > @copydoc wgpuRenderPassEncoderEnd */ public typealias WGPUProcRenderPassEncoderEnd = @convention(c) (WGPURenderPassEncoder?) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderEndOcclusionQuery: * > @copydoc wgpuRenderPassEncoderEndOcclusionQuery */ public typealias WGPUProcRenderPassEncoderEndOcclusionQuery = @convention(c) (WGPURenderPassEncoder?) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderExecuteBundles: * > @copydoc wgpuRenderPassEncoderExecuteBundles */ public typealias WGPUProcRenderPassEncoderExecuteBundles = @convention(c, cType: "void (*)(WGPURenderPassEncoder, size_t, const WGPURenderBundle *)") (WGPURenderPassEncoder?, Int, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderInsertDebugMarker: * > @copydoc wgpuRenderPassEncoderInsertDebugMarker */ public typealias WGPUProcRenderPassEncoderInsertDebugMarker = @convention(c) (WGPURenderPassEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderPopDebugGroup: * > @copydoc wgpuRenderPassEncoderPopDebugGroup */ public typealias WGPUProcRenderPassEncoderPopDebugGroup = @convention(c) (WGPURenderPassEncoder?) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderPushDebugGroup: * > @copydoc wgpuRenderPassEncoderPushDebugGroup */ public typealias WGPUProcRenderPassEncoderPushDebugGroup = @convention(c) (WGPURenderPassEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderSetBindGroup: * > @copydoc wgpuRenderPassEncoderSetBindGroup */ public typealias WGPUProcRenderPassEncoderSetBindGroup = @convention(c, cType: "void (*)(WGPURenderPassEncoder, uint32_t, WGPUBindGroup, size_t, const uint32_t *)") (WGPURenderPassEncoder?, UInt32, WGPUBindGroup?, Int, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderSetBlendConstant: * > @copydoc wgpuRenderPassEncoderSetBlendConstant */ public typealias WGPUProcRenderPassEncoderSetBlendConstant = @convention(c) (WGPURenderPassEncoder?, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderSetIndexBuffer: * > @copydoc wgpuRenderPassEncoderSetIndexBuffer */ public typealias WGPUProcRenderPassEncoderSetIndexBuffer = @convention(c) (WGPURenderPassEncoder?, WGPUBuffer?, WGPUIndexFormat, UInt64, UInt64) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderSetLabel: * > @copydoc wgpuRenderPassEncoderSetLabel */ public typealias WGPUProcRenderPassEncoderSetLabel = @convention(c) (WGPURenderPassEncoder?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderSetPipeline: * > @copydoc wgpuRenderPassEncoderSetPipeline */ public typealias WGPUProcRenderPassEncoderSetPipeline = @convention(c) (WGPURenderPassEncoder?, WGPURenderPipeline?) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderSetScissorRect: * > @copydoc wgpuRenderPassEncoderSetScissorRect */ public typealias WGPUProcRenderPassEncoderSetScissorRect = @convention(c) (WGPURenderPassEncoder?, UInt32, UInt32, UInt32, UInt32) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderSetStencilReference: * > @copydoc wgpuRenderPassEncoderSetStencilReference */ public typealias WGPUProcRenderPassEncoderSetStencilReference = @convention(c) (WGPURenderPassEncoder?, UInt32) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderSetVertexBuffer: * > @copydoc wgpuRenderPassEncoderSetVertexBuffer */ public typealias WGPUProcRenderPassEncoderSetVertexBuffer = @convention(c) (WGPURenderPassEncoder?, UInt32, WGPUBuffer?, UInt64, UInt64) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderSetViewport: * > @copydoc wgpuRenderPassEncoderSetViewport */ public typealias WGPUProcRenderPassEncoderSetViewport = @convention(c) (WGPURenderPassEncoder?, Float, Float, Float, Float, Float, Float) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderAddRef: * > @copydoc wgpuRenderPassEncoderAddRef */ public typealias WGPUProcRenderPassEncoderAddRef = @convention(c) (WGPURenderPassEncoder?) -> Void /** * Proc pointer type for @ref wgpuRenderPassEncoderRelease: * > @copydoc wgpuRenderPassEncoderRelease */ public typealias WGPUProcRenderPassEncoderRelease = @convention(c) (WGPURenderPassEncoder?) -> Void /** * Proc pointer type for @ref wgpuRenderPipelineGetBindGroupLayout: * > @copydoc wgpuRenderPipelineGetBindGroupLayout */ public typealias WGPUProcRenderPipelineGetBindGroupLayout = @convention(c) (WGPURenderPipeline?, UInt32) -> WGPUBindGroupLayout? /** * Proc pointer type for @ref wgpuRenderPipelineSetLabel: * > @copydoc wgpuRenderPipelineSetLabel */ public typealias WGPUProcRenderPipelineSetLabel = @convention(c) (WGPURenderPipeline?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuRenderPipelineAddRef: * > @copydoc wgpuRenderPipelineAddRef */ public typealias WGPUProcRenderPipelineAddRef = @convention(c) (WGPURenderPipeline?) -> Void /** * Proc pointer type for @ref wgpuRenderPipelineRelease: * > @copydoc wgpuRenderPipelineRelease */ public typealias WGPUProcRenderPipelineRelease = @convention(c) (WGPURenderPipeline?) -> Void /** * Proc pointer type for @ref wgpuSamplerSetLabel: * > @copydoc wgpuSamplerSetLabel */ public typealias WGPUProcSamplerSetLabel = @convention(c) (WGPUSampler?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuSamplerAddRef: * > @copydoc wgpuSamplerAddRef */ public typealias WGPUProcSamplerAddRef = @convention(c) (WGPUSampler?) -> Void /** * Proc pointer type for @ref wgpuSamplerRelease: * > @copydoc wgpuSamplerRelease */ public typealias WGPUProcSamplerRelease = @convention(c) (WGPUSampler?) -> Void /** * Proc pointer type for @ref wgpuShaderModuleGetCompilationInfo: * > @copydoc wgpuShaderModuleGetCompilationInfo */ public typealias WGPUProcShaderModuleGetCompilationInfo = @convention(c) (WGPUShaderModule?, WGPUCompilationInfoCallbackInfo) -> WGPUFuture /** * Proc pointer type for @ref wgpuShaderModuleSetLabel: * > @copydoc wgpuShaderModuleSetLabel */ public typealias WGPUProcShaderModuleSetLabel = @convention(c) (WGPUShaderModule?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuShaderModuleAddRef: * > @copydoc wgpuShaderModuleAddRef */ public typealias WGPUProcShaderModuleAddRef = @convention(c) (WGPUShaderModule?) -> Void /** * Proc pointer type for @ref wgpuShaderModuleRelease: * > @copydoc wgpuShaderModuleRelease */ public typealias WGPUProcShaderModuleRelease = @convention(c) (WGPUShaderModule?) -> Void /** * Proc pointer type for @ref wgpuSupportedFeaturesFreeMembers: * > @copydoc wgpuSupportedFeaturesFreeMembers */ public typealias WGPUProcSupportedFeaturesFreeMembers = @convention(c) (WGPUSupportedFeatures) -> Void /** * Proc pointer type for @ref wgpuSupportedInstanceFeaturesFreeMembers: * > @copydoc wgpuSupportedInstanceFeaturesFreeMembers */ public typealias WGPUProcSupportedInstanceFeaturesFreeMembers = @convention(c) (WGPUSupportedInstanceFeatures) -> Void /** * Proc pointer type for @ref wgpuSupportedWGSLLanguageFeaturesFreeMembers: * > @copydoc wgpuSupportedWGSLLanguageFeaturesFreeMembers */ public typealias WGPUProcSupportedWGSLLanguageFeaturesFreeMembers = @convention(c) (WGPUSupportedWGSLLanguageFeatures) -> Void /** * Proc pointer type for @ref wgpuSurfaceConfigure: * > @copydoc wgpuSurfaceConfigure */ public typealias WGPUProcSurfaceConfigure = @convention(c) (WGPUSurface?, UnsafePointer?) -> Void /** * Proc pointer type for @ref wgpuSurfaceGetCapabilities: * > @copydoc wgpuSurfaceGetCapabilities */ public typealias WGPUProcSurfaceGetCapabilities = @convention(c) (WGPUSurface?, WGPUAdapter?, UnsafeMutablePointer?) -> WGPUStatus /** * Proc pointer type for @ref wgpuSurfaceGetCurrentTexture: * > @copydoc wgpuSurfaceGetCurrentTexture */ public typealias WGPUProcSurfaceGetCurrentTexture = @convention(c) (WGPUSurface?, UnsafeMutablePointer?) -> Void /** * Proc pointer type for @ref wgpuSurfacePresent: * > @copydoc wgpuSurfacePresent */ public typealias WGPUProcSurfacePresent = @convention(c) (WGPUSurface?) -> WGPUStatus /** * Proc pointer type for @ref wgpuSurfaceSetLabel: * > @copydoc wgpuSurfaceSetLabel */ public typealias WGPUProcSurfaceSetLabel = @convention(c) (WGPUSurface?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuSurfaceUnconfigure: * > @copydoc wgpuSurfaceUnconfigure */ public typealias WGPUProcSurfaceUnconfigure = @convention(c) (WGPUSurface?) -> Void /** * Proc pointer type for @ref wgpuSurfaceAddRef: * > @copydoc wgpuSurfaceAddRef */ public typealias WGPUProcSurfaceAddRef = @convention(c) (WGPUSurface?) -> Void /** * Proc pointer type for @ref wgpuSurfaceRelease: * > @copydoc wgpuSurfaceRelease */ public typealias WGPUProcSurfaceRelease = @convention(c) (WGPUSurface?) -> Void /** * Proc pointer type for @ref wgpuSurfaceCapabilitiesFreeMembers: * > @copydoc wgpuSurfaceCapabilitiesFreeMembers */ public typealias WGPUProcSurfaceCapabilitiesFreeMembers = @convention(c) (WGPUSurfaceCapabilities) -> Void /** * Proc pointer type for @ref wgpuTextureCreateView: * > @copydoc wgpuTextureCreateView */ public typealias WGPUProcTextureCreateView = @convention(c) (WGPUTexture?, UnsafePointer?) -> WGPUTextureView? /** * Proc pointer type for @ref wgpuTextureDestroy: * > @copydoc wgpuTextureDestroy */ public typealias WGPUProcTextureDestroy = @convention(c) (WGPUTexture?) -> Void /** * Proc pointer type for @ref wgpuTextureGetDepthOrArrayLayers: * > @copydoc wgpuTextureGetDepthOrArrayLayers */ public typealias WGPUProcTextureGetDepthOrArrayLayers = @convention(c) (WGPUTexture?) -> UInt32 /** * Proc pointer type for @ref wgpuTextureGetDimension: * > @copydoc wgpuTextureGetDimension */ public typealias WGPUProcTextureGetDimension = @convention(c) (WGPUTexture?) -> WGPUTextureDimension /** * Proc pointer type for @ref wgpuTextureGetFormat: * > @copydoc wgpuTextureGetFormat */ public typealias WGPUProcTextureGetFormat = @convention(c) (WGPUTexture?) -> WGPUTextureFormat /** * Proc pointer type for @ref wgpuTextureGetHeight: * > @copydoc wgpuTextureGetHeight */ public typealias WGPUProcTextureGetHeight = @convention(c) (WGPUTexture?) -> UInt32 /** * Proc pointer type for @ref wgpuTextureGetMipLevelCount: * > @copydoc wgpuTextureGetMipLevelCount */ public typealias WGPUProcTextureGetMipLevelCount = @convention(c) (WGPUTexture?) -> UInt32 /** * Proc pointer type for @ref wgpuTextureGetSampleCount: * > @copydoc wgpuTextureGetSampleCount */ public typealias WGPUProcTextureGetSampleCount = @convention(c) (WGPUTexture?) -> UInt32 /** * Proc pointer type for @ref wgpuTextureGetUsage: * > @copydoc wgpuTextureGetUsage */ public typealias WGPUProcTextureGetUsage = @convention(c) (WGPUTexture?) -> WGPUTextureUsage /** * Proc pointer type for @ref wgpuTextureGetWidth: * > @copydoc wgpuTextureGetWidth */ public typealias WGPUProcTextureGetWidth = @convention(c) (WGPUTexture?) -> UInt32 /** * Proc pointer type for @ref wgpuTextureSetLabel: * > @copydoc wgpuTextureSetLabel */ public typealias WGPUProcTextureSetLabel = @convention(c) (WGPUTexture?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuTextureAddRef: * > @copydoc wgpuTextureAddRef */ public typealias WGPUProcTextureAddRef = @convention(c) (WGPUTexture?) -> Void /** * Proc pointer type for @ref wgpuTextureRelease: * > @copydoc wgpuTextureRelease */ public typealias WGPUProcTextureRelease = @convention(c) (WGPUTexture?) -> Void /** * Proc pointer type for @ref wgpuTextureViewSetLabel: * > @copydoc wgpuTextureViewSetLabel */ public typealias WGPUProcTextureViewSetLabel = @convention(c) (WGPUTextureView?, WGPUStringView) -> Void /** * Proc pointer type for @ref wgpuTextureViewAddRef: * > @copydoc wgpuTextureViewAddRef */ public typealias WGPUProcTextureViewAddRef = @convention(c) (WGPUTextureView?) -> Void /** * Proc pointer type for @ref wgpuTextureViewRelease: * > @copydoc wgpuTextureViewRelease */ public typealias WGPUProcTextureViewRelease = @convention(c) (WGPUTextureView?) -> Void extension WGPUInstanceImpl { /** * \defgroup GlobalFunctions Global Functions * \brief Functions that are not specific to an object. * * @{ */ /** * Create a WGPUInstance * * @returns * This value is @ref ReturnedWithOwnership. */ public /*not inherited*/ init!(descriptor: UnsafePointer?) /** * \defgroup WGPUInstanceMethods WGPUInstance methods * \brief Functions whose first argument has type WGPUInstance. * * @{ */ /** * Creates a @ref WGPUSurface, see @ref Surface-Creation for more details. * * @param descriptor * The description of the @ref WGPUSurface to create. * * @returns * A new @ref WGPUSurface for this descriptor (or an error @ref WGPUSurface). * This value is @ref ReturnedWithOwnership. */ public func createSurface(descriptor: UnsafePointer) -> WGPUSurface! /** * Get the list of @ref WGPUWGSLLanguageFeatureName values supported by the instance. */ public func getwgslLanguageFeatures(features: UnsafeMutablePointer) public func haswgslLanguageFeature(feature: WGPUWGSLLanguageFeatureName) -> WGPUBool /** * Processes asynchronous events on this `WGPUInstance`, calling any callbacks for asynchronous operations created with @ref WGPUCallbackMode_AllowProcessEvents. * * See @ref Process-Events for more information. */ public func processEvents() public func requestAdapter(options: UnsafePointer, callbackInfo: WGPURequestAdapterCallbackInfo) -> WGPUFuture /** * Wait for at least one WGPUFuture in `futures` to complete, and call callbacks of the respective completed asynchronous operations. * * See @ref Wait-Any for more information. */ public func waitAny(futureCount: Int, futures: UnsafeMutablePointer, timeoutNS: UInt64) -> WGPUWaitStatus public func addRef() public func release() } /** * Get the list of @ref WGPUInstanceFeatureName values supported by the instance. * * @param features * This parameter is @ref ReturnedWithOwnership. */ public func wgpuGetInstanceFeatures(_ features: UnsafeMutablePointer) /** * Get the limits supported by the instance. * * @returns * Indicates if there was an @ref OutStructChainError. */ public func wgpuGetInstanceLimits(_ limits: UnsafeMutablePointer) -> WGPUStatus /** * Check whether a particular @ref WGPUInstanceFeatureName is supported by the instance. */ public func wgpuHasInstanceFeature(_ feature: WGPUInstanceFeatureName) -> WGPUBool /** * Returns the "procedure address" (function pointer) of the named function. * The result must be cast to the appropriate proc pointer type. */ public func wgpuGetProcAddress(_ procName: WGPUStringView) -> WGPUProc! extension WGPUAdapterImpl { /** * \defgroup WGPUAdapterMethods WGPUAdapter methods * \brief Functions whose first argument has type WGPUAdapter. * * @{ */ /** * Get the list of @ref WGPUFeatureName values supported by the adapter. * * @param features * This parameter is @ref ReturnedWithOwnership. */ public func getFeatures(features: UnsafeMutablePointer) /** * @param info * This parameter is @ref ReturnedWithOwnership. * * @returns * Indicates if there was an @ref OutStructChainError. */ public func getInfo(info: UnsafeMutablePointer) -> WGPUStatus /** * @returns * Indicates if there was an @ref OutStructChainError. */ public func getLimits(limits: UnsafeMutablePointer) -> WGPUStatus public func hasFeature(feature: WGPUFeatureName) -> WGPUBool public func requestDevice(descriptor: UnsafePointer, callbackInfo: WGPURequestDeviceCallbackInfo) -> WGPUFuture public func addRef() public func release() } /** * \defgroup WGPUAdapterInfoMethods WGPUAdapterInfo methods * \brief Functions whose first argument has type WGPUAdapterInfo. * * @{ */ /** * Frees members which were allocated by the API. */ public func wgpuAdapterInfoFreeMembers(_ adapterInfo: WGPUAdapterInfo) extension WGPUBindGroupImpl { /** * \defgroup WGPUBindGroupMethods WGPUBindGroup methods * \brief Functions whose first argument has type WGPUBindGroup. * * @{ */ public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPUBindGroupLayoutImpl { /** * \defgroup WGPUBindGroupLayoutMethods WGPUBindGroupLayout methods * \brief Functions whose first argument has type WGPUBindGroupLayout. * * @{ */ public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPUBufferImpl { /** * \defgroup WGPUBufferMethods WGPUBuffer methods * \brief Functions whose first argument has type WGPUBuffer. * * @{ */ public func destroy() public var mapState: WGPUBufferMapState { get } public var size: UInt64 { get } public var usage: WGPUBufferUsage { get } /** * @param offset * Byte offset relative to beginning of the buffer. * * @param size * Byte size of the region to map. * If this is @ref WGPU_WHOLE_MAP_SIZE, it defaults to `buffer.size - offset`. */ public func mapAsync(mode: WGPUMapMode, offset: Int, size: Int, callbackInfo: WGPUBufferMapCallbackInfo) -> WGPUFuture /** * Copies a range of data from the buffer mapping into the provided destination pointer. * See @ref MappedRangeBehavior for error conditions and guarantees. * This function is safe to call inside spontaneous callbacks (see @ref CallbackReentrancy). * * In Wasm, this is more efficient than copying from a mapped range into a `malloc`'d range. * * @param offset * Byte offset relative to the beginning of the buffer. * * @param data * Destination, to read buffer data into. * * @param size * Number of bytes of data to read from the buffer. * (Note @ref WGPU_WHOLE_MAP_SIZE is *not* accepted here.) * * @returns * @ref WGPUStatus_Error if the copy did not occur. */ public func readMappedRange(offset: Int, data: UnsafeMutableRawPointer, size: Int) -> WGPUStatus public func setLabel(label: WGPUStringView) public func unmap() /** * Copies a range of data from the provided source pointer into the buffer mapping. * See @ref MappedRangeBehavior for error conditions and guarantees. * This function is safe to call inside spontaneous callbacks (see @ref CallbackReentrancy). * * In Wasm, this is more efficient than copying from a `malloc`'d range into a mapped range. * * @param offset * Byte offset relative to the beginning of the buffer. * * @param data * Source, to write buffer data from. * * @param size * Number of bytes of data to write to the buffer. * (Note @ref WGPU_WHOLE_MAP_SIZE is *not* accepted here.) * * @returns * @ref WGPUStatus_Error if the copy did not occur. */ public func writeMappedRange(offset: Int, data: UnsafeRawPointer, size: Int) -> WGPUStatus public func addRef() public func release() } /** * Returns a const pointer to beginning of the mapped range. * It must not be written; writing to this range causes undefined behavior. * See @ref MappedRangeBehavior for error conditions and guarantees. * This function is safe to call inside spontaneous callbacks (see @ref CallbackReentrancy). * * In Wasm, if `memcpy`ing from this range, prefer using @ref wgpuBufferReadMappedRange * instead for better performance. * * @param offset * Byte offset relative to the beginning of the buffer. * * @param size * Byte size of the range to get. * If this is @ref WGPU_WHOLE_MAP_SIZE, it defaults to `buffer.size - offset`. * The returned pointer is valid for exactly this many bytes. */ public func wgpuBufferGetConstMappedRange(_ buffer: WGPUBuffer!, _ offset: Int, _ size: Int) -> UnsafeRawPointer! /** * Returns a mutable pointer to beginning of the mapped range. * See @ref MappedRangeBehavior for error conditions and guarantees. * This function is safe to call inside spontaneous callbacks (see @ref CallbackReentrancy). * * In Wasm, if `memcpy`ing into this range, prefer using @ref wgpuBufferWriteMappedRange * instead for better performance. * * @param offset * Byte offset relative to the beginning of the buffer. * * @param size * Byte size of the range to get. * If this is @ref WGPU_WHOLE_MAP_SIZE, it defaults to `buffer.size - offset`. * The returned pointer is valid for exactly this many bytes. */ public func wgpuBufferGetMappedRange(_ buffer: WGPUBuffer!, _ offset: Int, _ size: Int) -> UnsafeMutableRawPointer! extension WGPUCommandBufferImpl { /** * \defgroup WGPUCommandBufferMethods WGPUCommandBuffer methods * \brief Functions whose first argument has type WGPUCommandBuffer. * * @{ */ public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPUCommandEncoderImpl { /** * \defgroup WGPUCommandEncoderMethods WGPUCommandEncoder methods * \brief Functions whose first argument has type WGPUCommandEncoder. * * @{ */ /** * @returns * This value is @ref ReturnedWithOwnership. */ public func beginComputePass(descriptor: UnsafePointer) -> WGPUComputePassEncoder! /** * @returns * This value is @ref ReturnedWithOwnership. */ public func beginRenderPass(descriptor: UnsafePointer) -> WGPURenderPassEncoder! public func clearBuffer(buffer: WGPUBuffer!, offset: UInt64, size: UInt64) public func copyBufferToBuffer(source: WGPUBuffer!, sourceOffset: UInt64, destination: WGPUBuffer!, destinationOffset: UInt64, size: UInt64) public func copyBufferToTexture(source: UnsafePointer, destination: UnsafePointer, copySize: UnsafePointer) public func copyTextureToBuffer(source: UnsafePointer, destination: UnsafePointer, copySize: UnsafePointer) public func copyTextureToTexture(source: UnsafePointer, destination: UnsafePointer, copySize: UnsafePointer) /** * @returns * This value is @ref ReturnedWithOwnership. */ public func finish(descriptor: UnsafePointer) -> WGPUCommandBuffer! public func insertDebugMarker(markerLabel: WGPUStringView) public func popDebugGroup() public func pushDebugGroup(groupLabel: WGPUStringView) public func resolveQuerySet(querySet: WGPUQuerySet!, firstQuery: UInt32, queryCount: UInt32, destination: WGPUBuffer!, destinationOffset: UInt64) public func setLabel(label: WGPUStringView) public func writeTimestamp(querySet: WGPUQuerySet!, queryIndex: UInt32) public func addRef() public func release() } extension WGPUComputePassEncoderImpl { /** * \defgroup WGPUComputePassEncoderMethods WGPUComputePassEncoder methods * \brief Functions whose first argument has type WGPUComputePassEncoder. * * @{ */ public func dispatchWorkgroups(workgroupCountX: UInt32, workgroupCountY: UInt32, workgroupCountZ: UInt32) public func dispatchWorkgroupsIndirect(indirectBuffer: WGPUBuffer!, indirectOffset: UInt64) public func end() public func insertDebugMarker(markerLabel: WGPUStringView) public func popDebugGroup() public func pushDebugGroup(groupLabel: WGPUStringView) public func setBindGroup(groupIndex: UInt32, group: WGPUBindGroup!, dynamicOffsetCount: Int, dynamicOffsets: UnsafePointer) public func setLabel(label: WGPUStringView) public func setPipeline(pipeline: WGPUComputePipeline!) public func addRef() public func release() } extension WGPUComputePipelineImpl { /** * \defgroup WGPUComputePipelineMethods WGPUComputePipeline methods * \brief Functions whose first argument has type WGPUComputePipeline. * * @{ */ /** * @returns * This value is @ref ReturnedWithOwnership. */ public func getbindGroupLayout(groupIndex: UInt32) -> WGPUBindGroupLayout! public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPUDeviceImpl { /** * \defgroup WGPUDeviceMethods WGPUDevice methods * \brief Functions whose first argument has type WGPUDevice. * * @{ */ /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createBindGroup(descriptor: UnsafePointer) -> WGPUBindGroup! /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createBindGroupLayout(descriptor: UnsafePointer) -> WGPUBindGroupLayout! /** * TODO * * If @ref WGPUBufferDescriptor::mappedAtCreation is `true` and the mapping allocation fails, * returns `NULL`. * * @returns * This value is @ref ReturnedWithOwnership. */ public func createBuffer(descriptor: UnsafePointer) -> WGPUBuffer? /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createCommandEncoder(descriptor: UnsafePointer) -> WGPUCommandEncoder! /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createComputePipeline(descriptor: UnsafePointer) -> WGPUComputePipeline! public func createComputePipelineAsync(descriptor: UnsafePointer, callbackInfo: WGPUCreateComputePipelineAsyncCallbackInfo) -> WGPUFuture /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createPipelineLayout(descriptor: UnsafePointer) -> WGPUPipelineLayout! /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createQuerySet(descriptor: UnsafePointer) -> WGPUQuerySet! /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createRenderBundleEncoder(descriptor: UnsafePointer) -> WGPURenderBundleEncoder! /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createRenderPipeline(descriptor: UnsafePointer) -> WGPURenderPipeline! public func createRenderPipelineAsync(descriptor: UnsafePointer, callbackInfo: WGPUCreateRenderPipelineAsyncCallbackInfo) -> WGPUFuture /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createSampler(descriptor: UnsafePointer) -> WGPUSampler! /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createShaderModule(descriptor: UnsafePointer) -> WGPUShaderModule! /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createTexture(descriptor: UnsafePointer) -> WGPUTexture! public func destroy() /** * @param adapterInfo * This parameter is @ref ReturnedWithOwnership. * * @returns * Indicates if there was an @ref OutStructChainError. */ public func getAdapterInfo(adapterInfo: UnsafeMutablePointer) -> WGPUStatus /** * Get the list of @ref WGPUFeatureName values supported by the device. * * @param features * This parameter is @ref ReturnedWithOwnership. */ public func getFeatures(features: UnsafeMutablePointer) /** * @returns * Indicates if there was an @ref OutStructChainError. */ public func getLimits(limits: UnsafeMutablePointer) -> WGPUStatus /** * @returns * The @ref WGPUFuture for the device-lost event of the device. */ public var lostFuture: WGPUFuture { get } /** * @returns * This value is @ref ReturnedWithOwnership. */ public var queue: WGPUQueue! { get } public func hasFeature(feature: WGPUFeatureName) -> WGPUBool /** * Pops an error scope to the current thread's error scope stack, * asynchronously returning the result. See @ref ErrorScopes. */ public func popErrorScope(callbackInfo: WGPUPopErrorScopeCallbackInfo) -> WGPUFuture /** * Pushes an error scope to the current thread's error scope stack. * See @ref ErrorScopes. */ public func pushErrorScope(filter: WGPUErrorFilter) public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPUPipelineLayoutImpl { /** * \defgroup WGPUPipelineLayoutMethods WGPUPipelineLayout methods * \brief Functions whose first argument has type WGPUPipelineLayout. * * @{ */ public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPUQuerySetImpl { /** * \defgroup WGPUQuerySetMethods WGPUQuerySet methods * \brief Functions whose first argument has type WGPUQuerySet. * * @{ */ public func destroy() public var count: UInt32 { get } public var type: WGPUQueryType { get } public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPUQueueImpl { /** * \defgroup WGPUQueueMethods WGPUQueue methods * \brief Functions whose first argument has type WGPUQueue. * * @{ */ public func onsubmittedWorkDone(callbackInfo: WGPUQueueWorkDoneCallbackInfo) -> WGPUFuture public func setLabel(label: WGPUStringView) public func submit(commandCount: Int, commands: UnsafePointer) /** * Produces a @ref DeviceError both content-timeline (`size` alignment) and device-timeline * errors defined by the WebGPU specification. */ public func writeBuffer(buffer: WGPUBuffer!, bufferOffset: UInt64, data: UnsafeRawPointer, size: Int) public func writeTexture(destination: UnsafePointer, data: UnsafeRawPointer, dataSize: Int, dataLayout: UnsafePointer, writeSize: UnsafePointer) public func addRef() public func release() } extension WGPURenderBundleImpl { /** * \defgroup WGPURenderBundleMethods WGPURenderBundle methods * \brief Functions whose first argument has type WGPURenderBundle. * * @{ */ public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPURenderBundleEncoderImpl { /** * \defgroup WGPURenderBundleEncoderMethods WGPURenderBundleEncoder methods * \brief Functions whose first argument has type WGPURenderBundleEncoder. * * @{ */ public func draw(vertexCount: UInt32, instanceCount: UInt32, firstVertex: UInt32, firstInstance: UInt32) public func drawIndexed(indexCount: UInt32, instanceCount: UInt32, firstIndex: UInt32, baseVertex: Int32, firstInstance: UInt32) public func drawIndexedIndirect(indirectBuffer: WGPUBuffer!, indirectOffset: UInt64) public func drawIndirect(indirectBuffer: WGPUBuffer!, indirectOffset: UInt64) /** * @returns * This value is @ref ReturnedWithOwnership. */ public func finish(descriptor: UnsafePointer) -> WGPURenderBundle! public func insertDebugMarker(markerLabel: WGPUStringView) public func popDebugGroup() public func pushDebugGroup(groupLabel: WGPUStringView) public func setBindGroup(groupIndex: UInt32, group: WGPUBindGroup!, dynamicOffsetCount: Int, dynamicOffsets: UnsafePointer) public func setIndexBuffer(buffer: WGPUBuffer!, format: WGPUIndexFormat, offset: UInt64, size: UInt64) public func setLabel(label: WGPUStringView) public func setPipeline(pipeline: WGPURenderPipeline!) public func setVertexBuffer(slot: UInt32, buffer: WGPUBuffer!, offset: UInt64, size: UInt64) public func addRef() public func release() } extension WGPURenderPassEncoderImpl { /** * \defgroup WGPURenderPassEncoderMethods WGPURenderPassEncoder methods * \brief Functions whose first argument has type WGPURenderPassEncoder. * * @{ */ public func beginOcclusionQuery(queryIndex: UInt32) public func draw(vertexCount: UInt32, instanceCount: UInt32, firstVertex: UInt32, firstInstance: UInt32) public func drawIndexed(indexCount: UInt32, instanceCount: UInt32, firstIndex: UInt32, baseVertex: Int32, firstInstance: UInt32) public func drawIndexedIndirect(indirectBuffer: WGPUBuffer!, indirectOffset: UInt64) public func drawIndirect(indirectBuffer: WGPUBuffer!, indirectOffset: UInt64) public func end() public func endOcclusionQuery() public func executeBundles(bundleCount: Int, bundles: UnsafePointer) public func insertDebugMarker(markerLabel: WGPUStringView) public func popDebugGroup() public func pushDebugGroup(groupLabel: WGPUStringView) public func setBindGroup(groupIndex: UInt32, group: WGPUBindGroup!, dynamicOffsetCount: Int, dynamicOffsets: UnsafePointer) /** * @param color * The RGBA blend constant. Represents an `f32` color using @ref DoubleAsSupertype. */ public func setBlendConstant(color: UnsafePointer) public func setIndexBuffer(buffer: WGPUBuffer!, format: WGPUIndexFormat, offset: UInt64, size: UInt64) public func setLabel(label: WGPUStringView) public func setPipeline(pipeline: WGPURenderPipeline!) public func setScissorRect(_ x: UInt32, _ y: UInt32, width: UInt32, height: UInt32) public func setStencilReference(reference: UInt32) public func setVertexBuffer(slot: UInt32, buffer: WGPUBuffer!, offset: UInt64, size: UInt64) /** * TODO * * If any argument is non-finite, produces a @ref NonFiniteFloatValueError. */ public func setViewport(_ x: Float, _ y: Float, width: Float, height: Float, minDepth: Float, maxDepth: Float) public func addRef() public func release() } extension WGPURenderPipelineImpl { /** * \defgroup WGPURenderPipelineMethods WGPURenderPipeline methods * \brief Functions whose first argument has type WGPURenderPipeline. * * @{ */ /** * @returns * This value is @ref ReturnedWithOwnership. */ public func getbindGroupLayout(groupIndex: UInt32) -> WGPUBindGroupLayout! public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPUSamplerImpl { /** * \defgroup WGPUSamplerMethods WGPUSampler methods * \brief Functions whose first argument has type WGPUSampler. * * @{ */ public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPUShaderModuleImpl { /** * \defgroup WGPUShaderModuleMethods WGPUShaderModule methods * \brief Functions whose first argument has type WGPUShaderModule. * * @{ */ public func getCompilationInfo(callbackInfo: WGPUCompilationInfoCallbackInfo) -> WGPUFuture public func setLabel(label: WGPUStringView) public func addRef() public func release() } /** * \defgroup WGPUSupportedFeaturesMethods WGPUSupportedFeatures methods * \brief Functions whose first argument has type WGPUSupportedFeatures. * * @{ */ /** * Frees members which were allocated by the API. */ public func wgpuSupportedFeaturesFreeMembers(_ supportedFeatures: WGPUSupportedFeatures) /** * \defgroup WGPUSupportedInstanceFeaturesMethods WGPUSupportedInstanceFeatures methods * \brief Functions whose first argument has type WGPUSupportedInstanceFeatures. * * @{ */ /** * Frees members which were allocated by the API. */ public func wgpuSupportedInstanceFeaturesFreeMembers(_ supportedInstanceFeatures: WGPUSupportedInstanceFeatures) /** * \defgroup WGPUSupportedWGSLLanguageFeaturesMethods WGPUSupportedWGSLLanguageFeatures methods * \brief Functions whose first argument has type WGPUSupportedWGSLLanguageFeatures. * * @{ */ /** * Frees members which were allocated by the API. */ public func wgpuSupportedWGSLLanguageFeaturesFreeMembers(_ supportedWGSLLanguageFeatures: WGPUSupportedWGSLLanguageFeatures) extension WGPUSurfaceImpl { /** * \defgroup WGPUSurfaceMethods WGPUSurface methods * \brief Functions whose first argument has type WGPUSurface. * * @{ */ /** * Configures parameters for rendering to `surface`. * Produces a @ref DeviceError for all content-timeline errors defined by the WebGPU specification. * * See @ref Surface-Configuration for more details. * * @param config * The new configuration to use. */ public func configure(config: UnsafePointer) /** * Provides information on how `adapter` is able to use `surface`. * See @ref Surface-Capabilities for more details. * * @param adapter * The @ref WGPUAdapter to get capabilities for presenting to this @ref WGPUSurface. * * @param capabilities * The structure to fill capabilities in. * It may contain memory allocations so @ref wgpuSurfaceCapabilitiesFreeMembers must be called to avoid memory leaks. * This parameter is @ref ReturnedWithOwnership. * * @returns * Indicates if there was an @ref OutStructChainError. */ public func getCapabilities(adapter: WGPUAdapter!, capabilities: UnsafeMutablePointer) -> WGPUStatus /** * Returns the @ref WGPUTexture to render to `surface` this frame along with metadata on the frame. * Returns `NULL` and @ref WGPUSurfaceGetCurrentTextureStatus_Error if the surface is not configured. * * See @ref Surface-Presenting for more details. * * @param surfaceTexture * The structure to fill the @ref WGPUTexture and metadata in. */ public func getCurrentTexture(surfaceTexture: UnsafeMutablePointer) /** * Shows `surface`'s current texture to the user. * See @ref Surface-Presenting for more details. * * @returns * Returns @ref WGPUStatus_Error if the surface doesn't have a current texture. */ public func present() -> WGPUStatus /** * Modifies the label used to refer to `surface`. * * @param label * The new label. */ public func setLabel(label: WGPUStringView) /** * Removes the configuration for `surface`. * See @ref Surface-Configuration for more details. */ public func unconfigure() public func addRef() public func release() } /** * \defgroup WGPUSurfaceCapabilitiesMethods WGPUSurfaceCapabilities methods * \brief Functions whose first argument has type WGPUSurfaceCapabilities. * * @{ */ /** * Frees members which were allocated by the API. */ public func wgpuSurfaceCapabilitiesFreeMembers(_ surfaceCapabilities: WGPUSurfaceCapabilities) extension WGPUTextureImpl { /** * \defgroup WGPUTextureMethods WGPUTexture methods * \brief Functions whose first argument has type WGPUTexture. * * @{ */ /** * @returns * This value is @ref ReturnedWithOwnership. */ public func createView(descriptor: UnsafePointer) -> WGPUTextureView! public func destroy() public var depthOrArrayLayers: UInt32 { get } public var dimension: WGPUTextureDimension { get } public var format: WGPUTextureFormat { get } public var height: UInt32 { get } public var mipLevelCount: UInt32 { get } public var sampleCount: UInt32 { get } public var usage: WGPUTextureUsage { get } public var width: UInt32 { get } public func setLabel(label: WGPUStringView) public func addRef() public func release() } extension WGPUTextureViewImpl { /** * \defgroup WGPUTextureViewMethods WGPUTextureView methods * \brief Functions whose first argument has type WGPUTextureView. * * @{ */ public func setLabel(label: WGPUStringView) public func addRef() public func release() }