sksl_frag.inc 912 B

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