-
Notifications
You must be signed in to change notification settings - Fork 988
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
[naga] change i32 arithmetic operations to use wrapping_
instead of checked_
#6835
Merged
teoxoy
merged 5 commits into
gfx-rs:trunk
from
matthew-wong1:update-i32-multiplication-to-wrap
Jan 6, 2025
Merged
[naga] change i32 arithmetic operations to use wrapping_
instead of checked_
#6835
teoxoy
merged 5 commits into
gfx-rs:trunk
from
matthew-wong1:update-i32-multiplication-to-wrap
Jan 6, 2025
Conversation
This file contains 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
wrapping_mul
instead of checked_mul
wrapping_
instead of checked_
fec4364
to
b2dca02
Compare
I will do CTS run in servo for this, but it will take some time as I need to set baseline expectations first. |
sagudev
added a commit
to sagudev/servo
that referenced
this pull request
Dec 30, 2024
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
sagudev
added a commit
to sagudev/servo
that referenced
this pull request
Dec 30, 2024
{"fail_fast": false, "matrix": [{"name": "WebGPU CTS", "workflow": "linux", "wpt_layout": "2020", "profile": "production", "unit_tests": false, "bencher": false, "wpt_args": "_webgpu"}]}
teoxoy
approved these changes
Jan 6, 2025
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.
Thanks!
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.
Connections
Fixes #6023
Description
For arithmetic operations between two variables of type
i32
, if an overflow occurs, it is meant to wrap instead of throw an error according to the WGSL spec ("Expressions on concrete integer types that overflow produce a result that is modulo 2bitwidth")Testing
Compiled the original program detailed in #6023 (and variations for other arithemtic operations) that threw the overflow error (now overflow error free)
Checklist
cargo fmt
.taplo format
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.