-
Notifications
You must be signed in to change notification settings - Fork 692
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] Handle vectors passed to asuint #6953
Conversation
@s-perron lmk if this approach looks correct to you. If it does, I think I'll need to update dead code elimination again, since the case where a temporary variable is being used is having the |
`asuint` should be able to take vectors in addition to scalar values. Previously, it would be lowered as a bitcast from the input value to a vector of uints with a width of 2, which is not large enough if the input value is larger than a scalar value. In order to handle, for example, an input value that is a `double4`, we instead perform a component-wise bitcast. Fixes microsoft#6735
5961b83
to
7f4a6cd
Compare
✅ With the latest revision this PR passed the C/C++ code formatter. |
7f4a6cd
to
6f5e5dd
Compare
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.
Looks good. I would tests some more cases. I think they will work, but I'm not sure.
asuint
should be able to take vectors in addition to scalar values. Previously, it would be lowered as a bitcast from the input value to a vector of uints with a width of 2, which is not large enough if the input value is larger than a scalar value. In order to handle, for example, an input value that is adouble4
, we instead perform a component-wise bitcast.Fixes #6735