mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
egl/dri2: return the latest sync status in eglGetSyncAttribKHR
This commit is contained in:
parent
290a3eb750
commit
a2557b30d8
1 changed files with 8 additions and 1 deletions
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "eglsync.h"
|
||||
#include "eglcurrent.h"
|
||||
#include "egldriver.h"
|
||||
#include "egllog.h"
|
||||
|
||||
|
||||
|
|
@ -144,13 +145,19 @@ _eglGetSyncAttribKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
|
|||
EGLint attribute, EGLint *value)
|
||||
{
|
||||
if (!value)
|
||||
return _eglError(EGL_BAD_PARAMETER, "eglGetConfigs");
|
||||
return _eglError(EGL_BAD_PARAMETER, "eglGetSyncAttribKHR");
|
||||
|
||||
switch (attribute) {
|
||||
case EGL_SYNC_TYPE_KHR:
|
||||
*value = sync->Type;
|
||||
break;
|
||||
case EGL_SYNC_STATUS_KHR:
|
||||
/* update the sync status */
|
||||
if (sync->SyncStatus != EGL_SIGNALED_KHR &&
|
||||
(sync->Type == EGL_SYNC_FENCE_KHR ||
|
||||
sync->Type == EGL_SYNC_CL_EVENT_KHR))
|
||||
drv->API.ClientWaitSyncKHR(drv, dpy, sync, 0, 0);
|
||||
|
||||
*value = sync->SyncStatus;
|
||||
break;
|
||||
case EGL_SYNC_CONDITION_KHR:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue