blob: 7a3963d3527d29aca24388dab8e658297cc0e5c3 [file] [log] [blame]
Ethan Nicholas79707652017-11-16 11:20:11 -05001STRINGIFY(
Ethan Nicholas762466e2017-06-29 10:03:38 -04002
3// defines built-in interfaces supported by SkiaSL fragment shaders
4
Ethan Nicholas8aa45692017-09-20 11:24:15 -04005layout(builtin=15) in float4 sk_FragCoord;
6layout(builtin=3) float sk_ClipDistance[1];
Ethan Nicholas762466e2017-06-29 10:03:38 -04007
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 Nicholas8aa45692017-09-20 11:24:15 -040012layout(builtin=9999) float4 gl_LastFragData[1];
Ethan Nicholasf7b88202017-09-18 14:10:39 -040013layout(builtin=9999) half4 gl_LastFragColor;
14layout(builtin=9999) half4 gl_LastFragColorARM;
Ethan Nicholas762466e2017-06-29 10:03:38 -040015layout(builtin=9999) int gl_SampleMaskIn[1];
16layout(builtin=9999) out int gl_SampleMask[1];
Ethan Nicholasf7b88202017-09-18 14:10:39 -040017layout(builtin=9999) half4 gl_SecondaryFragColorEXT;
Ethan Nicholas762466e2017-06-29 10:03:38 -040018
Ethan Nicholasf7b88202017-09-18 14:10:39 -040019layout(builtin=10003) half4 sk_InColor;
20layout(builtin=10004) out half4 sk_OutColor;
Ethan Nicholas8aa45692017-09-20 11:24:15 -040021layout(builtin=10005) float2[] sk_TransformedCoords2D;
Ethan Nicholas762466e2017-06-29 10:03:38 -040022layout(builtin=10006) sampler2D[] sk_TextureSamplers;
Ethan Nicholascd700e92018-08-24 16:43:57 -040023layout(builtin=10011) half sk_Width;
24layout(builtin=10012) half sk_Height;
Ethan Nicholas68990be2017-07-13 09:36:52 -040025
Ethan Nicholasc9472af2017-10-10 16:30:21 -040026half4 process(fragmentProcessor fp);
Michael Ludwig92e4c7f2018-08-30 16:08:18 -040027half4 process(fragmentProcessor fp, half4 input);
Ethan Nicholas79707652017-11-16 11:20:11 -050028)