am ed6d08b7
: fix "traceGpuCompletion" debug feature
* commit 'ed6d08b70d775852f4827471814c83eba3606aaa': fix "traceGpuCompletion" debug feature
This commit is contained in:
commit
eb3610e4d0
@ -960,6 +960,13 @@ EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
|
|||||||
|
|
||||||
egl_surface_t const * const s = get_surface(draw);
|
egl_surface_t const * const s = get_surface(draw);
|
||||||
|
|
||||||
|
if (CC_UNLIKELY(dp->traceGpuCompletion)) {
|
||||||
|
EGLSyncKHR sync = eglCreateSyncKHR(dpy, EGL_SYNC_FENCE_KHR, NULL);
|
||||||
|
if (sync != EGL_NO_SYNC_KHR) {
|
||||||
|
FrameCompletionThread::queueSync(sync);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (CC_UNLIKELY(dp->finishOnSwap)) {
|
if (CC_UNLIKELY(dp->finishOnSwap)) {
|
||||||
uint32_t pixel;
|
uint32_t pixel;
|
||||||
egl_context_t * const c = get_context( egl_tls_t::getContext() );
|
egl_context_t * const c = get_context( egl_tls_t::getContext() );
|
||||||
@ -970,19 +977,7 @@ EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EGLBoolean result = s->cnx->egl.eglSwapBuffers(dp->disp.dpy, s->surface);
|
return s->cnx->egl.eglSwapBuffers(dp->disp.dpy, s->surface);
|
||||||
|
|
||||||
if (CC_UNLIKELY(dp->traceGpuCompletion)) {
|
|
||||||
EGLSyncKHR sync = EGL_NO_SYNC_KHR;
|
|
||||||
{
|
|
||||||
sync = eglCreateSyncKHR(dpy, EGL_SYNC_FENCE_KHR, NULL);
|
|
||||||
}
|
|
||||||
if (sync != EGL_NO_SYNC_KHR) {
|
|
||||||
FrameCompletionThread::queueSync(sync);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface,
|
EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface,
|
||||||
|
Loading…
Reference in New Issue
Block a user