Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

[spv-in] Cast int comparisons arguments #1471

Merged
merged 1 commit into from
Oct 24, 2021

Conversation

JCapucho
Copy link
Collaborator

Operations like OpUGreaterThan accept arguments as long as they are integers
(signedness doesn't matter) but they must be interpreted as Uints.

Currently naga doesn't handle this and can cause issues with validation. This PR fixes it by casting them to the appropriate scalar kind.

Operations like `OpUGreaterThan` accept arguments as long as they are integers
(signedness doesn't matter) but they must be interpreted as `Uint`s.
@JCapucho
Copy link
Collaborator Author

Seems like something changed in the float display behavior making it use the scientific notation and clippy has a false positive rust-lang/rust-clippy#7579.

How should we proceed about these?

Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

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

well done!

@kvark
Copy link
Member

kvark commented Oct 24, 2021

I'm on latest Rust, and I don't see this test error, strangely :/

@kvark kvark merged commit 044fc1b into gfx-rs:master Oct 24, 2021
@JCapucho
Copy link
Collaborator Author

This seems to be a nightly only issue, I needed to do

cargo +nightly clippy --all-features

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants