sksl_fp.inc 1.1 KB

123456789101112131415161718192021222324252627282930
  1. STRINGIFY(
  2. // defines built-in interfaces supported by SkiaSL fragment shaders
  3. layout(builtin=15) in float4 sk_FragCoord;
  4. layout(builtin=3) float sk_ClipDistance[1];
  5. // 9999 is a temporary value that causes us to ignore these declarations beyond
  6. // adding them to the symbol table. This works fine in GLSL (where they do not
  7. // require any further handling) but will fail in SPIR-V. We'll have a better
  8. // solution for this soon.
  9. layout(builtin=9999) float4 gl_LastFragData[1];
  10. layout(builtin=9999) half4 gl_LastFragColor;
  11. layout(builtin=9999) half4 gl_LastFragColorARM;
  12. layout(builtin=9999) int gl_SampleMaskIn[1];
  13. layout(builtin=9999) out int gl_SampleMask[1];
  14. layout(builtin=9999) half4 gl_SecondaryFragColorEXT;
  15. layout(builtin=10003) half4 sk_InColor;
  16. layout(builtin=10004) out half4 sk_OutColor;
  17. layout(builtin=10005) float2[] sk_TransformedCoords2D;
  18. layout(builtin=10006) sampler2D[] sk_TextureSamplers;
  19. layout(builtin=10011) half sk_Width;
  20. layout(builtin=10012) half sk_Height;
  21. half4 process(fragmentProcessor fp);
  22. half4 process(fragmentProcessor fp, half4 input);
  23. half4 process(fragmentProcessor? fp);
  24. half4 process(fragmentProcessor? fp, half4 input);
  25. )