[][src]Macro geyser::compute_pipeline

macro_rules! compute_pipeline {
    ($instance:expr, $tt:tt: $source_code:expr) => { ... };
    ($instance:expr, $shader:ident) => { ... };
}

Creates an Arc<ComputePipeline>. It takes the code for the shader as literate sting and a Cryo.

Example

use geyser::Cryo;
 
let cryo = Cryo::new();
 
let pipeline = compute_pipeline!(
    inst, 
    src: "
#version 450
 
layout(set = 0, binding = 0) buffer Data {
    uint data[];
} buf;
 
void main() {
    uint idx = gl_GlobalInvocationID.x;
 
    buf.data[idx] = idx * 12;
}
");