summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/ra.h
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-08-19 04:33:40 +0200
committerNiklas Haas <git@haasn.xyz>2017-08-22 09:55:49 +0200
commit09c501a40eed7cb05c73fc30ea814d1d256ac0eb (patch)
tree2508bf03c8a22b098d955ddc7b3abc328d089296 /video/out/opengl/ra.h
parent371000108acb40a99412316fe1bba2883441c38a (diff)
downloadmpv-09c501a40eed7cb05c73fc30ea814d1d256ac0eb.tar.bz2
mpv-09c501a40eed7cb05c73fc30ea814d1d256ac0eb.tar.xz
vo_opengl: refactor tex_upload to ra_buf_pool
Also refactors the usage of tex_upload to make ra_tex_upload_pbo a RA-internal thing again. ra_buf_pool has the main advantage of being dynamically sized depending on buf_poll, so for OpenGL we'll end up only using one buffer (when not persistently mapping) - while for vulkan we'll use as many as necessary, which depends on the swapchain depth anyway.
Diffstat (limited to 'video/out/opengl/ra.h')
-rw-r--r--video/out/opengl/ra.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/opengl/ra.h b/video/out/opengl/ra.h
index eee1728bba..8658a0737c 100644
--- a/video/out/opengl/ra.h
+++ b/video/out/opengl/ra.h
@@ -30,6 +30,11 @@ struct ra {
// formats should have a lower index. (E.g. GLES3 should put rg8 before la.)
struct ra_format **formats;
int num_formats;
+
+ // Accelerate texture uploads via an extra PBO even when
+ // RA_CAP_DIRECT_UPLOAD is supported. This is basically only relevant for
+ // OpenGL. Set by the RA user.
+ bool use_pbo;
};
enum {