summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/shader_cache.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-08-05 19:38:43 +0200
committerNiklas Haas <git@haasn.xyz>2017-08-06 00:10:22 +0200
commit988d188d96d48ce7c78c09276982edb3c481b123 (patch)
treef4b29914b23dd09663e85449ccfd4877021c0f48 /video/out/opengl/shader_cache.c
parente5748e891f36a740faf39d7f9af799123d0e4388 (diff)
downloadmpv-988d188d96d48ce7c78c09276982edb3c481b123.tar.bz2
mpv-988d188d96d48ce7c78c09276982edb3c481b123.tar.xz
vo_opengl: drop ra_gl.h from shader_cache.c
Since the GL *gl is no longer needed for the timers, we can get rid of the sc->gl dependency. This requires moving a utility function (which is not GL-specific anyway) out of gl_utils.h and into utils.h
Diffstat (limited to 'video/out/opengl/shader_cache.c')
-rw-r--r--video/out/opengl/shader_cache.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/video/out/opengl/shader_cache.c b/video/out/opengl/shader_cache.c
index f4be7a2de6..68d9d4cab2 100644
--- a/video/out/opengl/shader_cache.c
+++ b/video/out/opengl/shader_cache.c
@@ -15,7 +15,6 @@
#include "stream/stream.h"
#include "shader_cache.h"
#include "formats.h"
-#include "ra_gl.h"
#include "utils.h"
// Force cache flush if more than this number of shaders is created.
@@ -48,7 +47,6 @@ struct sc_entry {
struct gl_shader_cache {
struct ra *ra;
- GL *gl;
struct mp_log *log;
// permanent
@@ -97,7 +95,6 @@ struct gl_shader_cache *gl_sc_create(struct ra *ra, struct mpv_global *global,
struct gl_shader_cache *sc = talloc_ptrtype(NULL, sc);
*sc = (struct gl_shader_cache){
.ra = ra,
- .gl = ra_gl_get(ra),
.global = global,
.log = log,
};
@@ -105,8 +102,8 @@ struct gl_shader_cache *gl_sc_create(struct ra *ra, struct mpv_global *global,
return sc;
}
-// Reset the previous pass. This must be called after
-// Unbind all GL state managed by sc - the current program and texture units.
+// Reset the previous pass. This must be called after gl_sc_generate and before
+// starting a new shader.
static void gl_sc_reset(struct gl_shader_cache *sc)
{
sc->prelude_text.len = 0;