-
Notifications
You must be signed in to change notification settings - Fork 1k
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] [msl-out] Error: as_type cast from 'long' to 'metal::uint' (aka 'unsigned int') is not allowed #7435
Comments
@jamienicol I assume you are busy, but wanted to point you to this as you have been working in this space and might be able to see something quickly. I tried to find the issue but I am still getting up to speed on the code. |
From a quick scan I would guess the issue is that like in #7423 |
Yep I think that's it. Here's a reduced case: fn main() {
var x = bitcast<u32>(-2147483648);
} Same error message. |
@jamienicol great, found the fix. PR incoming soon. Thanks! |
(unless you want to PR, up to you...don't want to step on your toes and you know more what you are doing and I don't know if this affects other backends) |
Please go ahead 🙂 |
Description
When compiling this code with
rust-gpu
, I get valid spirv asm. I then pass it tonaga
to translate to metal (as I am on macOS) and I get these errors:Repro steps
It's a bit convoluted...
build.rs
, remove the check that turns it off on macos or inshaders/lib.rs
, delete everything in the match except21 => filtering_procedurals::Inputs
I'll work on getting the raw spirv.
Note I tested with the change from #7422 by @jamienicol and it still was not fixed.
Expected vs observed behavior
The shader to translate to metal code that compiles.
Platform
macOS, latest master of
wgpu
The text was updated successfully, but these errors were encountered: