diff --git a/dri3/dri3.c b/dri3/dri3.c index 8ac0f3ae2..ba32facd7 100644 --- a/dri3/dri3.c +++ b/dri3/dri3.c @@ -45,7 +45,7 @@ dri3_close_screen(ScreenPtr screen) } Bool -dri3_screen_init(ScreenPtr screen, dri3_screen_info_ptr info) +dri3_screen_init(ScreenPtr screen, const dri3_screen_info_rec *info) { dri3_screen_generation = serverGeneration; diff --git a/dri3/dri3.h b/dri3/dri3.h index 89ad13ad9..bd17522b0 100644 --- a/dri3/dri3.h +++ b/dri3/dri3.h @@ -104,7 +104,7 @@ typedef struct dri3_screen_info { } dri3_screen_info_rec, *dri3_screen_info_ptr; extern _X_EXPORT Bool -dri3_screen_init(ScreenPtr screen, dri3_screen_info_ptr info); +dri3_screen_init(ScreenPtr screen, const dri3_screen_info_rec *info); extern _X_EXPORT int dri3_send_open_reply(ClientPtr client, int fd); diff --git a/dri3/dri3_priv.h b/dri3/dri3_priv.h index d86f06be0..f0400a78a 100644 --- a/dri3/dri3_priv.h +++ b/dri3/dri3_priv.h @@ -49,7 +49,7 @@ typedef struct dri3_screen_priv { CARD32 num_formats; dri3_dmabuf_format_ptr formats; - dri3_screen_info_ptr info; + const dri3_screen_info_rec *info; } dri3_screen_priv_rec, *dri3_screen_priv_ptr; #define wrap(priv,real,mem,func) {\ diff --git a/dri3/dri3_screen.c b/dri3/dri3_screen.c index 8ccbeb40c..8d3744977 100644 --- a/dri3/dri3_screen.c +++ b/dri3/dri3_screen.c @@ -32,7 +32,7 @@ #include #include -static inline Bool has_open(dri3_screen_info_ptr info) { +static inline Bool has_open(const dri3_screen_info_rec *info) { if (info == NULL) return FALSE; @@ -44,7 +44,7 @@ int dri3_open(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fd) { dri3_screen_priv_ptr ds = dri3_screen_priv(screen); - dri3_screen_info_ptr info = ds->info; + const dri3_screen_info_rec *info = ds->info; int rc; if (!has_open(info)) @@ -69,7 +69,7 @@ dri3_pixmap_from_fds(PixmapPtr *ppixmap, ScreenPtr screen, CARD8 depth, CARD8 bpp, CARD64 modifier) { dri3_screen_priv_ptr ds = dri3_screen_priv(screen); - dri3_screen_info_ptr info = ds->info; + const dri3_screen_info_rec *info = ds->info; PixmapPtr pixmap; if (!info) @@ -100,7 +100,7 @@ dri3_fds_from_pixmap(PixmapPtr pixmap, int *fds, { ScreenPtr screen = pixmap->drawable.pScreen; dri3_screen_priv_ptr ds = dri3_screen_priv(screen); - dri3_screen_info_ptr info = ds->info; + const dri3_screen_info_rec *info = ds->info; if (!info) return 0; @@ -130,7 +130,7 @@ dri3_fd_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { ScreenPtr screen = pixmap->drawable.pScreen; dri3_screen_priv_ptr ds = dri3_screen_priv(screen); - dri3_screen_info_ptr info = ds->info; + const dri3_screen_info_rec *info = ds->info; CARD32 strides[4]; CARD32 offsets[4]; CARD64 modifier; @@ -170,7 +170,7 @@ static int cache_formats_and_modifiers(ScreenPtr screen) { dri3_screen_priv_ptr ds = dri3_screen_priv(screen); - dri3_screen_info_ptr info = ds->info; + const dri3_screen_info_rec *info = ds->info; CARD32 *formats = NULL; CARD64 *modifiers = NULL; int i; @@ -230,7 +230,7 @@ dri3_get_supported_modifiers(ScreenPtr screen, DrawablePtr drawable, CARD64 **screen_modifiers) { dri3_screen_priv_ptr ds = dri3_screen_priv(screen); - dri3_screen_info_ptr info = ds->info; + const dri3_screen_info_rec *info = ds->info; int i, j; int ret; CARD32 num_drawable_mods; diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index 5a47dbd91..091d51d98 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -797,7 +797,7 @@ glamor_dri3_open_client(ClientPtr client, return Success; } -static dri3_screen_info_rec glamor_dri3_info = { +static const dri3_screen_info_rec glamor_dri3_info = { .version = 2, .open_client = glamor_dri3_open_client, .pixmap_from_fds = glamor_pixmap_from_fds, diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index 7e9815626..7f64483bf 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -815,7 +815,7 @@ glamor_get_modifiers(ScreenPtr screen, CARD32 format, } -static dri3_screen_info_rec xwl_dri3_info = { +static const dri3_screen_info_rec xwl_dri3_info = { .version = 2, .open = NULL, .pixmap_from_fds = glamor_pixmap_from_fds,