Skip to content

Slices do not work when not coming from a buffer #164

Open
@LegNeato

Description

@LegNeato

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 #162 (reply in thread)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions