summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorJakob Borncrantz <jakob@vmware.com>2010-05-21 23:25:45 +0100
committerJakob Bornecrantz <jakob@vmware.com>2010-05-21 23:29:05 +0100
commit4db0c760195c67f1bc114fdfb8464791030a526c (patch)
tree7150261c8b1e9c2e80d8647a7abbf87c151c96cc /src/gallium/state_trackers
parentffd2bc3dfbcccd3c38ff93ac107027a5a5764eb5 (diff)
st_api: Give get_egl_image arguments directly to the function
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/common/dri_screen.c8
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_st.c15
2 files changed, 13 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 5decdb23b1..fa1a35deb3 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
@@ -314,15 +314,17 @@ dri_get_swap_info(__DRIdrawable * dPriv, __DRIswapInfo * sInfo)
static boolean
dri_get_egl_image(struct st_manager *smapi,
- struct st_egl_image *stimg)
+ struct st_context_iface *stctxi,
+ void *egl_image,
+ struct st_egl_image *stimg)
{
struct dri_context *ctx =
- (struct dri_context *)stimg->stctxi->st_manager_private;
+ (struct dri_context *)stctxi->st_manager_private;
struct dri_screen *screen = dri_screen(ctx->sPriv);
__DRIimage *img = NULL;
if (screen->lookup_egl_image) {
- img = screen->lookup_egl_image(ctx, stimg->egl_image);
+ img = screen->lookup_egl_image(ctx, egl_image);
}
if (!img)
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_st.c b/src/gallium/state_trackers/egl/common/egl_g3d_st.c
index 2d459d5a6c..cdf13140cb 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_st.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_st.c
@@ -206,10 +206,11 @@ egl_g3d_destroy_st_apis(void)
static boolean
egl_g3d_st_manager_get_egl_image(struct st_manager *smapi,
- struct st_egl_image *stimg)
+ void *egl_image,
+ struct st_egl_image *out)
{
struct egl_g3d_st_manager *gsmapi = egl_g3d_st_manager(smapi);
- EGLImageKHR handle = (EGLImageKHR) stimg->egl_image;
+ EGLImageKHR handle = (EGLImageKHR) egl_image;
_EGLImage *img;
struct egl_g3d_image *gimg;
@@ -224,11 +225,11 @@ egl_g3d_st_manager_get_egl_image(struct st_manager *smapi,
gimg = egl_g3d_image(img);
- stimg->texture = NULL;
- pipe_resource_reference(&stimg->texture, gimg->texture);
- stimg->face = gimg->face;
- stimg->level = gimg->level;
- stimg->zslice = gimg->zslice;
+ out->texture = NULL;
+ pipe_resource_reference(&out->texture, gimg->texture);
+ out->face = gimg->face;
+ out->level = gimg->level;
+ out->zslice = gimg->zslice;
_eglUnlockMutex(&gsmapi->display->Mutex);