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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Extensions #482
Docs: Extensions #482
Changes from 1 commit
1858900
d88b240
bb149de
5536eb1
d1e646f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a question buried here which I noticed in #417 and then completely forgot about.
Ugh. Can't keep track of all this minutiae.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cwfitzgerald any thoughts? (no rush, I'm ~out until Jan)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe stupid question... but would it be possible to just renumber an enum if it gets promoted? Would that be a breaking change? (I guess it COULD be if someone is using the actual value of the enum or if we have different header versions in a wire situation?) I'm just wondering how much breakage it could cause and whether we could just promote them and say here that we may do that so don't rely on the actual value of the enums.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could say that the value is not API stable, but for ABI stability, we can't just renumber. We can do it if we reserve and implement both the old and new numbers (even though only one is in any given version of the header) but that's kinda obtuse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok makes sense! Though honestly, the more than one number thing doesn't sound TOO bad IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the problem here is lack of prefixing. If it were
WGPUSType_DawnNewThing = 0x0005_0004
we could easily duplicate it asWGPUSType_NewThing = 0x0000_00A3
. But since these are unprefixed we can't duplicate, we can only renumber. But the implementation still needs to handle old numbers that now have no name. We could give them a name with something like:WGPUSType_NewThing = 0x0001_0004
->
WGPUSType_NewThing = 0x0000_00A3
WGPUSType_OldNameForNewThing = 0x0001_0004
... but I think that's worse than the other two options:
Ext
) and remove it when making core (which has a questionable benefit of being able to change the behavior when making it core, though I would avoid doing that)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ ... or what would happen by default if we didn't change anything:
Actually thinking about the scenario in which this actually happens, it would have to be a multi-vendor extension (meaning we standardized it) which we initially thought would be optional but later became required. I think the most likely case of this is something that's multi-vendor, but we're not sure it's going to show up in the JS API, and then it does. (Like, if the JS API got SPIR-V support somehow, or we decided it was critical to polyfill, then WGPUShaderSourceSPIRV could become required.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #490