Skip to content
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

[WGSL] Validate swizzle beyond vector size #14333

Conversation

tadeuzagallo
Copy link
Member

@tadeuzagallo tadeuzagallo commented May 25, 2023

2a1f4cd

[WGSL] Validate swizzle beyond vector size
https://bugs.webkit.org/show_bug.cgi?id=257311
rdar://109819140

Reviewed by Mike Wyrzykowski.

We should validate that the vector swizzle member is within bounds, i.e. it's
invalid to use vec2.(z|w|b|a) and vec3.(w|a)

* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::vectorFieldAccess):
* Source/WebGPU/WGSL/tests/invalid/vector.wgsl:

Canonical link: https://commits.webkit.org/264563@main

4c7fa53

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
❌ πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@tadeuzagallo tadeuzagallo self-assigned this May 25, 2023
@tadeuzagallo tadeuzagallo added the WebGPU For bugs in WebGPU label May 25, 2023
@tadeuzagallo tadeuzagallo added the merge-queue Applied to send a pull request to merge-queue label May 26, 2023
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WGSL-Validate-swizzle-beyond-vector-size branch from 4c7fa53 to 4cae2a4 Compare May 26, 2023 06:54
https://bugs.webkit.org/show_bug.cgi?id=257311
rdar://109819140

Reviewed by Mike Wyrzykowski.

We should validate that the vector swizzle member is within bounds, i.e. it's
invalid to use vec2.(z|w|b|a) and vec3.(w|a)

* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::vectorFieldAccess):
* Source/WebGPU/WGSL/tests/invalid/vector.wgsl:

Canonical link: https://commits.webkit.org/264563@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WGSL-Validate-swizzle-beyond-vector-size branch from 4cae2a4 to 2a1f4cd Compare May 26, 2023 06:57
@webkit-commit-queue
Copy link
Collaborator

Committed 264563@main (2a1f4cd): https://commits.webkit.org/264563@main

Reviewed commits have been landed. Closing PR #14333 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 2a1f4cd into WebKit:main May 26, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGPU For bugs in WebGPU
Projects
None yet
4 participants