-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[WebGPU] explicit layouts should be validated for compatibility with the shader #36284
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
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
mwyrzykowski:eng/WebGPU-explicit-layouts-should-be-validated-for-compatibility-with-the-shader
Nov 11, 2024
Merged
Conversation
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
Contributor
EWS run on previous version of this PR (hash 4f9613a) |
djg
approved these changes
Nov 7, 2024
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.
4f9613a
to
8ba74e8
Compare
EWS run on current version of this PR (hash 8ba74e8) |
…the shader https://bugs.webkit.org/show_bug.cgi?id=282710 rdar://138847403 Reviewed by Dan Glastonbury. There is a bug in our validation code that checks the compatibility between the variables used by the shader and the bind group provided via the API, and it happens in two steps: - first, we start by traversing the API-provided bind group we check if the shader contains a variable for that group/binding pair. Here we incorrectly check against all the variables in the shader, but we should only consider the variables that are actually used, since it's valid to have multiple variables with the same binding, so long as they are not used by the same entry point. - the second part of the code is actually correct, where we only validate the used variables against the bind group. However, since we incorrectly selected an unused variable to be serialized in the previous step, that variable is never, allowing a type mismatch between the generated shader and the bind group. * LayoutTests/fast/webgpu/nocrash/fuzz-282710-expected.txt: Added. * LayoutTests/fast/webgpu/nocrash/fuzz-282710.html: Added. * Source/WebGPU/WGSL/GlobalVariableRewriter.cpp: (WGSL::RewriteGlobalVariables::insertStructs): Canonical link: https://commits.webkit.org/286432@main
8ba74e8
to
646adca
Compare
Committed 286432@main (646adca): https://commits.webkit.org/286432@main Reviewed commits have been landed. Closing PR #36284 and removing active labels. |
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.
646adca
8ba74e8
🛠 wpe-cairo