[Mesa-dev] [PATCH 28/30] loader/dri3: constify the loader_dri3_vtable

Eric Engestrom eric at engestrom.ch
Sun Sep 25 03:34:09 UTC 2016


On Thu, Aug 25, 2016 at 05:18:50PM +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.veliikov at collabora.com>
> 
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>

Oops, forgot this one, which is also:
Reviewed-by: Eric Engestrom <eric at engestrom.ch>

> ---
>  src/egl/drivers/dri2/platform_x11_dri3.c | 2 +-
>  src/glx/dri3_glx.c                       | 2 +-
>  src/loader/loader_dri3_helper.c          | 2 +-
>  src/loader/loader_dri3_helper.h          | 4 ++--
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c
> index 2da4c14..318f853 100644
> --- a/src/egl/drivers/dri2/platform_x11_dri3.c
> +++ b/src/egl/drivers/dri2/platform_x11_dri3.c
> @@ -112,7 +112,7 @@ egl_dri3_flush_drawable(struct loader_dri3_drawable *draw, unsigned flags)
>     dri2_flush_drawable_for_swapbuffers(disp, &dri3_surf->base);
>  }
>  
> -static struct loader_dri3_vtable egl_dri3_vtable = {
> +static const struct loader_dri3_vtable egl_dri3_vtable = {
>     .get_swap_interval = egl_dri3_get_swap_interval,
>     .clamp_swap_interval = egl_dri3_clamp_swap_interval,
>     .set_swap_interval = egl_dri3_set_swap_interval,
> diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
> index 90d7bba..1c9f6a1 100644
> --- a/src/glx/dri3_glx.c
> +++ b/src/glx/dri3_glx.c
> @@ -162,7 +162,7 @@ glx_dri3_show_fps(struct loader_dri3_drawable *draw, uint64_t current_ust)
>     }
>  }
>  
> -static struct loader_dri3_vtable glx_dri3_vtable = {
> +static const struct loader_dri3_vtable glx_dri3_vtable = {
>     .get_swap_interval = glx_dri3_get_swap_interval,
>     .clamp_swap_interval = glx_dri3_clamp_swap_interval,
>     .set_swap_interval = glx_dri3_set_swap_interval,
> diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
> index 86ae5ae..d120dee 100644
> --- a/src/loader/loader_dri3_helper.c
> +++ b/src/loader/loader_dri3_helper.c
> @@ -132,7 +132,7 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
>                            bool is_different_gpu,
>                            const __DRIconfig *dri_config,
>                            struct loader_dri3_extensions *ext,
> -                          struct loader_dri3_vtable *vtable,
> +                          const struct loader_dri3_vtable *vtable,
>                            struct loader_dri3_drawable *draw)
>  {
>     xcb_get_geometry_cookie_t cookie;
> diff --git a/src/loader/loader_dri3_helper.h b/src/loader/loader_dri3_helper.h
> index 5b8fd1d..ae6ab66 100644
> --- a/src/loader/loader_dri3_helper.h
> +++ b/src/loader/loader_dri3_helper.h
> @@ -158,7 +158,7 @@ struct loader_dri3_drawable {
>     bool first_init;
>  
>     struct loader_dri3_extensions *ext;
> -   struct loader_dri3_vtable *vtable;
> +   const struct loader_dri3_vtable *vtable;
>  };
>  
>  void
> @@ -175,7 +175,7 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
>                            bool is_different_gpu,
>                            const __DRIconfig *dri_config,
>                            struct loader_dri3_extensions *ext,
> -                          struct loader_dri3_vtable *vtable,
> +                          const struct loader_dri3_vtable *vtable,
>                            struct loader_dri3_drawable*);
>  
>  bool loader_dri3_wait_for_msc(struct loader_dri3_drawable *draw,
> -- 
> 2.9.0


More information about the mesa-dev mailing list