• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 450 core
2
3#extension GL_EXT_buffer_reference : enable
4layout (push_constant, std430) uniform Block { int identity[32]; } pc;
5layout(r32ui, set = 3, binding = 0) uniform uimage2D image0_0;
6layout(buffer_reference) buffer T1;
7layout(set = 3, binding = 1, buffer_reference) buffer T1 {
8   layout(offset = 0) int a[2]; // stride = 4 for std430, 16 for std140
9   layout(offset = 32) int b;
10   layout(offset = 48) T1  c[2]; // stride = 8 for std430, 16 for std140
11   layout(offset = 80) T1  d;
12} x;
13void main()
14{
15  int accum = 0, temp;
16   accum |= x.a[0] - 0;
17   accum |= x.a[pc.identity[1]] - 1;
18   accum |= x.b - 2;
19   accum |= x.c[0].a[0] - 3;
20   accum |= x.c[0].a[pc.identity[1]] - 4;
21   accum |= x.c[0].b - 5;
22   accum |= x.c[pc.identity[1]].a[0] - 6;
23   accum |= x.c[pc.identity[1]].a[pc.identity[1]] - 7;
24   accum |= x.c[pc.identity[1]].b - 8;
25   accum |= x.d.a[0] - 9;
26   accum |= x.d.a[pc.identity[1]] - 10;
27   accum |= x.d.b - 11;
28  uvec4 color = (accum != 0) ? uvec4(0,0,0,0) : uvec4(1,0,0,1);
29  imageStore(image0_0, ivec2(gl_FragCoord.x, gl_FragCoord.y), color);
30}