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