[Mesa-dev] [PATCH] egl: remove explicit config_id management from dri2_add_config()

Eric Engestrom eric.engestrom at imgtec.com
Thu Oct 20 14:47:27 UTC 2016


On Friday, 2016-09-30 13:45:55 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> Currently we only saved the id to memcpy the whole _EGLConfig to write
> back the exact same id value.
> 
> Remove the unneeded and confusing/misleading code.
> 
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>

Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

> ---
>  src/egl/drivers/dri2/egl_dri2.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
> index 1659af6..39e6244 100644
> --- a/src/egl/drivers/dri2/egl_dri2.c
> +++ b/src/egl/drivers/dri2/egl_dri2.c
> @@ -166,7 +166,6 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
>     unsigned int dri_masks[4] = { 0, 0, 0, 0 };
>     _EGLConfig *matching_config;
>     EGLint num_configs = 0;
> -   EGLint config_id;
>     int i;
>  
>     dri2_dpy = disp->DriverData;
> @@ -278,7 +277,6 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
>        return NULL;
>     }
>  
> -   config_id = base.ConfigID;
>     base.ConfigID    = EGL_DONT_CARE;
>     base.SurfaceType = EGL_DONT_CARE;
>     num_configs = _eglFilterArray(disp->Configs, (void **) &matching_config, 1,
> @@ -307,7 +305,6 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
>  
>        memcpy(&conf->base, &base, sizeof base);
>        conf->base.SurfaceType = 0;
> -      conf->base.ConfigID = config_id;
>  
>        _eglLinkConfig(&conf->base);
>     }
> -- 
> 2.9.3


More information about the mesa-dev mailing list