Ethan Nicholas | 7970765 | 2017-11-16 11:20:11 -0500 | [diff] [blame] | 1 | STRINGIFY( |
Ethan Nicholas | 52cad15 | 2017-02-16 16:37:32 -0500 | [diff] [blame] | 2 | |
| 3 | // defines built-in interfaces supported by SkiaSL geometry shaders |
| 4 | |
| 5 | layout(builtin=10002) in sk_PerVertex { |
Ethan Nicholas | bed683a | 2017-09-26 14:23:59 -0400 | [diff] [blame] | 6 | layout(builtin=0) float4 sk_Position; |
| 7 | layout(builtin=1) float sk_PointSize; |
Ethan Nicholas | b6ba82c | 2018-01-17 15:21:50 -0500 | [diff] [blame] | 8 | layout(builtin=3) float sk_ClipDistance[1]; |
Ethan Nicholas | 52cad15 | 2017-02-16 16:37:32 -0500 | [diff] [blame] | 9 | } sk_in[]; |
| 10 | |
| 11 | out sk_PerVertex { |
Ethan Nicholas | bed683a | 2017-09-26 14:23:59 -0400 | [diff] [blame] | 12 | layout(builtin=0) float4 sk_Position; |
| 13 | layout(builtin=1) float sk_PointSize; |
Ethan Nicholas | b6ba82c | 2018-01-17 15:21:50 -0500 | [diff] [blame] | 14 | layout(builtin=3) float sk_ClipDistance[1]; |
Ethan Nicholas | 52cad15 | 2017-02-16 16:37:32 -0500 | [diff] [blame] | 15 | }; |
| 16 | |
| 17 | layout(builtin=8) int sk_InvocationID; |
| 18 | |
Ethan Nicholas | cb67096 | 2017-04-20 19:31:52 -0400 | [diff] [blame] | 19 | sk_has_side_effects void EmitStreamVertex(int stream); |
| 20 | sk_has_side_effects void EndStreamPrimitive(int stream); |
| 21 | sk_has_side_effects void EmitVertex(); |
| 22 | sk_has_side_effects void EndPrimitive(); |
Ethan Nicholas | 52cad15 | 2017-02-16 16:37:32 -0500 | [diff] [blame] | 23 | |
Ethan Nicholas | 7970765 | 2017-11-16 11:20:11 -0500 | [diff] [blame] | 24 | ) |