From 17eace581d25a626a7d75d9d1205d012cbb14a6e Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Wed, 22 Sep 2010 22:01:17 -0400 Subject: 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. --- src/mesa/drivers/dri/common/dri_util.c | 1 + src/mesa/drivers/dri/common/dri_util.h | 1 + src/mesa/drivers/dri/intel/intel_fbo.c | 4 ++-- src/mesa/drivers/dri/intel/intel_tex_image.c | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index f07c3da4bb6..d46f622d573 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -880,6 +880,7 @@ dri2CreateNewScreen(int scrn, int fd, } psp->DriverAPI = driDriverAPI; + psp->loaderPrivate = data; driParseOptionInfo(&psp->optionInfo, __dri2ConfigOptions, __dri2NConfigOptions); diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 5096d22cad3..785beacd817 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -539,6 +539,7 @@ struct __DRIscreenRec { driOptionCache optionInfo; driOptionCache optionCache; unsigned int api_mask; + void *loaderPrivate; }; extern void diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 2693b5fa72e..363a5c02425 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -202,8 +202,8 @@ intel_image_target_renderbuffer_storage(GLcontext *ctx, __DRIimage *image; screen = intel->intelScreen->driScrnPriv; - image = screen->dri2.image->lookupEGLImage(intel->driContext, image_handle, - intel->driContext->loaderPrivate); + image = screen->dri2.image->lookupEGLImage(screen, image_handle, + screen->loaderPrivate); if (image == NULL) return; diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 7d33df35998..b1ed7ee5e73 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -805,8 +805,8 @@ intel_image_target_texture_2d(GLcontext *ctx, GLenum target, __DRIimage *image; screen = intel->intelScreen->driScrnPriv; - image = screen->dri2.image->lookupEGLImage(intel->driContext, image_handle, - intel->driContext->loaderPrivate); + image = screen->dri2.image->lookupEGLImage(screen, image_handle, + screen->loaderPrivate); if (image == NULL) return; -- cgit v1.2.3