1 | STRINGIFY( |
2 | |
3 | // defines built-in interfaces supported by SkiaSL fragment shaders |
4 | |
5 | layout(builtin=15) in float4 sk_FragCoord; |
6 | layout(builtin=3) float sk_ClipDistance[1]; |
7 | layout(builtin=20) out int sk_SampleMask[1]; |
8 | |
9 | // 9999 is a temporary value that causes us to ignore these declarations beyond |
10 | // adding them to the symbol table. This works fine in GLSL (where they do not |
11 | // require any further handling) but will fail in SPIR-V. We'll have a better |
12 | // solution for this soon. |
13 | layout(builtin=9999) float4 gl_LastFragData[1]; |
14 | layout(builtin=9999) half4 gl_LastFragColor; |
15 | layout(builtin=9999) half4 gl_LastFragColorARM; |
16 | layout(builtin=9999) half4 gl_SecondaryFragColorEXT; |
17 | |
18 | layout(builtin=10003) half4 sk_InColor; |
19 | layout(builtin=10004) out half4 sk_OutColor; |
20 | layout(builtin=10005) float2[] sk_TransformedCoords2D; |
21 | layout(builtin=10006) sampler2D[] sk_TextureSamplers; |
22 | layout(builtin=10011) half sk_Width; |
23 | layout(builtin=10012) half sk_Height; |
24 | |
25 | half4 sample(fragmentProcessor fp); |
26 | half4 sample(fragmentProcessor fp, float2 coords); |
27 | half4 sample(fragmentProcessor fp, half4 input); |
28 | half4 sample(fragmentProcessor fp, half4 input, float2 coords); |
29 | half4 sample(fragmentProcessor? fp); |
30 | half4 sample(fragmentProcessor? fp, float2 coords); |
31 | half4 sample(fragmentProcessor? fp, half4 input); |
32 | half4 sample(fragmentProcessor? fp, half4 input, float2 coords); |
33 | ) |
34 | |