Skip to content

Commit 4a21301

Browse files
tanderson-googleSkia Commit-Bot
authored andcommitted
Always check for GL_ARB_sync
Previously, this was only checked for desktop GL, not for GLES. With [1], ANGLE now exposes GL_ARB_sync for GLES, so we should extend the check. Also always check for GL_APPLE_sync for consistency. It's technically out-of-spec for GL_ARB_sync to exist outside of desktop GL, and for GL_APPLE_sync to exist outside of GLES, but if the platform is listing the extensions, we should expect them to work anyway. Bug: chromium: 1028799 Change-Id: I411d2f106df0a2d7eb9b288053478ee79e060b81 R: reed@google.com Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257693 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
1 parent 7e9dc42 commit 4a21301

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/gpu/gl/GrGLCaps.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,14 +631,17 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
631631
}
632632

633633
// TODO: support CHROMIUM_sync_point and maybe KHR_fence_sync
634-
if (GR_IS_GR_GL(standard)) {
635-
fFenceSyncSupport = (version >= GR_GL_VER(3, 2) || ctxInfo.hasExtension("GL_ARB_sync"));
634+
if (ctxInfo.hasExtension("GL_ARB_sync") || ctxInfo.hasExtension("GL_APPLE_sync")) {
635+
fFenceSyncSupport = true;
636+
} else if (GR_IS_GR_GL(standard)) {
637+
fFenceSyncSupport = (version >= GR_GL_VER(3, 2));
636638
} else if (GR_IS_GR_GL_ES(standard)) {
637-
fFenceSyncSupport = (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_APPLE_sync"));
639+
fFenceSyncSupport = (version >= GR_GL_VER(3, 0));
638640
} else if (GR_IS_GR_WEBGL(standard)) {
639641
// Only in WebGL 2.0
640642
fFenceSyncSupport = version >= GR_GL_VER(2, 0);
641643
}
644+
642645
// The same objects (GL sync objects) are used to implement GPU/CPU fence syncs and GPU/GPU
643646
// semaphores.
644647
fSemaphoreSupport = fFenceSyncSupport;

0 commit comments

Comments
 (0)