diff options
author | James Ross-Gowan <rossy@jrg.systems> | 2017-10-22 00:10:09 +1100 |
---|---|---|
committer | James Ross-Gowan <rossy@jrg.systems> | 2017-11-07 20:27:13 +1100 |
commit | 41dff03f8d856273e4a87293f87887d9940009fa (patch) | |
tree | 586de53d199dd6021987aed01865974b9d824562 /video/out/gpu/shader_cache.c | |
parent | 793b43020c784047b60a7b9f3461ff3b9fe90d02 (diff) | |
download | mpv-41dff03f8d856273e4a87293f87887d9940009fa.tar.bz2 mpv-41dff03f8d856273e4a87293f87887d9940009fa.tar.xz |
vo_gpu: add namespace query mechanism
Backported from @haasn's change to libplacebo. More flexible than the
previous "shared || non-shared" distinction. The extra flexibility is
needed for Direct3D 11, but it also doesn't hurt code-wise.
Diffstat (limited to 'video/out/gpu/shader_cache.c')
-rw-r--r-- | video/out/gpu/shader_cache.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/video/out/gpu/shader_cache.c b/video/out/gpu/shader_cache.c index c3eccac9e9..f191a7198c 100644 --- a/video/out/gpu/shader_cache.c +++ b/video/out/gpu/shader_cache.c @@ -254,11 +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) { - if (sc->ra->caps & RA_CAP_SHARED_BINDING) { - return sc->next_binding[type]++; - } else { - return sc->next_binding[0]++; - } + return sc->next_binding[sc->ra->fns->desc_namespace(type)]++; } void gl_sc_uniform_dynamic(struct gl_shader_cache *sc) |