Add sampleVariablesStencilSupport to sksl standalone caps

TBR=ethannicholas@google.com

Change-Id: I53c2896470fd202f01f51c5aaddf3087b2cbb5ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251556
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
Chris Dalton 2019-10-29 16:28:01 -06:00 committed by Skia Commit-Bot
parent 07c6c6668c
commit 1ae54bc22f
3 changed files with 5 additions and 2 deletions

View File

@ -24,7 +24,7 @@ Differences from GLSL
the same as if and switch in all respects other than it being a compile-time the same as if and switch in all respects other than it being a compile-time
error to use a non-constant expression as a test. error to use a non-constant expression as a test.
* GLSL caps can be referenced via the syntax 'sk_Caps.<name>', e.g. * GLSL caps can be referenced via the syntax 'sk_Caps.<name>', e.g.
sk_Caps.sampleVariablesSupport. The value will be a constant boolean or int, sk_Caps.canUseAnyFunctionInShader. The value will be a constant boolean or int,
as appropriate. As SkSL supports constant folding and branch elimination, this as appropriate. As SkSL supports constant folding and branch elimination, this
means that an 'if' statement which statically queries a cap will collapse down means that an 'if' statement which statically queries a cap will collapse down
to the chosen branch, meaning that: to the chosen branch, meaning that:

View File

@ -127,7 +127,6 @@ static void fill_caps(const SKSL_CAPS_CLASS& caps,
CAP(fbFetchNeedsCustomOutput); CAP(fbFetchNeedsCustomOutput);
CAP(flatInterpolationSupport); CAP(flatInterpolationSupport);
CAP(noperspectiveInterpolationSupport); CAP(noperspectiveInterpolationSupport);
CAP(sampleVariablesSupport);
CAP(externalTextureSupport); CAP(externalTextureSupport);
CAP(mustEnableAdvBlendEqs); CAP(mustEnableAdvBlendEqs);
CAP(mustEnableSpecificAdvBlendEqs); CAP(mustEnableSpecificAdvBlendEqs);

View File

@ -100,6 +100,10 @@ public:
return true; return true;
} }
bool sampleVariablesStencilSupport() const {
return true;
}
bool externalTextureSupport() const { bool externalTextureSupport() const {
return true; return true;
} }