Slices do not work when not coming from a buffer
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Rust
- Stars
- 3.4k
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
A minimal non compiling example
#[spirv(compute(threads(256)))]
pub fn main_cs(
#[spirv(storage_buffer, descriptor_set = 0, binding = 0)] inoutbuf: &mut [u8],
) {
let answer: i32 = 42;
inoutbuf[0..4].copy_from_slice(&answer.to_le_bytes());
}
Originally posted by @izissise in https://github.com/Rust-GPU/rust-gpu/discussions/162#discussioncomment-11416575
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is named. Start by reproducing the supplied non-compiling shader example and trace how a storage-buffer &mut [u8] slice is handled; done means the example compiles successfully without regressing existing slice or buffer behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100