summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2021-04-18 20:13:43 +0200
committerNiklas Haas <git@haasn.xyz>2021-04-18 20:13:43 +0200
commit474ee003eddd278d871e7c1c760091b739880e8f (patch)
treea6c061602dfceed8b17ad59577a238751737f620 /video/out
parent2a1a092bc99883c3fef0402fa06af0290fbb7d19 (diff)
downloadmpv-474ee003eddd278d871e7c1c760091b739880e8f.tar.bz2
mpv-474ee003eddd278d871e7c1c760091b739880e8f.tar.xz
vo_gpu: greatly increase maximum shader cache size
See #8137 for justification. This is not ideal, because a large cache results in a lot of `strcmp` invocations for every single shader invocation. But it's way better than resulting in a lot of shader recompilations for every single shader invocation. The only reason I don't want to uncap it altogether is because there are conceivable edge cases in which users load dynamically generated shaders with updated parameters (indeed, I've seen IRC discussions to this effect), and in this case, we don't want to grow the cache infinitely as a result of something like a floating point parameter being continuously updated. (Never mind that this *would* actually trigger worst case behavior for the `strcmp`, since the updated float constant is likely to be near the bottom of the shader body) Whatever. vo_placebo will liberate us all in the end.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/gpu/shader_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/gpu/shader_cache.c b/video/out/gpu/shader_cache.c
index bf0983f5f0..c19a7e8323 100644
--- a/video/out/gpu/shader_cache.c
+++ b/video/out/gpu/shader_cache.c
@@ -17,7 +17,7 @@
#include "utils.h"
// Force cache flush if more than this number of shaders is created.
-#define SC_MAX_ENTRIES 48
+#define SC_MAX_ENTRIES 256
union uniform_val {
float f[9]; // RA_VARTYPE_FLOAT