summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/drm
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-09-22 22:01:17 -0400
committerKristian Høgsberg <[email protected]>2010-09-22 22:02:05 -0400
commit17eace581d25a626a7d75d9d1205d012cbb14a6e (patch)
tree743e51cafdb23f5a59cec7813642296c5bcd04ed /src/gallium/state_trackers/dri/drm
parent1c2423999e35576bebd7962a907507a81eb79b07 (diff)
dri: Pass the __DRIscreen and the __DRIscreen private back to image lookup
We will typically have a current context when we need to lookup the image, but the lookup implementation don't need it so drop it.
Diffstat (limited to 'src/gallium/state_trackers/dri/drm')
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 135f66c61da..116afccb194 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -291,15 +291,16 @@ 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;
}
@@ -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:
@@ -556,8 +558,6 @@ dri2_create_context(gl_api api, const __GLcontextModes * visual,
ctx = cPriv->driverPrivate;
- ctx->lookup_egl_image = dri2_lookup_egl_image;
-
return TRUE;
}