summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/shader_cache.h
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-09-17 10:55:43 +0200
committerNiklas Haas <git@haasn.xyz>2017-09-26 17:25:35 +0200
commit47af509e1fad3e9ce30e3e339d8cd705fcd44ef2 (patch)
tree0f0ac7f905efe2a3efdfe4e0b38cae15d0be8eda /video/out/gpu/shader_cache.h
parentca85a153b4a201c7f6d600f861639ef68c1edfa3 (diff)
downloadmpv-47af509e1fad3e9ce30e3e339d8cd705fcd44ef2.tar.bz2
mpv-47af509e1fad3e9ce30e3e339d8cd705fcd44ef2.tar.xz
vo_gpu: attempt to avoid UBOs for dynamic variables
This makes the radeon driver shut up about frequently updating STATIC_DRAW UBOs (--opengl-debug), and also reduces the amount of synchronization necessary for vulkan uniform buffers. Also add some extra debugging/tracing code paths. I went with a flags-based approach in case we ever want to extend this.
Diffstat (limited to 'video/out/gpu/shader_cache.h')
-rw-r--r--video/out/gpu/shader_cache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/gpu/shader_cache.h b/video/out/gpu/shader_cache.h
index 377293391c..d64bb3a0f4 100644
--- a/video/out/gpu/shader_cache.h
+++ b/video/out/gpu/shader_cache.h
@@ -25,6 +25,10 @@ void gl_sc_haddf(struct gl_shader_cache *sc, const char *textf, ...)
void gl_sc_hadd_bstr(struct gl_shader_cache *sc, struct bstr text);
void gl_sc_paddf(struct gl_shader_cache *sc, const char *textf, ...)
PRINTF_ATTRIBUTE(2, 3);
+
+// A hint that the next data-type (i.e. non-binding) uniform is expected to
+// change frequently. This refers to the _f, _i, _vecN etc. uniform types.
+void gl_sc_uniform_dynamic(struct gl_shader_cache *sc);
void gl_sc_uniform_texture(struct gl_shader_cache *sc, char *name,
struct ra_tex *tex);
void gl_sc_uniform_image2D_wo(struct gl_shader_cache *sc, const char *name,