summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/dri/common
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-09-22 22:01:17 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-09-22 22:02:05 -0400
commit17eace581d25a626a7d75d9d1205d012cbb14a6e (patch)
tree743e51cafdb23f5a59cec7813642296c5bcd04ed /src/gallium/state_trackers/dri/common
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/common')
-rw-r--r--src/gallium/state_trackers/dri/common/dri_context.h3
-rw-r--r--src/gallium/state_trackers/dri/common/dri_screen.c8
-rw-r--r--src/gallium/state_trackers/dri/common/dri_screen.h3
3 files changed, 6 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_context.h b/src/gallium/state_trackers/dri/common/dri_context.h
index ffe9eba13c..beb59c6f68 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 *
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 475a96d196..7e4b11d83f 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
@@ -287,16 +287,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..d4eb8f454f 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 */