blob: 0d8d99d7b850347503365820c8fd29e401b7e430 [file] [log] [blame]
Ethan Nicholas762466e2017-06-29 10:03:38 -04001STRINGIFY(
2
3// defines built-in interfaces supported by SkiaSL fragment shaders
4
5layout(builtin=15) in vec4 sk_FragCoord;
6layout(builtin=3) float sk_ClipDistance[1];
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.
12layout(builtin=9999) vec4 gl_LastFragData[1];
13layout(builtin=9999) vec4 gl_LastFragColor;
14layout(builtin=9999) vec4 gl_LastFragColorARM;
15layout(builtin=9999) int gl_SampleMaskIn[1];
16layout(builtin=9999) out int gl_SampleMask[1];
17layout(builtin=9999) vec4 gl_SecondaryFragColorEXT;
18
19layout(builtin=10003) vec4 sk_InColor;
20layout(builtin=10004) out vec4 sk_OutColor;
21layout(builtin=10005) vec2[] sk_TransformedCoords2D;
22layout(builtin=10006) sampler2D[] sk_TextureSamplers;
Ethan Nicholas68990be2017-07-13 09:36:52 -040023
24vec4 COLORSPACE(vec4 color, colorSpaceXform colorSpace);
Ethan Nicholas762466e2017-06-29 10:03:38 -040025)