diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 55674ff..47ed714 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.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; diff --git a/src/vrend_winsys_egl.c b/src/vrend_winsys_egl.c index 0fc41ed..6a6e7f7 100644 --- a/src/vrend_winsys_egl.c +++ b/src/vrend_winsys_egl.c @@ -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) {