John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 1 | #version 310 es |
| 2 | |
| 3 | precision highp float; |
| 4 | |
| 5 | layout (local_size_x = 16, local_size_y = 32, local_size_z = 4) in; |
| 6 | |
| 7 | shared float s; |
| 8 | shared int i; |
| 9 | |
| 10 | buffer outb { |
| 11 | float f; |
| 12 | float g; |
| 13 | float h; |
John Kessenich | c9a8083 | 2015-09-12 12:17:44 -0600 | [diff] [blame] | 14 | vec3 uns[]; |
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 15 | } outbname; |
| 16 | |
| 17 | buffer outbna { |
| 18 | int k; |
| 19 | vec4 na; |
| 20 | } outbnamena; |
| 21 | |
| 22 | buffer outs { |
John Kessenich | c9a8083 | 2015-09-12 12:17:44 -0600 | [diff] [blame] | 23 | int s; |
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 24 | vec4 va[]; |
| 25 | } outnames; |
| 26 | |
John Kessenich | c08fb8a | 2017-03-14 16:45:30 -0600 | [diff] [blame] | 27 | #extension GL_EXT_device_group : enable |
| 28 | |
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 29 | void main() |
| 30 | { |
| 31 | barrier(); |
| 32 | outbname.f = s; |
| 33 | outbnamena.na = vec4(s); |
John Kessenich | c9a8083 | 2015-09-12 12:17:44 -0600 | [diff] [blame] | 34 | s = outbname.uns[18].x; |
| 35 | outbname.uns[17] = vec3(3.0); |
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 36 | outbname.uns[i] = vec3(s); |
| 37 | outnames.va[gl_LocalInvocationID.x] = vec4(s); |
John Kessenich | c9a8083 | 2015-09-12 12:17:44 -0600 | [diff] [blame] | 38 | outnames.s = outbname.uns.length(); |
John Kessenich | c08fb8a | 2017-03-14 16:45:30 -0600 | [diff] [blame] | 39 | gl_DeviceIndex; |
John Kessenich | 8297936 | 2017-12-11 04:02:24 -0700 | [diff] [blame] | 40 | memoryBarrierShared(); |
| 41 | groupMemoryBarrier(); |
John Kessenich | 39374da | 2015-05-15 21:32:46 +0000 | [diff] [blame] | 42 | } |