diff options
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_context.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_context.h | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_drawable.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_drawable.h | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_screen.c | 11 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_screen.h | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/drm/dri2.c | 20 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/sw/drisw.c | 2 |
8 files changed, 23 insertions, 26 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c index 22e1b6dd70..770b37037f 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.c +++ b/src/gallium/state_trackers/dri/common/dri_context.c @@ -49,7 +49,7 @@ dri_init_extensions(struct dri_context *ctx) } GLboolean -dri_create_context(gl_api api, const __GLcontextModes * visual, +dri_create_context(gl_api api, const struct gl_config * visual, __DRIcontext * cPriv, void *sharedContextPrivate) { __DRIscreen *sPriv = cPriv->driScreenPriv; diff --git a/src/gallium/state_trackers/dri/common/dri_context.h b/src/gallium/state_trackers/dri/common/dri_context.h index ffe9eba13c..35105e861f 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.h +++ b/src/gallium/state_trackers/dri/common/dri_context.h @@ -61,9 +61,6 @@ struct dri_context /* gallium */ struct st_api *stapi; struct st_context_iface *st; - - /* hooks filled in by dri2 & drisw */ - __DRIimage * (*lookup_egl_image)(struct dri_context *ctx, void *handle); }; static INLINE struct dri_context * @@ -91,7 +88,7 @@ dri_get_current(__DRIscreen * driScreenPriv); boolean dri_create_context(gl_api api, - const __GLcontextModes * visual, + const struct gl_config * visual, __DRIcontext * driContextPriv, void *sharedContextPrivate); diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/state_trackers/dri/common/dri_drawable.c index 1bdfdccf43..5fd6e7863c 100644 --- a/src/gallium/state_trackers/dri/common/dri_drawable.c +++ b/src/gallium/state_trackers/dri/common/dri_drawable.c @@ -112,7 +112,7 @@ dri_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi, boolean dri_create_buffer(__DRIscreen * sPriv, __DRIdrawable * dPriv, - const __GLcontextModes * visual, boolean isPixmap) + const struct gl_config * visual, boolean isPixmap) { struct dri_screen *screen = sPriv->private; struct dri_drawable *drawable = NULL; diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.h b/src/gallium/state_trackers/dri/common/dri_drawable.h index 74e662d36c..837d398374 100644 --- a/src/gallium/state_trackers/dri/common/dri_drawable.h +++ b/src/gallium/state_trackers/dri/common/dri_drawable.h @@ -79,7 +79,7 @@ dri_drawable(__DRIdrawable * driDrawPriv) boolean dri_create_buffer(__DRIscreen * sPriv, __DRIdrawable * dPriv, - const __GLcontextModes * visual, boolean isPixmap); + const struct gl_config * visual, boolean isPixmap); void dri_destroy_buffer(__DRIdrawable * dPriv); diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 475a96d196..252ad1768d 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -33,7 +33,6 @@ #include "xmlpool.h" #include "dri_screen.h" -#include "dri_context.h" #include "util/u_inlines.h" #include "pipe/p_screen.h" @@ -228,7 +227,7 @@ dri_fill_in_modes(struct dri_screen *screen, */ void dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen, - const __GLcontextModes *mode) + const struct gl_config *mode) { memset(stvis, 0, sizeof(*stvis)); @@ -287,16 +286,14 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen, static boolean dri_get_egl_image(struct st_manager *smapi, - struct st_context_iface *stctxi, void *egl_image, struct st_egl_image *stimg) { - struct dri_context *ctx = - (struct dri_context *)stctxi->st_manager_private; + struct dri_screen *screen = (struct dri_screen *)smapi; __DRIimage *img = NULL; - if (ctx->lookup_egl_image) { - img = ctx->lookup_egl_image(ctx, egl_image); + if (screen->lookup_egl_image) { + img = screen->lookup_egl_image(screen, egl_image); } if (!img) diff --git a/src/gallium/state_trackers/dri/common/dri_screen.h b/src/gallium/state_trackers/dri/common/dri_screen.h index 849f399b2f..0da9b5510f 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.h +++ b/src/gallium/state_trackers/dri/common/dri_screen.h @@ -69,6 +69,9 @@ struct dri_screen boolean sd_depth_bits_last; boolean auto_fake_front; enum pipe_texture_target target; + + /* hooks filled in by dri2 & drisw */ + __DRIimage * (*lookup_egl_image)(struct dri_screen *ctx, void *handle); }; /** cast wrapper */ @@ -111,7 +114,7 @@ dri_with_format(__DRIscreen * sPriv) void dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen, - const __GLcontextModes *mode); + const struct gl_config *mode); const __DRIconfig ** dri_init_screen_helper(struct dri_screen *screen, diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 596309bfbd..3c5b075617 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -291,25 +291,26 @@ dri2_flush_frontbuffer(struct dri_drawable *drawable, } static __DRIimage * -dri2_lookup_egl_image(struct dri_context *ctx, void *handle) +dri2_lookup_egl_image(struct dri_screen *screen, void *handle) { - __DRIimageLookupExtension *loader = ctx->sPriv->dri2.image; + __DRIimageLookupExtension *loader = screen->sPriv->dri2.image; __DRIimage *img; if (!loader->lookupEGLImage) return NULL; - img = loader->lookupEGLImage(ctx->cPriv, handle, ctx->cPriv->loaderPrivate); + img = loader->lookupEGLImage(screen->sPriv, + handle, screen->sPriv->loaderPrivate); return img; } static __DRIimage * -dri2_create_image_from_name(__DRIcontext *context, +dri2_create_image_from_name(__DRIscreen *_screen, int width, int height, int format, int name, int pitch, void *loaderPrivate) { - struct dri_screen *screen = dri_screen(context->driScreenPriv); + struct dri_screen *screen = dri_screen(_screen); __DRIimage *img; struct pipe_resource templ; struct winsys_handle whandle; @@ -501,7 +502,7 @@ static const __DRIextension *dri_screen_extensions[] = { /** * This is the driver specific part of the createNewScreen entry point. * - * Returns the __GLcontextModes supported by this driver. + * Returns the struct gl_config supported by this driver. */ static const __DRIconfig ** dri2_init_screen(__DRIscreen * sPriv) @@ -537,6 +538,7 @@ dri2_init_screen(__DRIscreen * sPriv) screen->auto_fake_front = dri_with_format(sPriv); screen->broken_invalidate = !sPriv->dri2.useInvalidate; + screen->lookup_egl_image = dri2_lookup_egl_image; return configs; fail: @@ -546,7 +548,7 @@ fail: } static boolean -dri2_create_context(gl_api api, const __GLcontextModes * visual, +dri2_create_context(gl_api api, const struct gl_config * visual, __DRIcontext * cPriv, void *sharedContextPrivate) { struct dri_context *ctx = NULL; @@ -556,15 +558,13 @@ dri2_create_context(gl_api api, const __GLcontextModes * visual, ctx = cPriv->driverPrivate; - ctx->lookup_egl_image = dri2_lookup_egl_image; - return TRUE; } static boolean dri2_create_buffer(__DRIscreen * sPriv, __DRIdrawable * dPriv, - const __GLcontextModes * visual, boolean isPixmap) + const struct gl_config * visual, boolean isPixmap) { struct dri_drawable *drawable = NULL; diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c index 04bba631ae..c48cc44036 100644 --- a/src/gallium/state_trackers/dri/sw/drisw.c +++ b/src/gallium/state_trackers/dri/sw/drisw.c @@ -298,7 +298,7 @@ fail: static boolean drisw_create_buffer(__DRIscreen * sPriv, __DRIdrawable * dPriv, - const __GLcontextModes * visual, boolean isPixmap) + const struct gl_config * visual, boolean isPixmap) { struct dri_drawable *drawable = NULL; |