From 1d71523407bc1386ff2226331a8034dd26edf435 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Sun, 3 Aug 2025 23:04:42 -0400 Subject: [PATCH] video/out: make ra_fns const --- video/out/d3d11/ra_d3d11.c | 2 +- video/out/gpu/ra.h | 2 +- video/out/opengl/ra_gl.c | 4 ++-- video/out/placebo/ra_pl.c | 4 ++-- video/out/wldmabuf/ra_wldmabuf.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/video/out/d3d11/ra_d3d11.c b/video/out/d3d11/ra_d3d11.c index cd84e801b7..066278df43 100644 --- a/video/out/d3d11/ra_d3d11.c +++ b/video/out/d3d11/ra_d3d11.c @@ -2256,7 +2256,7 @@ static void destroy(struct ra *ra) talloc_free(ra); } -static struct ra_fns ra_fns_d3d11 = { +static const struct ra_fns ra_fns_d3d11 = { .destroy = destroy, .tex_create = tex_create, .tex_destroy = tex_destroy, diff --git a/video/out/gpu/ra.h b/video/out/gpu/ra.h index d4a3c83d2d..d87b566356 100644 --- a/video/out/gpu/ra.h +++ b/video/out/gpu/ra.h @@ -5,7 +5,7 @@ // Handle for a rendering API backend. struct ra { - struct ra_fns *fns; + const struct ra_fns *fns; void *priv; int glsl_version; // GLSL version (e.g. 300 => 3.0) diff --git a/video/out/opengl/ra_gl.c b/video/out/opengl/ra_gl.c index 345a5b848e..0d38f82142 100644 --- a/video/out/opengl/ra_gl.c +++ b/video/out/opengl/ra_gl.c @@ -4,7 +4,7 @@ #include "utils.h" #include "ra_gl.h" -static struct ra_fns ra_fns_gl; +static const struct ra_fns ra_fns_gl; // For ra.priv struct ra_gl { @@ -1183,7 +1183,7 @@ static void gl_debug_marker(struct ra *ra, const char *msg) gl_check_error(p->gl, ra->log, msg); } -static struct ra_fns ra_fns_gl = { +static const struct ra_fns ra_fns_gl = { .destroy = gl_destroy, .tex_create = gl_tex_create, .tex_destroy = gl_tex_destroy, diff --git a/video/out/placebo/ra_pl.c b/video/out/placebo/ra_pl.c index 16cbad987c..14ae627700 100644 --- a/video/out/placebo/ra_pl.c +++ b/video/out/placebo/ra_pl.c @@ -15,7 +15,7 @@ static inline pl_gpu get_gpu(const struct ra *ra) return p->gpu; } -static struct ra_fns ra_fns_pl; +static const struct ra_fns ra_fns_pl; pl_gpu ra_pl_get(const struct ra *ra) { @@ -651,7 +651,7 @@ static pl_timer get_active_timer(const struct ra *ra) return t->timers[t->idx_timers++]; } -static struct ra_fns ra_fns_pl = { +static const struct ra_fns ra_fns_pl = { .destroy = destroy_ra_pl, .tex_create = tex_create_pl, .tex_destroy = tex_destroy_pl, diff --git a/video/out/wldmabuf/ra_wldmabuf.c b/video/out/wldmabuf/ra_wldmabuf.c index 3e3c894aff..ee86998b17 100644 --- a/video/out/wldmabuf/ra_wldmabuf.c +++ b/video/out/wldmabuf/ra_wldmabuf.c @@ -35,7 +35,7 @@ bool ra_compatible_format(struct ra *ra, uint32_t drm_format, uint64_t modifier) return vo_wayland_valid_format(wl, drm_format, modifier); } -static struct ra_fns ra_fns_wldmabuf = { +static const struct ra_fns ra_fns_wldmabuf = { .destroy = destroy, };