aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gpu/gl/GLTestContext.cpp7
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;