Mesa (gallium-screen-context): st/egl: remove a layer of wrappers around screen::create_context
Keith Whitwell
keithw at kemper.freedesktop.org
Thu Feb 4 16:13:04 UTC 2010
Module: Mesa
Branch: gallium-screen-context
Commit: e809313a44287dc4e16c28e9e74ef3b2b5271aa1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e809313a44287dc4e16c28e9e74ef3b2b5271aa1
Author: Keith Whitwell <keithw at vmware.com>
Date: Thu Feb 4 16:12:51 2010 +0000
st/egl: remove a layer of wrappers around screen::create_context
---
src/gallium/state_trackers/egl/common/egl_g3d.c | 7 +++++--
src/gallium/state_trackers/egl/common/native.h | 5 -----
src/gallium/state_trackers/egl/kms/native_kms.c | 12 ------------
src/gallium/state_trackers/egl/x11/native_dri2.c | 10 ----------
src/gallium/state_trackers/egl/x11/native_ximage.c | 8 --------
5 files changed, 5 insertions(+), 37 deletions(-)
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 8a73e81..05805e8 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -643,8 +643,11 @@ egl_g3d_create_context(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
}
mode = &gconf->native->mode;
- gctx->pipe =
- gdpy->native->create_context(gdpy->native, (void *) &gctx->base);
+
+ gctx->pipe = gdpy->native->screen->create_context(
+ gdpy->native->screen,
+ (void *) &gctx->base);
+
if (!gctx->pipe) {
free(gctx);
return NULL;
diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h
index 72a9cec..4f97585 100644
--- a/src/gallium/state_trackers/egl/common/native.h
+++ b/src/gallium/state_trackers/egl/common/native.h
@@ -167,11 +167,6 @@ struct native_display {
EGLNativePixmapType pix,
const struct native_config *nconf);
- /**
- * Create a pipe context.
- */
- struct pipe_context *(*create_context)(struct native_display *ndpy,
- void *context_private);
/**
* Create a window surface. Required unless no config has GLX_WINDOW_BIT
diff --git a/src/gallium/state_trackers/egl/kms/native_kms.c b/src/gallium/state_trackers/egl/kms/native_kms.c
index d5baf2c..9810e58 100644
--- a/src/gallium/state_trackers/egl/kms/native_kms.c
+++ b/src/gallium/state_trackers/egl/kms/native_kms.c
@@ -573,17 +573,6 @@ kms_display_create_pbuffer_surface(struct native_display *ndpy,
return &ksurf->base;
}
-static struct pipe_context *
-kms_display_create_context(struct native_display *ndpy, void *context_private)
-{
- struct kms_display *kdpy = kms_display(ndpy);
- struct pipe_context *pctx;
-
- pctx = kdpy->api->create_context(kdpy->api, kdpy->base.screen);
- if (pctx)
- pctx->priv = context_private;
- return pctx;
-}
static boolean
kms_display_is_format_supported(struct native_display *ndpy,
@@ -812,7 +801,6 @@ kms_create_display(EGLNativeDisplayType dpy, struct drm_api *api)
kdpy->base.destroy = kms_display_destroy;
kdpy->base.get_configs = kms_display_get_configs;
- kdpy->base.create_context = kms_display_create_context;
kdpy->base.create_pbuffer_surface = kms_display_create_pbuffer_surface;
kdpy->base.modeset = &kms_display_modeset;
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c
index bbbabab..ceec678 100644
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -401,15 +401,6 @@ dri2_display_create_pbuffer_surface(struct native_display *ndpy,
return (dri2surf) ? &dri2surf->base : NULL;
}
-static struct pipe_context *
-dri2_display_create_context(struct native_display *ndpy, void *context_private)
-{
- struct dri2_display *dri2dpy = dri2_display(ndpy);
-
- return dri2dpy->base.screen->context_create(dri2dpy->base.screen,
- context_private );
-}
-
static int
choose_color_format(const __GLcontextModes *mode, enum pipe_format formats[32])
{
@@ -693,7 +684,6 @@ x11_create_dri2_display(EGLNativeDisplayType dpy, struct drm_api *api)
dri2dpy->base.destroy = dri2_display_destroy;
dri2dpy->base.get_configs = dri2_display_get_configs;
dri2dpy->base.is_pixmap_supported = dri2_display_is_pixmap_supported;
- dri2dpy->base.create_context = dri2_display_create_context;
dri2dpy->base.create_window_surface = dri2_display_create_window_surface;
dri2dpy->base.create_pixmap_surface = dri2_display_create_pixmap_surface;
dri2dpy->base.create_pbuffer_surface = dri2_display_create_pbuffer_surface;
diff --git a/src/gallium/state_trackers/egl/x11/native_ximage.c b/src/gallium/state_trackers/egl/x11/native_ximage.c
index d0209a5..a303693 100644
--- a/src/gallium/state_trackers/egl/x11/native_ximage.c
+++ b/src/gallium/state_trackers/egl/x11/native_ximage.c
@@ -491,13 +491,6 @@ ximage_display_create_pbuffer_surface(struct native_display *ndpy,
return (xsurf) ? &xsurf->base : NULL;
}
-static struct pipe_context *
-ximage_display_create_context(struct native_display *ndpy,
- void *context_private)
-{
- return ndpy->screen->context_create( ndpy->screen, context_private );
-}
-
static enum pipe_format
choose_format(const XVisualInfo *vinfo)
{
@@ -682,7 +675,6 @@ x11_create_ximage_display(EGLNativeDisplayType dpy, boolean use_xshm)
xdpy->base.get_configs = ximage_display_get_configs;
xdpy->base.is_pixmap_supported = ximage_display_is_pixmap_supported;
- xdpy->base.create_context = ximage_display_create_context;
xdpy->base.create_window_surface = ximage_display_create_window_surface;
xdpy->base.create_pixmap_surface = ximage_display_create_pixmap_surface;
xdpy->base.create_pbuffer_surface = ximage_display_create_pbuffer_surface;
More information about the mesa-commit
mailing list