diff options
author | Chia-I Wu <olv@lunarg.com> | 2011-01-13 00:27:45 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2011-01-13 18:10:38 +0800 |
commit | 655e4598927728a663f4cfcd6babdf7e5ad83f77 (patch) | |
tree | fa937088bf0e27f51311c86dfbc016c103331f00 /src/gallium | |
parent | a4a38dcf61f141297a083ccac217200947d57b0d (diff) |
egl: Simplify driver matching.
Add initialization options that drv->API.Initialize should support.
Replace drv->Probe by TestOnly initialization option and simplify
_eglMatchDriver.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c index 90354705172..bad32ac6e4c 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d.c @@ -484,6 +484,9 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy) if (!nplat) return EGL_FALSE; + if (dpy->Options.TestOnly) + return EGL_TRUE; + gdpy = CALLOC_STRUCT(egl_g3d_display); if (!gdpy) { _eglError(EGL_BAD_ALLOC, "eglInitialize"); @@ -572,12 +575,6 @@ egl_g3d_get_proc_address(_EGLDriver *drv, const char *procname) stapi->get_proc_address(stapi, procname) : NULL); } -static EGLint -egl_g3d_probe(_EGLDriver *drv, _EGLDisplay *dpy) -{ - return (egl_g3d_get_platform(drv, dpy->Platform)) ? 90 : 0; -} - _EGLDriver * egl_g3d_create_driver(const struct egl_g3d_loader *loader) { @@ -594,8 +591,6 @@ egl_g3d_create_driver(const struct egl_g3d_loader *loader) gdrv->base.API.Terminate = egl_g3d_terminate; gdrv->base.API.GetProcAddress = egl_g3d_get_proc_address; - gdrv->base.Probe = egl_g3d_probe; - /* to be filled by the caller */ gdrv->base.Name = NULL; gdrv->base.Unload = NULL; |