summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/common/egl_g3d.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-06-25 00:41:56 +0800
committerChia-I Wu <olv@lunarg.com>2010-06-29 17:16:20 +0800
commit4cb853402b6c55f5dbabf4475cd46b34bd7b1bc1 (patch)
tree0c8d8d417627234ef75a92d9ecd29c0bf0fe8093 /src/gallium/state_trackers/egl/common/egl_g3d.c
parentafcea9b115cdfa0a6c948784f753d38b43240d25 (diff)
egl: Remove st/egl probe code.
It is no longer needed.
Diffstat (limited to 'src/gallium/state_trackers/egl/common/egl_g3d.c')
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.c74
1 files changed, 1 insertions, 73 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 494d6dd8b6..d7a2aa8b8e 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -88,51 +88,6 @@ egl_g3d_get_platform(_EGLDriver *drv, _EGLPlatformType plat)
return gdrv->platforms[plat];
}
-/**
- * Get the probe result of the display.
- *
- * Note that this function may be called before the display is initialized.
- */
-static enum native_probe_result
-egl_g3d_get_probe_result(_EGLDriver *drv, _EGLDisplay *dpy)
-{
- struct egl_g3d_driver *gdrv = egl_g3d_driver(drv);
- struct native_probe *nprobe;
- const struct native_platform *nplat;
-
- nplat = egl_g3d_get_platform(drv, dpy->Platform);
- if (!nplat || !nplat->create_probe)
- return NATIVE_PROBE_UNKNOWN;
-
- nprobe = (struct native_probe *) _eglGetProbeCache(gdrv->probe_key);
- if (!nprobe || nprobe->display != dpy->PlatformDisplay) {
- if (nprobe)
- nprobe->destroy(nprobe);
- nprobe = nplat->create_probe(dpy->PlatformDisplay);
- _eglSetProbeCache(gdrv->probe_key, (void *) nprobe);
- }
-
- return nplat->get_probe_result(nprobe);
-}
-
-/**
- * Destroy the probe object of the display. The display may be NULL.
- *
- * Note that this function may be called before the display is initialized.
- */
-static void
-egl_g3d_destroy_probe(_EGLDriver *drv, _EGLDisplay *dpy)
-{
- struct egl_g3d_driver *gdrv = egl_g3d_driver(drv);
- struct native_probe *nprobe;
-
- nprobe = (struct native_probe *) _eglGetProbeCache(gdrv->probe_key);
- if (nprobe && (!dpy || nprobe->display == dpy->PlatformDisplay)) {
- nprobe->destroy(nprobe);
- _eglSetProbeCache(gdrv->probe_key, NULL);
- }
-}
-
#ifdef EGL_MESA_screen_surface
static void
@@ -510,9 +465,6 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
struct egl_g3d_display *gdpy;
const struct native_platform *nplat;
- /* the probe object is unlikely to be needed again */
- egl_g3d_destroy_probe(drv, dpy);
-
nplat = egl_g3d_get_platform(drv, dpy->Platform);
if (!nplat)
return EGL_FALSE;
@@ -595,28 +547,7 @@ egl_g3d_get_proc_address(_EGLDriver *drv, const char *procname)
static EGLint
egl_g3d_probe(_EGLDriver *drv, _EGLDisplay *dpy)
{
- enum native_probe_result res;
- EGLint score;
-
- res = egl_g3d_get_probe_result(drv, dpy);
-
- switch (res) {
- case NATIVE_PROBE_UNKNOWN:
- default:
- score = 0;
- break;
- case NATIVE_PROBE_FALLBACK:
- score = 40;
- break;
- case NATIVE_PROBE_SUPPORTED:
- score = 50;
- break;
- case NATIVE_PROBE_EXACT:
- score = 100;
- break;
- }
-
- return score;
+ return (egl_g3d_get_platform(drv, dpy->Platform)) ? 90 : 0;
}
_EGLDriver *
@@ -637,9 +568,6 @@ egl_g3d_create_driver(const struct egl_g3d_loader *loader)
gdrv->base.Probe = egl_g3d_probe;
- /* the key is " EGL G3D" */
- gdrv->probe_key = 0x0E61063D;
-
/* to be filled by the caller */
gdrv->base.Name = NULL;
gdrv->base.Unload = NULL;