| 1 |
#version 450 |
| 2 |
#extension GL_ARB_fragment_shader_interlock : require |
| 3 |
layout(pixel_interlock_ordered) in; |
| 4 |
|
| 5 |
layout(set = 0, binding = 0, std430) buffer SSBO0 |
| 6 |
{ |
| 7 |
uint values0[]; |
| 8 |
}; |
| 9 |
|
| 10 |
layout(set = 0, binding = 1, std430) buffer SSBO1 |
| 11 |
{ |
| 12 |
uint values1[]; |
| 13 |
}; |
| 14 |
|
| 15 |
void callee2() |
| 16 |
{ |
| 17 |
values1[int(gl_FragCoord.x)] += 1; |
| 18 |
} |
| 19 |
|
| 20 |
void callee() |
| 21 |
{ |
| 22 |
values0[int(gl_FragCoord.x)] += 1; |
| 23 |
callee2(); |
| 24 |
} |
| 25 |
|
| 26 |
void main() |
| 27 |
{ |
| 28 |
beginInvocationInterlockARB(); |
| 29 |
callee(); |
| 30 |
endInvocationInterlockARB(); |
| 31 |
} |