|
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, |
Answered by
LegNeato
Dec 1, 2024
Replies: 4 comments 4 replies
|
I think you can use something like: buffer[0..4].copy_from_slice(&value.to_le_bytes());Or use |
4 replies
|
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 |
0 replies
|
Today I had a similar error when trying to iterate over an array of u8 |
0 replies
|
Ok, it looks like this is an existing issue. Our slice support is incomplete unless the slice is an input or output buffer. |
0 replies
Answer selected by
LegNeato
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok, it looks like this is an existing issue. Our slice support is incomplete unless the slice is an input or output buffer.