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

[SPIR-V] Fix cast elision with initializer lists #6992

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

Keenuts
Copy link
Collaborator

@Keenuts Keenuts commented Oct 30, 2024

When an a chain of casts were performed in an initializer list, only the source and destination types were considered. This means float -> uint was the same as float -> int -> uint. This however is not correct: intermediate casts can change the result.

Removing the shortcut we took solves this issue.

Fixes #6975

When an a chain of casts were performed in an initializer list,
only the source and destination types were considered.
This means float -> uint was the same as float -> int -> uint.
This however is not correct: intermediate casts can change the result.

Removing the shortcut we took solves this issue.

Fixes microsoft#6975

Signed-off-by: Nathan Gauër <[email protected]>
@Keenuts Keenuts requested a review from a team as a code owner October 30, 2024 13:38
@s-perron s-perron merged commit ac36a79 into microsoft:main Nov 1, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[SPIR-V] Incorrect float->int->uint conversion behavior
3 participants