• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1STRINGIFY(
2
3// defines built-in interfaces supported by SkiaSL fragment shaders
4
5// See "enum SpvBuiltIn_" in ./spirv.h
6layout(builtin=15) in float4 sk_FragCoord;
7layout(builtin=17) in bool sk_Clockwise;  // Similar to gl_FrontFacing, but defined in device space.
8layout(builtin=3) float sk_ClipDistance[1];
9
10// 9999 is a temporary value that causes us to ignore these declarations beyond
11// adding them to the symbol table. This works fine in GLSL (where they do not
12// require any further handling) but will fail in SPIR-V. We'll have a better
13// solution for this soon.
14layout(builtin=9999) int gl_SampleMaskIn[1];
15layout(builtin=9999) out int gl_SampleMask[1];
16layout(builtin=9999) out half4 gl_SecondaryFragColorEXT;
17
18layout(location=0,index=0,builtin=10001) out half4 sk_FragColor;
19layout(builtin=10008) half4 sk_LastFragColor;
20layout(builtin=10011) half sk_Width;
21layout(builtin=10012) half sk_Height;
22
23)
24