Reland "Revert "Revert "Rename gl_SampleMask to sk_SampleMask"""
This is a reland of 4ac37632a8059153eadc9df6eedfcd7c290a0b5d
Original change's description:
> Revert "Revert "Rename gl_SampleMask to sk_SampleMask""
>
> This reverts commit 40b815db9704f79ecc5b35d2cfac6ff3f391aabb.
>
> Bug: skia:
> Change-Id: I454d3e86219276996d0b4f9e7fcf177bb6dc45e7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251004
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:
Change-Id: Ia343e9e1008ca2354e1d300030e763f3c578d71c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251441
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index df7c0b0..2a96e39 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -796,6 +796,11 @@
case SK_CLOCKWISE_BUILTIN:
this->write(fProgram.fSettings.fFlipY ? "(!gl_FrontFacing)" : "gl_FrontFacing");
break;
+ case SK_SAMPLEMASK_BUILTIN:
+ SkASSERT(fProgram.fSettings.fCaps->sampleVariablesSupport() ||
+ fProgram.fSettings.fCaps->sampleVariablesStencilSupport());
+ this->write("gl_SampleMask");
+ break;
case SK_VERTEXID_BUILTIN:
this->write("gl_VertexID");
break;