Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 1 | STRINGIFY( |
| 2 | |
| 3 | // defines built-in interfaces supported by SkiaSL fragment shaders |
| 4 | |
Ethan Nicholas | f7b8820 | 2017-09-18 14:10:39 -0400 | [diff] [blame^] | 5 | layout(builtin=15) in highfloat4 sk_FragCoord; |
| 6 | layout(builtin=3) highfloat sk_ClipDistance[1]; |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 7 | |
| 8 | // 9999 is a temporary value that causes us to ignore these declarations beyond |
| 9 | // adding them to the symbol table. This works fine in GLSL (where they do not |
| 10 | // require any further handling) but will fail in SPIR-V. We'll have a better |
| 11 | // solution for this soon. |
Ethan Nicholas | f7b8820 | 2017-09-18 14:10:39 -0400 | [diff] [blame^] | 12 | layout(builtin=9999) highfloat4 gl_LastFragData[1]; |
| 13 | layout(builtin=9999) half4 gl_LastFragColor; |
| 14 | layout(builtin=9999) half4 gl_LastFragColorARM; |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 15 | layout(builtin=9999) int gl_SampleMaskIn[1]; |
| 16 | layout(builtin=9999) out int gl_SampleMask[1]; |
Ethan Nicholas | f7b8820 | 2017-09-18 14:10:39 -0400 | [diff] [blame^] | 17 | layout(builtin=9999) half4 gl_SecondaryFragColorEXT; |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 18 | |
Ethan Nicholas | f7b8820 | 2017-09-18 14:10:39 -0400 | [diff] [blame^] | 19 | layout(builtin=10003) half4 sk_InColor; |
| 20 | layout(builtin=10004) out half4 sk_OutColor; |
| 21 | layout(builtin=10005) highfloat2[] sk_TransformedCoords2D; |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 22 | layout(builtin=10006) sampler2D[] sk_TextureSamplers; |
Ethan Nicholas | 68990be | 2017-07-13 09:36:52 -0400 | [diff] [blame] | 23 | |
Ethan Nicholas | f7b8820 | 2017-09-18 14:10:39 -0400 | [diff] [blame^] | 24 | half4 COLORSPACE(half4 color, colorSpaceXform colorSpace); |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 25 | ) |