diff options
author | Brian Osman <brianosman@google.com> | 2017-04-21 15:12:30 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-21 19:39:16 +0000 |
commit | 80be240001409fc0f1309a04724895a41a478ed5 (patch) | |
tree | 59544b13d47ade4b03b296a11bf2e380f47d216a | |
parent | e71db447d4ac5fe23afb092b4764e4311eabaff7 (diff) |
Enable fence sync support in ES3 test contexts
This (only?) affects ANGLE. Other ES platforms typically go through
EGLGLTestContext, which manually instantiates an EGLFenceSync.
In general, though, ES3 requires this API, so this is safe. Should give us
more accurate (and much less spammy) output from ES3 ANGLE performance
testing.
Bug: skia:
Change-Id: I10a608d21092aaffa4ab76e4b3d2f6e9c5cf09bb
Reviewed-on: https://skia-review.googlesource.com/14063
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
-rw-r--r-- | tools/gpu/gl/GLTestContext.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/gpu/gl/GLTestContext.cpp b/tools/gpu/gl/GLTestContext.cpp index f6771934f8..abbb8a618c 100644 --- a/tools/gpu/gl/GLTestContext.cpp +++ b/tools/gpu/gl/GLTestContext.cpp @@ -51,10 +51,13 @@ std::unique_ptr<GLFenceSync> GLFenceSync::MakeIfSupported(const sk_gpu_test::GLT } ret.reset(new GLFenceSync(ctx)); } else { - if (!ctx->gl()->hasExtension("GL_APPLE_sync")) { + if (ctx->gl()->hasExtension("GL_APPLE_sync")) { + ret.reset(new GLFenceSync(ctx, "APPLE")); + } else if (GrGLGetVersion(ctx->gl()) >= GR_GL_VER(3, 0)) { + ret.reset(new GLFenceSync(ctx)); + } else { return nullptr; } - ret.reset(new GLFenceSync(ctx, "APPLE")); } if (!ret->validate()) { ret = nullptr; |