• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 450
2
3#extension GL_ARB_gpu_shader_int64 : enable
4#extension GL_EXT_buffer_reference : enable
5
6layout(buffer_reference, std430) buffer blockType {
7    uint x[];
8};
9
10layout(std430) buffer t2 {
11    blockType f;
12} t;
13
14layout(location = 0) flat in uint i;
15
16void main() {
17
18    atomicAdd(t.f.x[i], 1);
19
20    coherent blockType b = t.f;
21    b.x[0] = 2;
22
23    volatile blockType b2 = t.f;
24    b2.x[0] = 3;
25}
26