-
Hello
But I keep getting this error
It works in rust playground https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2949039e961bbadd0c8920c5926d62c2 How can I do it? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
I think you can use something like: buffer[0..4].copy_from_slice(&value.to_le_bytes()); Or use |
Beta Was this translation helpful? Give feedback.
-
As a workaround I'm doing it the other way, in the compute shader I take the storage buffer as a &[u32] and I access individual byte like so
I can simply give the first element to the reduce function
This works correctly but I'd rather cast the pointer |
Beta Was this translation helpful? Give feedback.
-
Today I had a similar error when trying to iterate over an array of u8
|
Beta Was this translation helpful? Give feedback.
-
Ok, it looks like this is an existing issue. Our slice support is incomplete unless the slice is an input or output buffer. |
Beta Was this translation helpful? Give feedback.
Ok, it looks like this is an existing issue. Our slice support is incomplete unless the slice is an input or output buffer.