Open
Conversation
Test that the lhs is evaluated before the rhs in a compound assignment statement.
Test that the lhs swizzle's vector pointer is evaluated before the rhs, and that it's value as a swizzle is loaded before rhs. Then check that it is re-loaded after rhs evaluation for use in the store of the whole swizzle assignment vector, because side effects from the rhs on non-swizzled components should persist.
|
Results for build job (at a72a5dd): +webgpu:shader,execution,statement,swizzle_assignment:eval_order:* - 1 cases, 1 subcases (~1/case)
+webgpu:shader,execution,statement,swizzle_assignment:compound_eval_order:* - 1 cases, 1 subcases (~1/case)
-TOTAL: 280593 cases, 2321592 subcases
+TOTAL: 280595 cases, 2321594 subcases |
copybara-service bot
pushed a commit
to google/dawn
that referenced
this pull request
Feb 28, 2026
Fix the order of evaluation for swizzle assignment so the lhs vector pointer is evaluated before the right hand side. Note that for the case of a compound swizzle assignment, the lhs is loaded twice, to account for the fact that the lhs may be modified in the evaluation of the rhs. CTS: gpuweb/cts#4608 Fixes: 486839102 Change-Id: I1ca154b23938eebfc02ad8b29e55343aa12bdc01 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/293835 Commit-Queue: Natalie Chouinard <chouinard@google.com> Reviewed-by: James Price <jrprice@google.com>
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.
Test that the lhs swizzle's vector pointer is evaluated before the rhs. For a regular assignment, the vector value can be loaded after rhs evaluation (because rhs side effects on the target components will be overwritten anyways). However for a compound assignment, the lhs value of the swizzle must be loaded before rhs evaluation, and the vector should be re-loaded after rhs evaluation for use as the "old components" in the store of the whole result vector, because side effects from the rhs on non-swizzled components should persist.
Requirements for PR author:
.unimplemented()./** documented */and new helper files are found inhelper_index.txt.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.