summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/ra.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-07 19:14:18 +0200
committerwm4 <wm4@nowhere>2017-08-07 19:17:28 +0200
commit47ea771b7a29b04e35276d38733f72970b4dd448 (patch)
tree2a9f9c52acba9f662d62a290f739c502c6ca0ff8 /video/out/opengl/ra.h
parent1adf324d8b1261abfc02d905f98055991b29ac11 (diff)
downloadmpv-47ea771b7a29b04e35276d38733f72970b4dd448.tar.bz2
mpv-47ea771b7a29b04e35276d38733f72970b4dd448.tar.xz
vo_opengl: further GL API use separation
Move multiple GL-specific things from the renderer to other places like vo_opengl.c, vo_opengl_cb.c, and ra_gl.c. The vp_w/vp_h parameters to gl_video_resize() make no sense anymore, and are implicitly part of struct fbodst. Checking the main framebuffer depth is moved to vo_opengl.c. For vo_opengl_cb.c it always assumes 8. The API user now has to override this manually. The previous heuristic didn't make much sense anyway. The only remaining dependency on GL is the hwdec stuff, which is harder to change.
Diffstat (limited to 'video/out/opengl/ra.h')
-rw-r--r--video/out/opengl/ra.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/video/out/opengl/ra.h b/video/out/opengl/ra.h
index 785baf3f1d..a6c2461d89 100644
--- a/video/out/opengl/ra.h
+++ b/video/out/opengl/ra.h
@@ -21,6 +21,10 @@ struct ra {
// at init time.
int max_texture_wh;
+ // Maximum shared memory for compute shaders. Set by the RA backend at init
+ // time.
+ size_t max_shmem;
+
// Set of supported texture formats. Must be added by RA backend at init time.
struct ra_format **formats;
int num_formats;
@@ -391,6 +395,12 @@ struct ra_fns {
// always produce a value - and the values it does produce are typically
// delayed by a few frames. When no value is available, this returns 0.
uint64_t (*timer_stop)(struct ra *ra, ra_timer *timer);
+
+ // Hint that possibly queued up commands should be sent to the GPU. Optional.
+ void (*flush)(struct ra *ra);
+
+ // Optional.
+ void (*debug_marker)(struct ra *ra, const char *msg);
};
struct ra_tex *ra_tex_create(struct ra *ra, const struct ra_tex_params *params);
@@ -399,6 +409,8 @@ void ra_tex_free(struct ra *ra, struct ra_tex **tex);
struct ra_buf *ra_buf_create(struct ra *ra, const struct ra_buf_params *params);
void ra_buf_free(struct ra *ra, struct ra_buf **buf);
+void ra_free(struct ra **ra);
+
const struct ra_format *ra_find_unorm_format(struct ra *ra,
int bytes_per_component,
int n_components);