You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0580]: `main` function has wrong type
--> src/main.rs:26:1
|
26 | #[spirv(compute(threads(64)))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
|
= note: expected signature `fn()`
found signature `for<'a> fn(glam::UVec3, &'a mut [Option<Outcome>; 64])`
error[E0277]: the type `[Option<Outcome>]` cannot be indexed by `u32`
--> src/main.rs:32:12
|
32 | output[index] = index.fizzbuz...
| ^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[Option<Outcome>]>` is not implemented for `u32`
help: `usize` implements trait `SliceIndex<T>`
--> /.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:214:1
|
214 | unsafe impl<T> const SliceIndex<[T]> for usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SliceIndex<[T]>`
|
::: /stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/bstr/traits.rs:197:1
|
197 | unsafe impl SliceIndex<ByteStr> for usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SliceIndex<ByteStr>`
= note: required for `[Option<Outcome>]` to implement `Index<u32>`
= note: 1 redundant requirement hidden
= note: required for `[Option<Outcome>; 64]` to implement `Index<u32>`
Activity
fengints commentedon Jul 7, 2026
Okay guys this macros seems to work from source but not from
cargo add glam spirv_stdFirestar99 commentedon Jul 8, 2026
The first error seems like is from you compiling it as a binary for the CPU, instead of as a shader.
But the second error is actually there, I've found it when we made the page but we never corrected it... 😅