Skip to content

Trying to use proc-macro (vulkano_shaders::shader!) overflows 'main' thread's stack  #11669

Closed
@BoredSathvik

Description

@BoredSathvik

Steps to reproduce:

  1. add these crates to Cargo.toml
vulkano = "0.28.0"
vulkano-shaders = "0.28.0"
  1. add this to main()
    mod cs {
        vulkano_shaders::shader! {
                ty: "compute",
                src: "
    #version 450
    
    layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
    
    layout(set = 0, binding = 0) buffer Data {
        uint data[];
    } buf;
    
    void main() {
        uint idx = gl_GlobalInvocationID.x;
        buf.data[idx] *= 12;
    }"
        }
    }

it should now give output thread 'main' has overflowed its stack


rust-analyzer version: 5fae65d 2022-03-07 stable,

rustc version: rustc 1.59.0 (9d1b2106e 2022-02-23)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions