diff options
author | Chia-I Wu <[email protected]> | 2010-07-31 00:00:49 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-07-31 17:49:32 +0800 |
commit | 6c7e0b95a4a16d268aa3ca74c5c8407779533314 (patch) | |
tree | 533bf5ee540c5bc55518d39c424db8f0ed28a0a4 /src/gallium | |
parent | 3cc471e429675e82fcc37c6efa2c5e880d811b84 (diff) |
egl: Add checks for EGL_MESA_screen_surface.
This allows Mesa EGL to be compiled with eglext.h that does not define
EGL_MESA_screen_surface.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d.h | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c index b6321e6b437..56d575ffe08 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d.c @@ -434,9 +434,11 @@ egl_g3d_free_config(void *conf) static void egl_g3d_free_screen(void *scr) { +#ifdef EGL_MESA_screen_surface struct egl_g3d_screen *gscr = egl_g3d_screen((_EGLScreen *) scr); FREE(gscr->native_modes); FREE(gscr); +#endif } static EGLBoolean diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.h b/src/gallium/state_trackers/egl/common/egl_g3d.h index ed2b0409bb9..f33dc91cf90 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d.h +++ b/src/gallium/state_trackers/egl/common/egl_g3d.h @@ -95,15 +95,19 @@ struct egl_g3d_image { unsigned zslice; }; +/* standard typecasts */ +_EGL_DRIVER_STANDARD_TYPECASTS(egl_g3d) +_EGL_DRIVER_TYPECAST(egl_g3d_image, _EGLImage, obj) + +#ifdef EGL_MESA_screen_surface + struct egl_g3d_screen { _EGLScreen base; const struct native_connector *native; const struct native_mode **native_modes; }; - -/* standard typecasts */ -_EGL_DRIVER_STANDARD_TYPECASTS(egl_g3d) _EGL_DRIVER_TYPECAST(egl_g3d_screen, _EGLScreen, obj) -_EGL_DRIVER_TYPECAST(egl_g3d_image, _EGLImage, obj) + +#endif /* EGL_MESA_screen_surface */ #endif /* _EGL_G3D_H_ */ |