diff options
author | Jakob Bornecrantz <[email protected]> | 2010-05-27 00:38:30 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-06-06 12:29:28 +0100 |
commit | f9d9574913c5edb92191ac3f5e8d011452427852 (patch) | |
tree | abdab8c910f4c07e3e11b05bce997df3a9ae3ae3 /src/gallium/state_trackers/egl/x11/native_dri2.c | |
parent | 76aed4b070be8950fd8ea5caff59321885ff0a06 (diff) |
gallium: Convert state trackers to drm driver interface
Diffstat (limited to 'src/gallium/state_trackers/egl/x11/native_dri2.c')
-rw-r--r-- | src/gallium/state_trackers/egl/x11/native_dri2.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c index 3f802dd713f..0ce7c0be64b 100644 --- a/src/gallium/state_trackers/egl/x11/native_dri2.c +++ b/src/gallium/state_trackers/egl/x11/native_dri2.c @@ -32,7 +32,7 @@ #include "pipe/p_screen.h" #include "pipe/p_context.h" #include "pipe/p_state.h" -#include "state_tracker/drm_api.h" +#include "state_tracker/drm_driver.h" #include "egllog.h" #include "native_x11.h" @@ -50,7 +50,6 @@ struct dri2_display { struct native_event_handler *event_handler; - struct drm_api *api; struct x11_screen *xscr; int xscr_number; const char *dri_driver; @@ -662,8 +661,6 @@ dri2_display_destroy(struct native_display *ndpy) x11_screen_destroy(dri2dpy->xscr); if (dri2dpy->own_dpy) XCloseDisplay(dri2dpy->dpy); - if (dri2dpy->api && dri2dpy->api->destroy) - dri2dpy->api->destroy(dri2dpy->api); FREE(dri2dpy); } @@ -695,7 +692,7 @@ static boolean dri2_display_init_screen(struct native_display *ndpy) { struct dri2_display *dri2dpy = dri2_display(ndpy); - const char *driver = dri2dpy->api->name; + const char *driver = driver_descriptor.name; int fd; if (!x11_screen_support(dri2dpy->xscr, X11_SCREEN_EXTENSION_DRI2) || @@ -709,7 +706,7 @@ dri2_display_init_screen(struct native_display *ndpy) if (!dri2dpy->dri_driver || !driver || strcmp(dri2dpy->dri_driver, driver) != 0) { _eglLog(_EGL_WARNING, "Driver mismatch: %s != %s", - dri2dpy->dri_driver, dri2dpy->api->name); + dri2dpy->dri_driver, driver); return FALSE; } @@ -718,7 +715,7 @@ dri2_display_init_screen(struct native_display *ndpy) if (fd < 0) return FALSE; - dri2dpy->base.screen = dri2dpy->api->create_screen(dri2dpy->api, fd); + dri2dpy->base.screen = driver_descriptor.create_screen(fd); if (!dri2dpy->base.screen) { _eglLog(_EGL_WARNING, "failed to create DRM screen"); return FALSE; @@ -742,8 +739,7 @@ dri2_display_hash_table_compare(void *key1, void *key2) struct native_display * x11_create_dri2_display(EGLNativeDisplayType dpy, - struct native_event_handler *event_handler, - struct drm_api *api) + struct native_event_handler *event_handler) { struct dri2_display *dri2dpy; @@ -752,7 +748,6 @@ x11_create_dri2_display(EGLNativeDisplayType dpy, return NULL; dri2dpy->event_handler = event_handler; - dri2dpy->api = api; dri2dpy->dpy = dpy; if (!dri2dpy->dpy) { |