Revert "Use generation() to detect ES3 support."
This reverts commit fdde20d3ec773fcf347086201406a5b8cb7271b8.
Reason for revert: generation() can promise things that it can't deliver
Original change's description:
> Use generation() to detect ES3 support.
>
> Desktop GLSL 1.30 supports the things we currently consider as "ES3
> only"--nonsquare matrices, derivatives, and unsigned integers.
>
> Change-Id: I4b5a844cf3aabee6b6d2c562e78859a29efc36fc
> Bug: skia:12347
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439937
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,johnstiles@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: I118e08da078090f404a4fdf33c3a16a48c702753
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12347
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440457
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
diff --git a/tests/SkSLTest.cpp b/tests/SkSLTest.cpp
index e79d82d..cd5485b 100644
--- a/tests/SkSLTest.cpp
+++ b/tests/SkSLTest.cpp
@@ -123,9 +123,11 @@
}
static void test_es3(skiatest::Reporter* r, GrDirectContext* ctx, const char* testFile) {
- // All of our ES3-related needs (non-square matrices, unsigned ints, etc.) should be available
- // in desktop GLSL 1.30 or better.
- if (ctx->priv().caps()->shaderCaps()->generation() < k130_GrGLSLGeneration) {
+ // We don't have an ES2 caps bit, so we check the caps bits for features that ES2 explicitly
+ // doesn't support. Our ES2 bots should return false for these.
+ if (!ctx->priv().caps()->shaderCaps()->shaderDerivativeSupport() ||
+ !ctx->priv().caps()->shaderCaps()->integerSupport() ||
+ !ctx->priv().caps()->shaderCaps()->nonsquareMatrixSupport()) {
return;
}
// ES3-only tests never run on the CPU, because SkVM lacks support for many non-ES2 features.