[Mesa-dev] [PATCH] dri: Remove redundant createNewContext function from __DRIimageDriverExtension

Eric Anholt eric at anholt.net
Tue Nov 12 12:23:52 PST 2013


Kristian Høgsberg <krh at bitplanet.net> writes:

> createContextAttribs is a superset of what createNewContext provides.
> Also remove the function typedef, since createNewContext is deprecated
> and no longer used in  multiple interfaces.

Looks like we failed at git grep yesterday.  It is actually used:

src/glx/dri3_glx.c:      (*psc->image_driver->createNewContext) (psc->driScreen,

>
> Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
> ---
>  include/GL/internal/dri_interface.h    | 12 ++++--------
>  src/mesa/drivers/dri/common/dri_util.c |  1 -
>  2 files changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
> index ed43257..b012570 100644
> --- a/include/GL/internal/dri_interface.h
> +++ b/include/GL/internal/dri_interface.h
> @@ -783,12 +783,6 @@ typedef __DRIdrawable *
>                                void *loaderPrivate);
>  
>  typedef __DRIcontext *
> -(*__DRIcreateNewContextFunc)(__DRIscreen *screen,
> -                             const __DRIconfig *config,
> -                             __DRIcontext *shared,
> -                             void *loaderPrivate);
> -
> -typedef __DRIcontext *
>  (*__DRIcreateContextAttribsFunc)(__DRIscreen *screen,
>                                   int api,
>                                   const __DRIconfig *config,
> @@ -949,7 +943,10 @@ struct __DRIdri2ExtensionRec {
>  				    void *loaderPrivate);
>  
>     __DRIcreateNewDrawableFunc   createNewDrawable;
> -   __DRIcreateNewContextFunc    createNewContext;
> +   __DRIcontext *(*createNewContext)(__DRIscreen *screen,
> +                                     const __DRIconfig *config,
> +                                     __DRIcontext *shared,
> +                                     void *loaderPrivate);
>  
>     /* Since version 2 */
>     __DRIgetAPIMaskFunc          getAPIMask;
> @@ -1405,7 +1402,6 @@ struct __DRIimageDriverExtensionRec {
>     /* Common DRI functions, shared with DRI2 */
>     __DRIcreateNewScreen2Func            createNewScreen2;
>     __DRIcreateNewDrawableFunc           createNewDrawable;
> -   __DRIcreateNewContextFunc            createNewContext;
>     __DRIcreateContextAttribsFunc        createContextAttribs;
>     __DRIgetAPIMaskFunc                  getAPIMask;
>  };
> diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
> index a7328e4..27e1eb2 100644
> --- a/src/mesa/drivers/dri/common/dri_util.c
> +++ b/src/mesa/drivers/dri/common/dri_util.c
> @@ -943,7 +943,6 @@ const __DRIimageDriverExtension driImageDriverExtension = {
>  
>      .createNewScreen2           = driCreateNewScreen2,
>      .createNewDrawable          = driCreateNewDrawable,
> -    .createNewContext           = driCreateNewContext,
>      .getAPIMask                 = driGetAPIMask,
>      .createContextAttribs       = driCreateContextAttribs,
>  };
> -- 
> 1.8.3.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131112/02470d7c/attachment.pgp>


More information about the mesa-dev mailing list