From d5ab243d5a5bacbd2ba615d40f13c8ab37364745 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 29 Jun 2010 14:58:33 +0800 Subject: st/egl: Move module loading code to targets. Several changes are made. libegl.a no longer defines _eglMain. It defines functions to create and destroy a _EGLDriver instead. The creation function is called by the targets. It takes an egl_g3d_loader as its argument. The loader is defined by the targets and is in charge of creating st_api and pipe_screen. This allows us to move the module loading code to targets. Lastly, the modules are now loaded as the respective contexts are created. --- src/gallium/state_trackers/egl/common/native.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/gallium/state_trackers/egl/common/native.h') diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h index c4d23bf541..7e84d74ea7 100644 --- a/src/gallium/state_trackers/egl/common/native.h +++ b/src/gallium/state_trackers/egl/common/native.h @@ -32,6 +32,7 @@ #include "pipe/p_screen.h" #include "pipe/p_context.h" #include "pipe/p_state.h" +#include "state_tracker/sw_winsys.h" #include "native_probe.h" #include "native_modeset.h" @@ -196,6 +197,11 @@ struct native_event_handler { void (*invalid_surface)(struct native_display *ndpy, struct native_surface *nsurf, unsigned int seq_num); + + struct pipe_screen *(*new_drm_screen)(struct native_display *ndpy, + const char *name, int fd); + struct pipe_screen *(*new_sw_screen)(struct native_display *ndpy, + struct sw_winsys *ws); }; /** @@ -225,7 +231,8 @@ struct native_platform { enum native_probe_result (*get_probe_result)(struct native_probe *nprobe); struct native_display *(*create_display)(void *dpy, - struct native_event_handler *handler); + struct native_event_handler *handler, + void *user_data); }; const struct native_platform * -- cgit v1.2.3