loader/dri3: constify the loader_dri3_vtable
authorEmil Velikov <emil.veliikov@collabora.com>
Thu, 25 Aug 2016 10:08:30 +0000 (11:08 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 14 Oct 2016 11:53:35 +0000 (12:53 +0100)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
src/egl/drivers/dri2/platform_x11_dri3.c
src/glx/dri3_glx.c
src/loader/loader_dri3_helper.c
src/loader/loader_dri3_helper.h

index 26bb43011507e0c2394caedbdfd7e7cc918dc10b..3dc9b98a90982ca7e2e65354181e6bfcf39710cc 100644 (file)
@@ -123,7 +123,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,
index 51b6b1cdfa69ad4c722bff3e5b2c6ef83b20d67f..db0100717198ea5a4bc7b19411ccc80aef1d4040 100644 (file)
@@ -172,7 +172,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,
index 817929740f22aa36083c04c5ab86742343ec290c..ca02e97c9e9f96af1b7ab6480d2233dbc4947487 100644 (file)
@@ -130,7 +130,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;
index 658e190a3d79917967c0ebb1aa003ce5dd16af4b..1d1f15ebb9abb5b9e15d47a584b0883a683c8e14 100644 (file)
@@ -159,7 +159,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
@@ -176,7 +176,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,