summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/common/egl_g3d.h
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-08-14 23:56:46 +0800
committerChia-I Wu <olv@lunarg.com>2010-08-17 00:06:19 +0800
commit4b2495661f3a5ac8ed07b68c5d5bf90adee2c37d (patch)
tree295766001d29320435becc9451c894201245028f /src/gallium/state_trackers/egl/common/egl_g3d.h
parent4eebea74a81ec5fbacf2347ea88cac137ddd4d69 (diff)
st/egl: Add support for EGL_KHR_reusable_sync.
The extension is implemented by pipe_condvar.
Diffstat (limited to 'src/gallium/state_trackers/egl/common/egl_g3d.h')
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.h b/src/gallium/state_trackers/egl/common/egl_g3d.h
index f33dc91cf9..dabcf841e2 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.h
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.h
@@ -30,12 +30,14 @@
#include "pipe/p_screen.h"
#include "pipe/p_context.h"
#include "pipe/p_format.h"
+#include "os/os_thread.h"
#include "egldriver.h"
#include "egldisplay.h"
#include "eglcontext.h"
#include "eglsurface.h"
#include "eglconfig.h"
#include "eglimage.h"
+#include "eglsync.h"
#include "eglscreen.h"
#include "eglmode.h"
@@ -99,6 +101,21 @@ struct egl_g3d_image {
_EGL_DRIVER_STANDARD_TYPECASTS(egl_g3d)
_EGL_DRIVER_TYPECAST(egl_g3d_image, _EGLImage, obj)
+#ifdef EGL_KHR_reusable_sync
+
+struct egl_g3d_sync {
+ _EGLSync base;
+
+ int refs;
+
+ /* the mutex protects only the condvar, not the struct */
+ pipe_mutex mutex;
+ pipe_condvar condvar;
+};
+_EGL_DRIVER_TYPECAST(egl_g3d_sync, _EGLSync, obj)
+
+#endif /* EGL_KHR_reusable_sync */
+
#ifdef EGL_MESA_screen_surface
struct egl_g3d_screen {