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 | 5226b77 | 2018-05-03 16:20:41 -0400 | [diff] [blame] | 9 | } sk_in[1]; |
Ethan Nicholas | 52cad15 | 2017-02-16 16:37:32 -0500 | [diff] [blame] | 10 | |
Ethan Nicholas | 16c1196 | 2018-03-16 12:20:54 -0400 | [diff] [blame] | 11 | layout(builtin=10007) 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 | |
Ethan Nicholas | d1d5256 | 2018-03-20 16:30:34 -0400 | [diff] [blame] | 17 | layout(builtin=8) in int sk_InvocationID; |
Ethan Nicholas | 52cad15 | 2017-02-16 16:37:32 -0500 | [diff] [blame] | 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 | ) |