De-register Compat enum namespace#584
Open
kainino0x wants to merge 1 commit intowebgpu-native:mainfrom
Open
Conversation
There are only two compat extensions (CompatibilityModeLimits and textureBindingViewDimension). Only one of them (textureBindingViewDimension) is input-only and can possibly take advantage of this mechanism. So instead of having a special carveout for all Compat extensions, we just need one carveout for the SType for textureBindingViewDimension. As far as I know, no one has implemented this special carveout (most or all current implementations want to support Compat), but to be safe we just say the 0x0002 block is never to be used for anything.
kainino0x
added a commit
to beaufortfrancois/webgpu-headers
that referenced
this pull request
Feb 20, 2026
Kangz
reviewed
Feb 22, 2026
| | Standard | (none) | `0x0000_????` | Extensions standardized in webgpu.h | ||
| | Compatibility Mode | *TBD* | `0x0002_????` | **Special:** implementations that don't support Compatibility Mode must ignore any chained structs with @ref WGPUSType values in this block, instead of erroring. This block must only be used for Compat additions that can be ignored without affecting the semantics of a non-erroring program. | ||
| | *(Reserved)* | - | `0x0001_????` | Reserved for future use | ||
| | *(Not used)* | - | `0x0002_????` | Do not use this block (historical) |
Collaborator
There was a problem hiding this comment.
Maybe we could just mark it as reserved since noone used it before?
lokokung
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are only two compat extensions (CompatibilityModeLimits and textureBindingViewDimension). Only one of them
(textureBindingViewDimension) is input-only and can possibly take advantage of this mechanism.
So instead of having a special carveout for all Compat extensions, we just need one carveout for the SType for textureBindingViewDimension.
As far as I know, no one has implemented this special carveout (most or all current implementations want to support Compat), but to be safe just say the 0x0002 block is never to be used for anything.
Fixed #547
CC #470