We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently you cannot have a static slice literal in your code such as &[] or &[1,2 3, 4].
&[]
&[1,2 3, 4]
--> /Users/cargo/git/checkouts/rspirv-50a5048e4e24b3a2/7111e6c/spirv/autogen_spirv.rs:2887:48 | 2887 | GroupOperation::ClusteredReduce => &[Capability::GroupNonUniformClustered], | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: from: *{Function} [u32; 1] = note: to: *{Function} [u32]
The text was updated successfully, but these errors were encountered:
Statically sized slice literals work fine, this passes:
#[test] fn slice_constant() { val(r#" #[allow(unused_attributes)] #[spirv(fragment)] pub fn main() { let x: &[u32; 4] = &[1, 2, 3, 4]; } "#); }
Unsized slice literals will never be supported, SPIR-V does not support creating OpTypeRuntimeArray values.
(Please let me know how you were compiling rspirv with rust-gpu if it was not intentional, because that's really strange)
Sorry, something went wrong.
It was intentional. I was trying to see if we could have spirv_headers work in spirv-std to save having to redefine stuff.
spirv_headers
spirv-std
No branches or pull requests
Currently you cannot have a static slice literal in your code such as
&[]
or&[1,2 3, 4]
.Error
The text was updated successfully, but these errors were encountered: