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>
This commit is contained in:
parent
7e9dc42228
commit
4a213018b4
@ -631,14 +631,17 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: support CHROMIUM_sync_point and maybe KHR_fence_sync
|
// TODO: support CHROMIUM_sync_point and maybe KHR_fence_sync
|
||||||
if (GR_IS_GR_GL(standard)) {
|
if (ctxInfo.hasExtension("GL_ARB_sync") || ctxInfo.hasExtension("GL_APPLE_sync")) {
|
||||||
fFenceSyncSupport = (version >= GR_GL_VER(3, 2) || ctxInfo.hasExtension("GL_ARB_sync"));
|
fFenceSyncSupport = true;
|
||||||
|
} else if (GR_IS_GR_GL(standard)) {
|
||||||
|
fFenceSyncSupport = (version >= GR_GL_VER(3, 2));
|
||||||
} else if (GR_IS_GR_GL_ES(standard)) {
|
} else if (GR_IS_GR_GL_ES(standard)) {
|
||||||
fFenceSyncSupport = (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_APPLE_sync"));
|
fFenceSyncSupport = (version >= GR_GL_VER(3, 0));
|
||||||
} else if (GR_IS_GR_WEBGL(standard)) {
|
} else if (GR_IS_GR_WEBGL(standard)) {
|
||||||
// Only in WebGL 2.0
|
// Only in WebGL 2.0
|
||||||
fFenceSyncSupport = version >= GR_GL_VER(2, 0);
|
fFenceSyncSupport = version >= GR_GL_VER(2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The same objects (GL sync objects) are used to implement GPU/CPU fence syncs and GPU/GPU
|
// The same objects (GL sync objects) are used to implement GPU/CPU fence syncs and GPU/GPU
|
||||||
// semaphores.
|
// semaphores.
|
||||||
fSemaphoreSupport = fFenceSyncSupport;
|
fSemaphoreSupport = fFenceSyncSupport;
|
||||||
|
Loading…
Reference in New Issue
Block a user