Skip to content

Conversation

beaufortfrancois
Copy link
Contributor

Following #5217 (comment) and #5217 (comment), this PR adds validation changes to the texture component swizzle proposal.

@beaufortfrancois
Copy link
Contributor Author

@Kangz Please review.

Copy link
Contributor

github-actions bot commented Jul 17, 2025

Previews, as seen when this build job started (e0f841a):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt


## Validation

A validation error happens if the swizzle is not the default and the `"texture-component-swizzle"` feature is enabled.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this is what the group previously agreed to. If we add new things to the IDL, passing incorrect values in it will result in errors if the feature is not enabled. This is the same as when a new IDL dictionary member is added and JS code that happened to use it previously might start getting a TypeError.

Copy link
Contributor Author

@beaufortfrancois beaufortfrancois Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant "the "texture-component-swizzle" feature is not enabled" sorry

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll wait for the group to discuss and approve #5264 before merging.

@beaufortfrancois beaufortfrancois merged commit 523c37a into gpuweb:main Aug 4, 2025
4 checks passed
aarongable pushed a commit to chromium/chromium that referenced this pull request Aug 5, 2025
This CL makes sure a validation error happens if the swizzle is not the
default and the `"texture-component-swizzle"` feature is not enabled.
Before, the validation error would occur for all types of swizzle when
the feature would be disabled.

Spec PR: gpuweb/gpuweb#5252
Bug: 414312052

Change-Id: I460ab817584356acb96bb2e1c1ddd0c1577997a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6818591
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Fr <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1496924}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants