From e32ac5b8a963202dcdfb91354f77979765083000 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sat, 23 Oct 2010 02:52:14 +0800 Subject: egl: Fix _eglModeLookup. Internally a mode belongs to a screen. But functions like eglGetModeAttribMESA treat a mode as a display resource: a mode can be looked up without a screen. Considering how KMS works, it is better to stick to the current implementation. To properly support looking up a mode without a screen, this commit assigns each mode (of all screens) a unique ID. --- src/egl/main/eglscreen.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/egl/main/eglscreen.h') diff --git a/src/egl/main/eglscreen.h b/src/egl/main/eglscreen.h index 44fe20da3be..2a99f23c50a 100644 --- a/src/egl/main/eglscreen.h +++ b/src/egl/main/eglscreen.h @@ -8,6 +8,9 @@ #ifdef EGL_MESA_screen_surface +#define _EGL_SCREEN_MAX_MODES 16 + + /** * Per-screen information. * Note that an EGL screen doesn't have a size. A screen may be set to @@ -35,7 +38,7 @@ struct _egl_screen PUBLIC void -_eglInitScreen(_EGLScreen *screen, _EGLDisplay *dpy); +_eglInitScreen(_EGLScreen *screen, _EGLDisplay *dpy, EGLint num_modes); PUBLIC EGLScreenMESA -- cgit v1.2.3