summaryrefslogtreecommitdiffstats
path: root/video/out/gpu
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2018-11-10 11:27:03 +0100
committerJan Ekström <jeebjp@gmail.com>2019-04-21 23:55:22 +0300
commitf0b6860d62bf2c59be589a56750b2a95666a7564 (patch)
tree6cf9615429d7c5911d02e35cf90e313ba003fbca /video/out/gpu
parent4e9dc60d9e7728cddfc901a8b0b7048eeebed5e6 (diff)
downloadmpv-f0b6860d62bf2c59be589a56750b2a95666a7564.tar.bz2
mpv-f0b6860d62bf2c59be589a56750b2a95666a7564.tar.xz
vo_gpu: index desc namespaces by ra
No reason to require them be constant. This allows them to depend on runtime characteristics of the `ra`.
Diffstat (limited to 'video/out/gpu')
-rw-r--r--video/out/gpu/ra.h2
-rw-r--r--video/out/gpu/shader_cache.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/video/out/gpu/ra.h b/video/out/gpu/ra.h
index 748b485c95..f35489e25d 100644
--- a/video/out/gpu/ra.h
+++ b/video/out/gpu/ra.h
@@ -445,7 +445,7 @@ struct ra_fns {
// Returns an abstract namespace index for a given renderpass input type.
// This will always be a value >= 0 and < RA_VARTYPE_COUNT. This is used to
// figure out which inputs may share the same value of `binding`.
- int (*desc_namespace)(enum ra_vartype type);
+ int (*desc_namespace)(struct ra *ra, enum ra_vartype type);
// Clear the dst with the given color (rgba) and within the given scissor.
// dst must have dst->params.render_dst==true. Content outside of the
diff --git a/video/out/gpu/shader_cache.c b/video/out/gpu/shader_cache.c
index fa4560597f..18986f20b7 100644
--- a/video/out/gpu/shader_cache.c
+++ b/video/out/gpu/shader_cache.c
@@ -254,7 +254,7 @@ static struct sc_uniform *find_uniform(struct gl_shader_cache *sc,
static int gl_sc_next_binding(struct gl_shader_cache *sc, enum ra_vartype type)
{
- return sc->next_binding[sc->ra->fns->desc_namespace(type)]++;
+ return sc->next_binding[sc->ra->fns->desc_namespace(sc->ra, type)]++;
}
void gl_sc_uniform_dynamic(struct gl_shader_cache *sc)