vrend: only use egl fences on gles profile.

EGL_ANDROID_native_fence_sync only works on gles profiles.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Lepton Wu 4 years ago
parent 7db2faa354
commit 59f7510c96
  1. 1
      src/vrend_renderer.c
  2. 2
      src/vrend_winsys_egl.c

@ -6068,6 +6068,7 @@ int vrend_renderer_init(const struct vrend_if_cbs *cbs, uint32_t flags)
vrend_state.use_external_blob = true; vrend_state.use_external_blob = true;
#ifdef HAVE_EPOXY_EGL_H #ifdef HAVE_EPOXY_EGL_H
if (vrend_state.use_gles)
vrend_state.use_egl_fence = virgl_egl_supports_fences(egl); vrend_state.use_egl_fence = virgl_egl_supports_fences(egl);
#endif #endif

@ -238,7 +238,7 @@ struct virgl_egl *virgl_egl_init(struct virgl_gbm *gbm, bool surfaceless, bool g
eglMakeCurrent(egl->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, eglMakeCurrent(egl->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
egl->egl_ctx); egl->egl_ctx);
if (virgl_egl_supports_fences(egl)) { if (gles && virgl_egl_supports_fences(egl)) {
egl->signaled_fence = eglCreateSyncKHR(egl->egl_display, egl->signaled_fence = eglCreateSyncKHR(egl->egl_display,
EGL_SYNC_NATIVE_FENCE_ANDROID, NULL); EGL_SYNC_NATIVE_FENCE_ANDROID, NULL);
if (!egl->signaled_fence) { if (!egl->signaled_fence) {

Loading…
Cancel
Save