summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/ra.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-05 13:48:46 +0200
committerwm4 <wm4@nowhere>2017-08-05 13:48:46 +0200
commitf72a33d2cb223df921967cfe7ae203f882ba6921 (patch)
tree3571ef752f95e42488bc80de5343d2287a94cbdb /video/out/opengl/ra.h
parentdd096863fa00f1c0c9268932a46ddc321122f552 (diff)
downloadmpv-f72a33d2cb223df921967cfe7ae203f882ba6921.tar.bz2
mpv-f72a33d2cb223df921967cfe7ae203f882ba6921.tar.xz
vo_opengl: organize ra PBO flag slightly differently
Instead of having a mutable ra_tex field (and the only one), move the flag to struct ra, since we have only 2 tex_upload user calls anyway, and both want the same PBO behavior. (At first I considered making it a RA_TEX_UPLOAD_ flag, but why bother. PBOs are a terribly GL-specific thing, so we can't expect a reasonable abstraction of it anyway.)
Diffstat (limited to 'video/out/opengl/ra.h')
-rw-r--r--video/out/opengl/ra.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/video/out/opengl/ra.h b/video/out/opengl/ra.h
index 3249bc7448..ab3027b78a 100644
--- a/video/out/opengl/ra.h
+++ b/video/out/opengl/ra.h
@@ -20,6 +20,11 @@ struct ra {
// Set of supported texture formats. Must be added by RA backend at init time.
struct ra_format **formats;
int num_formats;
+
+ // GL-specific: if set, accelerate texture upload by using an additional
+ // buffer (i.e. uses more memory). Does not affect uploads done by
+ // ra_tex_create (if initial_data is set). Set by the RA user.
+ bool use_pbo;
};
enum {
@@ -92,8 +97,6 @@ struct ra_tex {
// All fields are read-only after creation.
struct ra_tex_params params;
void *priv;
- // Set by user, GL only: attempt to accelerate upload with PBOs.
- bool use_pbo;
};
// A persistent mapping, which can be used for texture upload.