Debian Codegraph @

third_party/spirv-cross/shaders-hlsl/comp/globallycoherent.comp

raw
1 #version 450
2 layout(local_size_x = 1) in;
3
4 layout(r32f, binding = 0) uniform readonly image2D uImageIn;
5 layout(r32f, binding = 1) uniform coherent writeonly image2D uImageOut;
6
7 layout(set = 0, binding = 2) readonly buffer Foo
8 {
9 float foo;
10 };
11
12 layout(set = 0, binding = 3) coherent writeonly buffer Bar
13 {
14 float bar;
15 };
16
17 void main()
18 {
19 ivec2 coord = ivec2(9, 7);
20 vec4 indata = imageLoad(uImageIn, coord);
21 imageStore(uImageOut, coord, indata);
22
23 bar = foo;
24 }
25