summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
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
parentafcea9b115cdfa0a6c948784f753d38b43240d25 (diff)
egl: Remove st/egl probe code.
It is no longer needed.
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.c74
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.h1
-rw-r--r--src/gallium/state_trackers/egl/common/native.h15
-rw-r--r--src/gallium/state_trackers/egl/common/native_probe.h52
-rw-r--r--src/gallium/state_trackers/egl/fbdev/native_fbdev.c2
-rw-r--r--src/gallium/state_trackers/egl/gdi/native_gdi.c2
-rw-r--r--src/gallium/state_trackers/egl/kms/native_kms.c2
-rw-r--r--src/gallium/state_trackers/egl/x11/native_x11.c2
8 files changed, 1 insertions, 149 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 494d6dd8b6d..d7a2aa8b8ea 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;
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.h b/src/gallium/state_trackers/egl/common/egl_g3d.h
index d9ecb208e05..ed2b0409bb9 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.h
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.h
@@ -47,7 +47,6 @@ struct egl_g3d_driver {
_EGLDriver base;
const struct egl_g3d_loader *loader;
const struct native_platform *platforms[_EGL_NUM_PLATFORMS];
- EGLint probe_key;
};
struct egl_g3d_display {
diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h
index 7e84d74ea7c..9f34c517ef8 100644
--- a/src/gallium/state_trackers/egl/common/native.h
+++ b/src/gallium/state_trackers/egl/common/native.h
@@ -34,7 +34,6 @@
#include "pipe/p_state.h"
#include "state_tracker/sw_winsys.h"
-#include "native_probe.h"
#include "native_modeset.h"
/**
@@ -216,20 +215,6 @@ native_attachment_mask_test(uint mask, enum native_attachment att)
struct native_platform {
const char *name;
- /**
- * Return a probe object for the given display.
- *
- * Note that the returned object may be cached and used by different native
- * display modules. It allows fast probing when multiple modules probe the
- * same display.
- */
- struct native_probe *(*create_probe)(void *dpy);
-
- /**
- * Probe the probe object.
- */
- enum native_probe_result (*get_probe_result)(struct native_probe *nprobe);
-
struct native_display *(*create_display)(void *dpy,
struct native_event_handler *handler,
void *user_data);
diff --git a/src/gallium/state_trackers/egl/common/native_probe.h b/src/gallium/state_trackers/egl/common/native_probe.h
deleted file mode 100644
index c0b7f2a1ff7..00000000000
--- a/src/gallium/state_trackers/egl/common/native_probe.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 7.8
- *
- * Copyright (C) 2009-2010 Chia-I Wu <olv@0xlab.org>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _NATIVE_PROBE_H_
-#define _NATIVE_PROBE_H_
-
-#include "EGL/egl.h" /* for EGL native types */
-
-/**
- * Enumerations for probe results.
- */
-enum native_probe_result {
- NATIVE_PROBE_UNKNOWN,
- NATIVE_PROBE_FALLBACK,
- NATIVE_PROBE_SUPPORTED,
- NATIVE_PROBE_EXACT,
-};
-
-/**
- * A probe object for display probe.
- */
-struct native_probe {
- int magic;
- void *display;
- void *data;
-
- void (*destroy)(struct native_probe *nprobe);
-};
-
-#endif /* _NATIVE_PROBE_H_ */
diff --git a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
index 7c276c22f8c..e459402076d 100644
--- a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
+++ b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
@@ -457,8 +457,6 @@ native_create_display(void *dpy, struct native_event_handler *event_handler,
static const struct native_platform fbdev_platform = {
"FBDEV", /* name */
- NULL, /* create_probe */
- NULL, /* get_probe_result */
native_create_display
};
diff --git a/src/gallium/state_trackers/egl/gdi/native_gdi.c b/src/gallium/state_trackers/egl/gdi/native_gdi.c
index ed955c4132d..06e3edfc391 100644
--- a/src/gallium/state_trackers/egl/gdi/native_gdi.c
+++ b/src/gallium/state_trackers/egl/gdi/native_gdi.c
@@ -389,8 +389,6 @@ native_create_display(void *dpy, struct native_event_handler *event_handler,
static const struct native_platform gdi_platform = {
"GDI", /* name */
- NULL, /* create_probe */
- NULL, /* get_probe_result */
native_create_display
};
diff --git a/src/gallium/state_trackers/egl/kms/native_kms.c b/src/gallium/state_trackers/egl/kms/native_kms.c
index 5833d27a250..d4e8fbc9131 100644
--- a/src/gallium/state_trackers/egl/kms/native_kms.c
+++ b/src/gallium/state_trackers/egl/kms/native_kms.c
@@ -767,8 +767,6 @@ native_create_display(void *dpy, struct native_event_handler *event_handler,
static const struct native_platform kms_platform = {
"KMS", /* name */
- NULL, /* create_probe */
- NULL, /* get_probe_result */
native_create_display
};
diff --git a/src/gallium/state_trackers/egl/x11/native_x11.c b/src/gallium/state_trackers/egl/x11/native_x11.c
index 8dc19d0dd9f..fc12720c428 100644
--- a/src/gallium/state_trackers/egl/x11/native_x11.c
+++ b/src/gallium/state_trackers/egl/x11/native_x11.c
@@ -59,8 +59,6 @@ native_create_display(void *dpy, struct native_event_handler *event_handler,
static const struct native_platform x11_platform = {
"X11", /* name */
- NULL, /* create_probe */
- NULL, /* get_probe_result */
native_create_display
};