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. 3
      src/vrend_renderer.c
  2. 2
      src/vrend_winsys_egl.c

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

@ -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,
egl->egl_ctx);
if (virgl_egl_supports_fences(egl)) {
if (gles && virgl_egl_supports_fences(egl)) {
egl->signaled_fence = eglCreateSyncKHR(egl->egl_display,
EGL_SYNC_NATIVE_FENCE_ANDROID, NULL);
if (!egl->signaled_fence) {

Loading…
Cancel
Save