summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/ra.h
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-08-26 05:58:50 +0200
committerNiklas Haas <git@haasn.xyz>2017-08-27 14:36:04 +0200
commit1d47473a7bb49663c197efa9a6ff8d836a9c1693 (patch)
tree0479d2a67982a0dcb1584d6d29be5662a2fa6c3a /video/out/opengl/ra.h
parent136cf2b770f08a435710f71fe2fa597c908cc8a0 (diff)
downloadmpv-1d47473a7bb49663c197efa9a6ff8d836a9c1693.tar.bz2
mpv-1d47473a7bb49663c197efa9a6ff8d836a9c1693.tar.xz
vo_opengl: use UBOs where supported/required
This also introduces RA_CAP_GLOBAL_UNIFORM. If this is not set, UBOs *must* be used for non-bindings. Currently the cap is ignored though, and the shader_cache *always* generates UBO-using code where it can. Could be made an option in principle. Only enabled for drivers new enough to support explicit UBO offsets, just in case... No change to performance, which is probably what we expect.
Diffstat (limited to 'video/out/opengl/ra.h')
-rw-r--r--video/out/opengl/ra.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/opengl/ra.h b/video/out/opengl/ra.h
index bcd65e1027..4a728fbb5f 100644
--- a/video/out/opengl/ra.h
+++ b/video/out/opengl/ra.h
@@ -47,6 +47,7 @@ enum {
RA_CAP_BUF_RW = 1 << 6, // supports RA_VARTYPE_BUF_RW
RA_CAP_NESTED_ARRAY = 1 << 7, // supports nested arrays
RA_CAP_SHARED_BINDING = 1 << 8, // sampler/image/buffer namespaces are disjoint
+ RA_CAP_GLOBAL_UNIFORM = 1 << 9, // supports using "naked" uniforms (not UBO)
};
enum ra_ctype {