From 6fb84070794425533f3e4708092fcd3b1ca61bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Fri, 13 Feb 2026 13:31:18 +0100 Subject: [PATCH 1/4] Add textureBindingViewDimension and compat limits --- webgpu.h | 525 +++++++++++++++++++++++++++++----------------------- webgpu.json | 49 +++++ webgpu.yml | 38 ++++ 3 files changed, 380 insertions(+), 232 deletions(-) diff --git a/webgpu.h b/webgpu.h index e7436e9..523f671 100644 --- a/webgpu.h +++ b/webgpu.h @@ -260,6 +260,7 @@ struct WGPUBufferDescriptor; struct WGPUColor; struct WGPUCommandBufferDescriptor; struct WGPUCommandEncoderDescriptor; +struct WGPUCompatibilityModeLimits; struct WGPUCompilationMessage; struct WGPUConstantEntry; struct WGPUExtent3D; @@ -267,7 +268,6 @@ struct WGPUExternalTextureBindingEntry; struct WGPUExternalTextureBindingLayout; struct WGPUFuture; struct WGPUInstanceLimits; -struct WGPULimits; struct WGPUMultisampleState; struct WGPUOrigin3D; struct WGPUPassTimestampWrites; @@ -301,6 +301,7 @@ struct WGPUSurfaceSourceXlibWindow; struct WGPUSurfaceTexture; struct WGPUTexelCopyBufferLayout; struct WGPUTextureBindingLayout; +struct WGPUTextureBindingViewDimensionDescriptor; struct WGPUTextureComponentSwizzle; struct WGPUTextureViewDescriptor; struct WGPUVertexAttribute; @@ -311,9 +312,9 @@ struct WGPUCompilationInfo; struct WGPUComputePassDescriptor; struct WGPUComputeState; struct WGPUDepthStencilState; -struct WGPUDeviceDescriptor; struct WGPUFutureWaitInfo; struct WGPUInstanceDescriptor; +struct WGPULimits; struct WGPURenderPassColorAttachment; struct WGPURequestAdapterOptions; struct WGPUShaderModuleDescriptor; @@ -327,6 +328,7 @@ struct WGPUBindGroupDescriptor; struct WGPUBindGroupLayoutDescriptor; struct WGPUColorTargetState; struct WGPUComputePipelineDescriptor; +struct WGPUDeviceDescriptor; struct WGPURenderPassDescriptor; struct WGPUVertexState; struct WGPUFragmentState; @@ -2017,6 +2019,43 @@ typedef struct WGPUCommandEncoderDescriptor { /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \ }) +/** + * Default values can be set using @ref WGPU_COMPATIBILITY_MODE_LIMITS_INIT as initializer. + */ +typedef struct WGPUCompatibilityModeLimits { + WGPUChainedStruct chain; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxStorageBuffersInVertexStage; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxStorageTexturesInVertexStage; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxStorageBuffersInFragmentStage; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxStorageTexturesInFragmentStage; +} WGPUCompatibilityModeLimits WGPU_STRUCTURE_ATTRIBUTE; + +/** + * Initializer for @ref WGPUCompatibilityModeLimits. + */ +#define WGPU_COMPATIBILITY_MODE_LIMITS_INIT _wgpu_MAKE_INIT_STRUCT(WGPUCompatibilityModeLimits, { \ + /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \ + /*.next=*/NULL _wgpu_COMMA \ + /*.sType=*/WGPUSType_CompatibilityModeLimits _wgpu_COMMA \ + }) _wgpu_COMMA \ + /*.maxStorageBuffersInVertexStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxStorageTexturesInVertexStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxStorageBuffersInFragmentStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxStorageTexturesInFragmentStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ +}) + /** * This is an @ref ImplementationAllocatedStructChain root. * Arbitrary chains must be handled gracefully by the application! @@ -2220,180 +2259,6 @@ typedef struct WGPUInstanceLimits { /*.timedWaitAnyMaxCount=*/0 _wgpu_COMMA \ }) -/** - * Default values can be set using @ref WGPU_LIMITS_INIT as initializer. - */ -typedef struct WGPULimits { - WGPUChainedStruct * nextInChain; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxTextureDimension1D; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxTextureDimension2D; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxTextureDimension3D; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxTextureArrayLayers; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxBindGroups; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxBindGroupsPlusVertexBuffers; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxBindingsPerBindGroup; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxDynamicUniformBuffersPerPipelineLayout; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxDynamicStorageBuffersPerPipelineLayout; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxSampledTexturesPerShaderStage; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxSamplersPerShaderStage; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxStorageBuffersPerShaderStage; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxStorageTexturesPerShaderStage; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxUniformBuffersPerShaderStage; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U64_UNDEFINED. - */ - uint64_t maxUniformBufferBindingSize; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U64_UNDEFINED. - */ - uint64_t maxStorageBufferBindingSize; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t minUniformBufferOffsetAlignment; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t minStorageBufferOffsetAlignment; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxVertexBuffers; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U64_UNDEFINED. - */ - uint64_t maxBufferSize; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxVertexAttributes; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxVertexBufferArrayStride; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxInterStageShaderVariables; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxColorAttachments; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxColorAttachmentBytesPerSample; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxComputeWorkgroupStorageSize; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxComputeInvocationsPerWorkgroup; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxComputeWorkgroupSizeX; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxComputeWorkgroupSizeY; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxComputeWorkgroupSizeZ; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxComputeWorkgroupsPerDimension; - /** - * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. - */ - uint32_t maxImmediateSize; -} WGPULimits WGPU_STRUCTURE_ATTRIBUTE; - -/** - * Initializer for @ref WGPULimits. - */ -#define WGPU_LIMITS_INIT _wgpu_MAKE_INIT_STRUCT(WGPULimits, { \ - /*.nextInChain=*/NULL _wgpu_COMMA \ - /*.maxTextureDimension1D=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxTextureDimension2D=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxTextureDimension3D=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxTextureArrayLayers=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxBindGroups=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxBindGroupsPlusVertexBuffers=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxBindingsPerBindGroup=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxDynamicUniformBuffersPerPipelineLayout=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxDynamicStorageBuffersPerPipelineLayout=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxSampledTexturesPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxSamplersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxStorageBuffersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxStorageTexturesPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxUniformBuffersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxUniformBufferBindingSize=*/WGPU_LIMIT_U64_UNDEFINED _wgpu_COMMA \ - /*.maxStorageBufferBindingSize=*/WGPU_LIMIT_U64_UNDEFINED _wgpu_COMMA \ - /*.minUniformBufferOffsetAlignment=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.minStorageBufferOffsetAlignment=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxVertexBuffers=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxBufferSize=*/WGPU_LIMIT_U64_UNDEFINED _wgpu_COMMA \ - /*.maxVertexAttributes=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxVertexBufferArrayStride=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxInterStageShaderVariables=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxColorAttachments=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxColorAttachmentBytesPerSample=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxComputeWorkgroupStorageSize=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxComputeInvocationsPerWorkgroup=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxComputeWorkgroupSizeX=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxComputeWorkgroupSizeY=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxComputeWorkgroupSizeZ=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxComputeWorkgroupsPerDimension=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ - /*.maxImmediateSize=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ -}) - /** * Default values can be set using @ref WGPU_MULTISAMPLE_STATE_INIT as initializer. */ @@ -3573,6 +3438,28 @@ typedef struct WGPUTextureBindingLayout { /*.multisampled=*/WGPU_FALSE _wgpu_COMMA \ }) +/** + * Default values can be set using @ref WGPU_TEXTURE_BINDING_VIEW_DIMENSION_DESCRIPTOR_INIT as initializer. + */ +typedef struct WGPUTextureBindingViewDimensionDescriptor { + WGPUChainedStruct chain; + /** + * The `INIT` macro sets this to @ref WGPUTextureViewDimension_Undefined. + */ + WGPUTextureViewDimension textureBindingViewDimension; +} WGPUTextureBindingViewDimensionDescriptor WGPU_STRUCTURE_ATTRIBUTE; + +/** + * Initializer for @ref WGPUTextureBindingViewDimensionDescriptor. + */ +#define WGPU_TEXTURE_BINDING_VIEW_DIMENSION_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureBindingViewDimensionDescriptor, { \ + /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \ + /*.next=*/NULL _wgpu_COMMA \ + /*.sType=*/WGPUSType_TextureBindingViewDimensionDescriptor _wgpu_COMMA \ + }) _wgpu_COMMA \ + /*.textureBindingViewDimension=*/WGPUTextureViewDimension_Undefined _wgpu_COMMA \ +}) + /** * When accessed by a shader, the red/green/blue/alpha channels are replaced * by the value corresponding to the component specified in r, g, b, and a, @@ -4019,62 +3906,6 @@ typedef struct WGPUDepthStencilState { /*.depthBiasClamp=*/0.f _wgpu_COMMA \ }) -/** - * Default values can be set using @ref WGPU_DEVICE_DESCRIPTOR_INIT as initializer. - */ -typedef struct WGPUDeviceDescriptor { - WGPUChainedStruct * nextInChain; - /** - * This is a \ref NonNullInputString. - * - * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. - */ - WGPUStringView label; - /** - * Array count for `requiredFeatures`. The `INIT` macro sets this to 0. - */ - size_t requiredFeatureCount; - /** - * The `INIT` macro sets this to `NULL`. - */ - WGPUFeatureName const * requiredFeatures; - /** - * The `INIT` macro sets this to `NULL`. - */ - WGPU_NULLABLE WGPULimits const * requiredLimits; - /** - * The `INIT` macro sets this to @ref WGPU_QUEUE_DESCRIPTOR_INIT. - */ - WGPUQueueDescriptor defaultQueue; - /** - * The `INIT` macro sets this to @ref WGPU_DEVICE_LOST_CALLBACK_INFO_INIT. - */ - WGPUDeviceLostCallbackInfo deviceLostCallbackInfo; - /** - * 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. - */ - WGPUUncapturedErrorCallbackInfo uncapturedErrorCallbackInfo; -} WGPUDeviceDescriptor WGPU_STRUCTURE_ATTRIBUTE; - -/** - * Initializer for @ref WGPUDeviceDescriptor. - */ -#define WGPU_DEVICE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDeviceDescriptor, { \ - /*.nextInChain=*/NULL _wgpu_COMMA \ - /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \ - /*.requiredFeatureCount=*/0 _wgpu_COMMA \ - /*.requiredFeatures=*/NULL _wgpu_COMMA \ - /*.requiredLimits=*/NULL _wgpu_COMMA \ - /*.defaultQueue=*/WGPU_QUEUE_DESCRIPTOR_INIT _wgpu_COMMA \ - /*.deviceLostCallbackInfo=*/WGPU_DEVICE_LOST_CALLBACK_INFO_INIT _wgpu_COMMA \ - /*.uncapturedErrorCallbackInfo=*/WGPU_UNCAPTURED_ERROR_CALLBACK_INFO_INIT _wgpu_COMMA \ -}) - /** * Struct holding a future to wait on, and a `completed` boolean flag. * @@ -4132,6 +3963,180 @@ typedef struct WGPUInstanceDescriptor { /*.requiredLimits=*/NULL _wgpu_COMMA \ }) +/** + * Default values can be set using @ref WGPU_LIMITS_INIT as initializer. + */ +typedef struct WGPULimits { + WGPUChainedStruct * nextInChain; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxTextureDimension1D; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxTextureDimension2D; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxTextureDimension3D; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxTextureArrayLayers; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxBindGroups; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxBindGroupsPlusVertexBuffers; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxBindingsPerBindGroup; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxDynamicUniformBuffersPerPipelineLayout; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxDynamicStorageBuffersPerPipelineLayout; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxSampledTexturesPerShaderStage; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxSamplersPerShaderStage; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxStorageBuffersPerShaderStage; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxStorageTexturesPerShaderStage; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxUniformBuffersPerShaderStage; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U64_UNDEFINED. + */ + uint64_t maxUniformBufferBindingSize; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U64_UNDEFINED. + */ + uint64_t maxStorageBufferBindingSize; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t minUniformBufferOffsetAlignment; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t minStorageBufferOffsetAlignment; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxVertexBuffers; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U64_UNDEFINED. + */ + uint64_t maxBufferSize; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxVertexAttributes; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxVertexBufferArrayStride; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxInterStageShaderVariables; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxColorAttachments; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxColorAttachmentBytesPerSample; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxComputeWorkgroupStorageSize; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxComputeInvocationsPerWorkgroup; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxComputeWorkgroupSizeX; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxComputeWorkgroupSizeY; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxComputeWorkgroupSizeZ; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxComputeWorkgroupsPerDimension; + /** + * The `INIT` macro sets this to @ref WGPU_LIMIT_U32_UNDEFINED. + */ + uint32_t maxImmediateSize; +} WGPULimits WGPU_STRUCTURE_ATTRIBUTE; + +/** + * Initializer for @ref WGPULimits. + */ +#define WGPU_LIMITS_INIT _wgpu_MAKE_INIT_STRUCT(WGPULimits, { \ + /*.nextInChain=*/NULL _wgpu_COMMA \ + /*.maxTextureDimension1D=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxTextureDimension2D=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxTextureDimension3D=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxTextureArrayLayers=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxBindGroups=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxBindGroupsPlusVertexBuffers=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxBindingsPerBindGroup=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxDynamicUniformBuffersPerPipelineLayout=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxDynamicStorageBuffersPerPipelineLayout=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxSampledTexturesPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxSamplersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxStorageBuffersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxStorageTexturesPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxUniformBuffersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxUniformBufferBindingSize=*/WGPU_LIMIT_U64_UNDEFINED _wgpu_COMMA \ + /*.maxStorageBufferBindingSize=*/WGPU_LIMIT_U64_UNDEFINED _wgpu_COMMA \ + /*.minUniformBufferOffsetAlignment=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.minStorageBufferOffsetAlignment=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxVertexBuffers=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxBufferSize=*/WGPU_LIMIT_U64_UNDEFINED _wgpu_COMMA \ + /*.maxVertexAttributes=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxVertexBufferArrayStride=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxInterStageShaderVariables=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxColorAttachments=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxColorAttachmentBytesPerSample=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxComputeWorkgroupStorageSize=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxComputeInvocationsPerWorkgroup=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxComputeWorkgroupSizeX=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxComputeWorkgroupSizeY=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxComputeWorkgroupSizeZ=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxComputeWorkgroupsPerDimension=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ + /*.maxImmediateSize=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \ +}) + /** * Default values can be set using @ref WGPU_RENDER_PASS_COLOR_ATTACHMENT_INIT as initializer. */ @@ -4603,6 +4608,62 @@ typedef struct WGPUComputePipelineDescriptor { /*.compute=*/WGPU_COMPUTE_STATE_INIT _wgpu_COMMA \ }) +/** + * Default values can be set using @ref WGPU_DEVICE_DESCRIPTOR_INIT as initializer. + */ +typedef struct WGPUDeviceDescriptor { + WGPUChainedStruct * nextInChain; + /** + * This is a \ref NonNullInputString. + * + * The `INIT` macro sets this to @ref WGPU_STRING_VIEW_INIT. + */ + WGPUStringView label; + /** + * Array count for `requiredFeatures`. The `INIT` macro sets this to 0. + */ + size_t requiredFeatureCount; + /** + * The `INIT` macro sets this to `NULL`. + */ + WGPUFeatureName const * requiredFeatures; + /** + * The `INIT` macro sets this to `NULL`. + */ + WGPU_NULLABLE WGPULimits const * requiredLimits; + /** + * The `INIT` macro sets this to @ref WGPU_QUEUE_DESCRIPTOR_INIT. + */ + WGPUQueueDescriptor defaultQueue; + /** + * The `INIT` macro sets this to @ref WGPU_DEVICE_LOST_CALLBACK_INFO_INIT. + */ + WGPUDeviceLostCallbackInfo deviceLostCallbackInfo; + /** + * 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. + */ + WGPUUncapturedErrorCallbackInfo uncapturedErrorCallbackInfo; +} WGPUDeviceDescriptor WGPU_STRUCTURE_ATTRIBUTE; + +/** + * Initializer for @ref WGPUDeviceDescriptor. + */ +#define WGPU_DEVICE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDeviceDescriptor, { \ + /*.nextInChain=*/NULL _wgpu_COMMA \ + /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \ + /*.requiredFeatureCount=*/0 _wgpu_COMMA \ + /*.requiredFeatures=*/NULL _wgpu_COMMA \ + /*.requiredLimits=*/NULL _wgpu_COMMA \ + /*.defaultQueue=*/WGPU_QUEUE_DESCRIPTOR_INIT _wgpu_COMMA \ + /*.deviceLostCallbackInfo=*/WGPU_DEVICE_LOST_CALLBACK_INFO_INIT _wgpu_COMMA \ + /*.uncapturedErrorCallbackInfo=*/WGPU_UNCAPTURED_ERROR_CALLBACK_INFO_INIT _wgpu_COMMA \ +}) + /** * Default values can be set using @ref WGPU_RENDER_PASS_DESCRIPTOR_INIT as initializer. */ diff --git a/webgpu.json b/webgpu.json index 2d4c9e2..0642748 100644 --- a/webgpu.json +++ b/webgpu.json @@ -5026,6 +5026,40 @@ "name": "command_encoder_descriptor", "type": "extensible" }, + { + "doc": "TODO\n", + "extends": [ + "limits" + ], + "members": [ + { + "default": "constant.limit_u32_undefined", + "doc": "TODO\n", + "name": "max_storage_buffers_in_vertex_stage", + "type": "uint32" + }, + { + "default": "constant.limit_u32_undefined", + "doc": "TODO\n", + "name": "max_storage_textures_in_vertex_stage", + "type": "uint32" + }, + { + "default": "constant.limit_u32_undefined", + "doc": "TODO\n", + "name": "max_storage_buffers_in_fragment_stage", + "type": "uint32" + }, + { + "default": "constant.limit_u32_undefined", + "doc": "TODO\n", + "name": "max_storage_textures_in_fragment_stage", + "type": "uint32" + } + ], + "name": "compatibility_mode_limits", + "type": "extension" + }, { "doc": "TODO\n", "members": [ @@ -6615,6 +6649,21 @@ "name": "texture_binding_layout", "type": "extensible" }, + { + "doc": "TODO\n", + "extends": [ + "texture_descriptor" + ], + "members": [ + { + "doc": "TODO\n", + "name": "texture_binding_view_dimension", + "type": "enum.texture_view_dimension" + } + ], + "name": "texture_binding_view_dimension_descriptor", + "type": "extension" + }, { "doc": "When accessed by a shader, the red/green/blue/alpha channels are replaced\nby the value corresponding to the component specified in r, g, b, and a,\nrespectively unlike the JS API which uses a string of length four, with\neach character mapping to the texture view's red/green/blue/alpha channels.\n", "members": [ diff --git a/webgpu.yml b/webgpu.yml index f1663fa..fc4fa89 100644 --- a/webgpu.yml +++ b/webgpu.yml @@ -1945,6 +1945,33 @@ structs: doc: | TODO type: string_with_default_empty + - name: compatibility_mode_limits + doc: | + TODO + type: extension + extends: + - limits + members: + - name: max_storage_buffers_in_vertex_stage + doc: | + TODO + type: uint32 + default: constant.limit_u32_undefined + - name: max_storage_textures_in_vertex_stage + doc: | + TODO + type: uint32 + default: constant.limit_u32_undefined + - name: max_storage_buffers_in_fragment_stage + doc: | + TODO + type: uint32 + default: constant.limit_u32_undefined + - name: max_storage_textures_in_fragment_stage + doc: | + TODO + type: uint32 + default: constant.limit_u32_undefined - name: compilation_info doc: | TODO @@ -3228,6 +3255,17 @@ structs: TODO type: bool default: false + - name: texture_binding_view_dimension_descriptor + doc: | + TODO + type: extension + extends: + - texture_descriptor + members: + - name: texture_binding_view_dimension + doc: | + TODO + type: enum.texture_view_dimension - name: texture_component_swizzle doc: | When accessed by a shader, the red/green/blue/alpha channels are replaced From afba5c50bd02f4cfc9fb8c9f0cfa077eb35b884c Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Sat, 14 Feb 2026 02:28:42 -0800 Subject: [PATCH 2/4] WIP name/namespacing tweaks (requires #583) --- webgpu.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/webgpu.yml b/webgpu.yml index fc4fa89..1b5d3b7 100644 --- a/webgpu.yml +++ b/webgpu.yml @@ -826,6 +826,15 @@ enums: - name: external_texture_binding_entry doc: | TODO + - name: compatibility_mode_limits + doc: | + TODO + # Prefixed entries below this point + - name: texture_binding_view_dimension + namespace: compatibility_mode + value: 0 + doc: | + TODO - name: sampler_binding_type doc: | TODO @@ -1947,7 +1956,12 @@ structs: type: string_with_default_empty - name: compatibility_mode_limits doc: | - TODO + Limits that are only used in Compatibility Mode. + + Note: This is *not* a @ref CompatibilityModeExtension; its SType is in the + core namespace. It is meant to be supported as both an input and output by + all implementations (even those which don't implement Compatibility Mode), + behaving as described in the WebGPU specification. type: extension extends: - limits @@ -3255,9 +3269,9 @@ structs: TODO type: bool default: false - - name: texture_binding_view_dimension_descriptor + - name: texture_binding_view_dimension doc: | - TODO + This is a @ref CompatibilityModeExtension. type: extension extends: - texture_descriptor From ff4821820b8d3cc507c273e455cb3a4c140851c6 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Thu, 19 Feb 2026 22:33:51 -0800 Subject: [PATCH 3/4] regenerate --- tests/compile/init_tests_autogen.inl | 6 ++++-- webgpu.h | 25 ++++++++++++++++++------- webgpu.json | 16 +++++++++++++--- 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/tests/compile/init_tests_autogen.inl b/tests/compile/init_tests_autogen.inl index 0338262..cc2287e 100644 --- a/tests/compile/init_tests_autogen.inl +++ b/tests/compile/init_tests_autogen.inl @@ -16,6 +16,7 @@ { WGPUColor x = WGPU_COLOR_INIT; } { WGPUCommandBufferDescriptor x = WGPU_COMMAND_BUFFER_DESCRIPTOR_INIT; } { WGPUCommandEncoderDescriptor x = WGPU_COMMAND_ENCODER_DESCRIPTOR_INIT; } +{ WGPUCompatibilityModeLimits x = WGPU_COMPATIBILITY_MODE_LIMITS_INIT; } { WGPUCompilationMessage x = WGPU_COMPILATION_MESSAGE_INIT; } { WGPUConstantEntry x = WGPU_CONSTANT_ENTRY_INIT; } { WGPUExtent3D x = WGPU_EXTENT_3D_INIT; } @@ -23,7 +24,6 @@ { WGPUExternalTextureBindingLayout x = WGPU_EXTERNAL_TEXTURE_BINDING_LAYOUT_INIT; } { WGPUFuture x = WGPU_FUTURE_INIT; } { WGPUInstanceLimits x = WGPU_INSTANCE_LIMITS_INIT; } -{ WGPULimits x = WGPU_LIMITS_INIT; } { WGPUMultisampleState x = WGPU_MULTISAMPLE_STATE_INIT; } { WGPUOrigin3D x = WGPU_ORIGIN_3D_INIT; } { WGPUPassTimestampWrites x = WGPU_PASS_TIMESTAMP_WRITES_INIT; } @@ -57,6 +57,7 @@ { WGPUSurfaceTexture x = WGPU_SURFACE_TEXTURE_INIT; } { WGPUTexelCopyBufferLayout x = WGPU_TEXEL_COPY_BUFFER_LAYOUT_INIT; } { WGPUTextureBindingLayout x = WGPU_TEXTURE_BINDING_LAYOUT_INIT; } +{ WGPUTextureBindingViewDimension x = WGPU_TEXTURE_BINDING_VIEW_DIMENSION_INIT; } { WGPUTextureComponentSwizzle x = WGPU_TEXTURE_COMPONENT_SWIZZLE_INIT; } { WGPUTextureViewDescriptor x = WGPU_TEXTURE_VIEW_DESCRIPTOR_INIT; } { WGPUVertexAttribute x = WGPU_VERTEX_ATTRIBUTE_INIT; } @@ -67,9 +68,9 @@ { WGPUComputePassDescriptor x = WGPU_COMPUTE_PASS_DESCRIPTOR_INIT; } { WGPUComputeState x = WGPU_COMPUTE_STATE_INIT; } { WGPUDepthStencilState x = WGPU_DEPTH_STENCIL_STATE_INIT; } -{ WGPUDeviceDescriptor x = WGPU_DEVICE_DESCRIPTOR_INIT; } { WGPUFutureWaitInfo x = WGPU_FUTURE_WAIT_INFO_INIT; } { WGPUInstanceDescriptor x = WGPU_INSTANCE_DESCRIPTOR_INIT; } +{ WGPULimits x = WGPU_LIMITS_INIT; } { WGPURenderPassColorAttachment x = WGPU_RENDER_PASS_COLOR_ATTACHMENT_INIT; } { WGPURequestAdapterOptions x = WGPU_REQUEST_ADAPTER_OPTIONS_INIT; } { WGPUShaderModuleDescriptor x = WGPU_SHADER_MODULE_DESCRIPTOR_INIT; } @@ -83,6 +84,7 @@ { WGPUBindGroupLayoutDescriptor x = WGPU_BIND_GROUP_LAYOUT_DESCRIPTOR_INIT; } { WGPUColorTargetState x = WGPU_COLOR_TARGET_STATE_INIT; } { WGPUComputePipelineDescriptor x = WGPU_COMPUTE_PIPELINE_DESCRIPTOR_INIT; } +{ WGPUDeviceDescriptor x = WGPU_DEVICE_DESCRIPTOR_INIT; } { WGPURenderPassDescriptor x = WGPU_RENDER_PASS_DESCRIPTOR_INIT; } { WGPUVertexState x = WGPU_VERTEX_STATE_INIT; } { WGPUFragmentState x = WGPU_FRAGMENT_STATE_INIT; } diff --git a/webgpu.h b/webgpu.h index 523f671..08875ce 100644 --- a/webgpu.h +++ b/webgpu.h @@ -301,7 +301,7 @@ struct WGPUSurfaceSourceXlibWindow; struct WGPUSurfaceTexture; struct WGPUTexelCopyBufferLayout; struct WGPUTextureBindingLayout; -struct WGPUTextureBindingViewDimensionDescriptor; +struct WGPUTextureBindingViewDimension; struct WGPUTextureComponentSwizzle; struct WGPUTextureViewDescriptor; struct WGPUVertexAttribute; @@ -960,6 +960,8 @@ typedef enum WGPUSType { WGPUSType_TextureComponentSwizzleDescriptor = 0x0000000C, WGPUSType_ExternalTextureBindingLayout = 0x0000000D, WGPUSType_ExternalTextureBindingEntry = 0x0000000E, + WGPUSType_CompatibilityModeLimits = 0x0000000F, + WGPUSType_TextureBindingViewDimension = 0x20000000, WGPUSType_Force32 = 0x7FFFFFFF } WGPUSType WGPU_ENUM_ATTRIBUTE; @@ -2020,6 +2022,13 @@ typedef struct WGPUCommandEncoderDescriptor { }) /** + * Limits that are only used in Compatibility Mode. + * + * Note: This is *not* a @ref CompatibilityModeExtension; its SType is in the + * core namespace. It is meant to be supported as both an input and output by + * all implementations (even those which don't implement Compatibility Mode), + * behaving as described in the WebGPU specification. + * * Default values can be set using @ref WGPU_COMPATIBILITY_MODE_LIMITS_INIT as initializer. */ typedef struct WGPUCompatibilityModeLimits { @@ -3439,23 +3448,25 @@ typedef struct WGPUTextureBindingLayout { }) /** - * Default values can be set using @ref WGPU_TEXTURE_BINDING_VIEW_DIMENSION_DESCRIPTOR_INIT as initializer. + * This is a @ref CompatibilityModeExtension. + * + * Default values can be set using @ref WGPU_TEXTURE_BINDING_VIEW_DIMENSION_INIT as initializer. */ -typedef struct WGPUTextureBindingViewDimensionDescriptor { +typedef struct WGPUTextureBindingViewDimension { WGPUChainedStruct chain; /** * The `INIT` macro sets this to @ref WGPUTextureViewDimension_Undefined. */ WGPUTextureViewDimension textureBindingViewDimension; -} WGPUTextureBindingViewDimensionDescriptor WGPU_STRUCTURE_ATTRIBUTE; +} WGPUTextureBindingViewDimension WGPU_STRUCTURE_ATTRIBUTE; /** - * Initializer for @ref WGPUTextureBindingViewDimensionDescriptor. + * Initializer for @ref WGPUTextureBindingViewDimension. */ -#define WGPU_TEXTURE_BINDING_VIEW_DIMENSION_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureBindingViewDimensionDescriptor, { \ +#define WGPU_TEXTURE_BINDING_VIEW_DIMENSION_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureBindingViewDimension, { \ /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \ /*.next=*/NULL _wgpu_COMMA \ - /*.sType=*/WGPUSType_TextureBindingViewDimensionDescriptor _wgpu_COMMA \ + /*.sType=*/WGPUSType_TextureBindingViewDimension _wgpu_COMMA \ }) _wgpu_COMMA \ /*.textureBindingViewDimension=*/WGPUTextureViewDimension_Undefined _wgpu_COMMA \ }) diff --git a/webgpu.json b/webgpu.json index 0642748..89a9e05 100644 --- a/webgpu.json +++ b/webgpu.json @@ -1463,6 +1463,16 @@ { "doc": "TODO\n", "name": "external_texture_binding_entry" + }, + { + "doc": "TODO\n", + "name": "compatibility_mode_limits" + }, + { + "doc": "TODO\n", + "name": "texture_binding_view_dimension", + "namespace": "compatibility_mode", + "value": 0 } ], "name": "s_type" @@ -5027,7 +5037,7 @@ "type": "extensible" }, { - "doc": "TODO\n", + "doc": "Limits that are only used in Compatibility Mode.\n\nNote: This is *not* a @ref CompatibilityModeExtension; its SType is in the\ncore namespace. It is meant to be supported as both an input and output by\nall implementations (even those which don't implement Compatibility Mode),\nbehaving as described in the WebGPU specification.\n", "extends": [ "limits" ], @@ -6650,7 +6660,7 @@ "type": "extensible" }, { - "doc": "TODO\n", + "doc": "This is a @ref CompatibilityModeExtension.\n", "extends": [ "texture_descriptor" ], @@ -6661,7 +6671,7 @@ "type": "enum.texture_view_dimension" } ], - "name": "texture_binding_view_dimension_descriptor", + "name": "texture_binding_view_dimension", "type": "extension" }, { From 723aa17b4c5771c38b79013b7226585a5c9c4f7a Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Fri, 20 Feb 2026 15:11:52 -0800 Subject: [PATCH 4/4] Move TBVD to core namespace per #584 --- webgpu.h | 15 +++++++-------- webgpu.json | 8 +++----- webgpu.yml | 16 ++++++---------- 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/webgpu.h b/webgpu.h index 08875ce..37eae3e 100644 --- a/webgpu.h +++ b/webgpu.h @@ -961,7 +961,7 @@ typedef enum WGPUSType { WGPUSType_ExternalTextureBindingLayout = 0x0000000D, WGPUSType_ExternalTextureBindingEntry = 0x0000000E, WGPUSType_CompatibilityModeLimits = 0x0000000F, - WGPUSType_TextureBindingViewDimension = 0x20000000, + WGPUSType_TextureBindingViewDimension = 0x00000010, WGPUSType_Force32 = 0x7FFFFFFF } WGPUSType WGPU_ENUM_ATTRIBUTE; @@ -2022,12 +2022,9 @@ typedef struct WGPUCommandEncoderDescriptor { }) /** - * Limits that are only used in Compatibility Mode. - * - * Note: This is *not* a @ref CompatibilityModeExtension; its SType is in the - * core namespace. It is meant to be supported as both an input and output by - * all implementations (even those which don't implement Compatibility Mode), - * behaving as described in the WebGPU specification. + * Note: While Compatibility Mode is optional to implement, this extension struct + * is required to be supported (for both queries and requests) and behave as + * defined in the WebGPU spec. * * Default values can be set using @ref WGPU_COMPATIBILITY_MODE_LIMITS_INIT as initializer. */ @@ -3448,7 +3445,9 @@ typedef struct WGPUTextureBindingLayout { }) /** - * This is a @ref CompatibilityModeExtension. + * Note: While Compatibility Mode is optional to implement, this extension struct + * is required to be accepted (but per the WebGPU spec, its contents are ignored + * on devices that have the @ref WGPUFeatureName_CoreFeaturesAndLimits feature). * * Default values can be set using @ref WGPU_TEXTURE_BINDING_VIEW_DIMENSION_INIT as initializer. */ diff --git a/webgpu.json b/webgpu.json index 89a9e05..c371cb2 100644 --- a/webgpu.json +++ b/webgpu.json @@ -1470,9 +1470,7 @@ }, { "doc": "TODO\n", - "name": "texture_binding_view_dimension", - "namespace": "compatibility_mode", - "value": 0 + "name": "texture_binding_view_dimension" } ], "name": "s_type" @@ -5037,7 +5035,7 @@ "type": "extensible" }, { - "doc": "Limits that are only used in Compatibility Mode.\n\nNote: This is *not* a @ref CompatibilityModeExtension; its SType is in the\ncore namespace. It is meant to be supported as both an input and output by\nall implementations (even those which don't implement Compatibility Mode),\nbehaving as described in the WebGPU specification.\n", + "doc": "Note: While Compatibility Mode is optional to implement, this extension struct\nis required to be supported (for both queries and requests) and behave as\ndefined in the WebGPU spec.\n", "extends": [ "limits" ], @@ -6660,7 +6658,7 @@ "type": "extensible" }, { - "doc": "This is a @ref CompatibilityModeExtension.\n", + "doc": "Note: While Compatibility Mode is optional to implement, this extension struct\nis required to be accepted (but per the WebGPU spec, its contents are ignored\non devices that have the @ref WGPUFeatureName_CoreFeaturesAndLimits feature).\n", "extends": [ "texture_descriptor" ], diff --git a/webgpu.yml b/webgpu.yml index 1b5d3b7..e8ded65 100644 --- a/webgpu.yml +++ b/webgpu.yml @@ -829,10 +829,7 @@ enums: - name: compatibility_mode_limits doc: | TODO - # Prefixed entries below this point - name: texture_binding_view_dimension - namespace: compatibility_mode - value: 0 doc: | TODO - name: sampler_binding_type @@ -1956,12 +1953,9 @@ structs: type: string_with_default_empty - name: compatibility_mode_limits doc: | - Limits that are only used in Compatibility Mode. - - Note: This is *not* a @ref CompatibilityModeExtension; its SType is in the - core namespace. It is meant to be supported as both an input and output by - all implementations (even those which don't implement Compatibility Mode), - behaving as described in the WebGPU specification. + Note: While Compatibility Mode is optional to implement, this extension struct + is required to be supported (for both queries and requests) and behave as + defined in the WebGPU spec. type: extension extends: - limits @@ -3271,7 +3265,9 @@ structs: default: false - name: texture_binding_view_dimension doc: | - This is a @ref CompatibilityModeExtension. + Note: While Compatibility Mode is optional to implement, this extension struct + is required to be accepted (but per the WebGPU spec, its contents are ignored + on devices that have the @ref WGPUFeatureName_CoreFeaturesAndLimits feature). type: extension extends: - texture_descriptor