summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/egl')
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.c7
-rw-r--r--src/gallium/state_trackers/egl/common/native.h5
-rw-r--r--src/gallium/state_trackers/egl/kms/native_kms.c12
-rw-r--r--src/gallium/state_trackers/egl/x11/native_dri2.c13
-rw-r--r--src/gallium/state_trackers/egl/x11/native_ximage.c11
5 files changed, 5 insertions, 43 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 70216177bd..424be49311 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -645,8 +645,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 72a9cec7ef..4f9758545a 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 445c28c383..91cefc538d 100644
--- a/src/gallium/state_trackers/egl/kms/native_kms.c
+++ b/src/gallium/state_trackers/egl/kms/native_kms.c
@@ -575,17 +575,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,
@@ -814,7 +803,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 b2eba7219f..5f2fd41260 100644
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -402,18 +402,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);
- struct pipe_context *pctx;
-
- pctx = dri2dpy->api->create_context(dri2dpy->api, dri2dpy->base.screen);
- if (pctx)
- pctx->priv = context_private;
- return pctx;
-}
-
static int
choose_color_format(const __GLcontextModes *mode, enum pipe_format formats[32])
{
@@ -697,7 +685,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 7946415ce7..92a62f230e 100644
--- a/src/gallium/state_trackers/egl/x11/native_ximage.c
+++ b/src/gallium/state_trackers/egl/x11/native_ximage.c
@@ -492,16 +492,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)
-{
- struct pipe_context *pctx = softpipe_create(ndpy->screen);
- if (pctx)
- pctx->priv = context_private;
- return pctx;
-}
-
static enum pipe_format
choose_format(const XVisualInfo *vinfo)
{
@@ -686,7 +676,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;