summaryrefslogtreecommitdiffstats
path: root/video/out/opengl
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossy@jrg.systems>2017-10-22 00:10:09 +1100
committerJames Ross-Gowan <rossy@jrg.systems>2017-11-07 20:27:13 +1100
commit41dff03f8d856273e4a87293f87887d9940009fa (patch)
tree586de53d199dd6021987aed01865974b9d824562 /video/out/opengl
parent793b43020c784047b60a7b9f3461ff3b9fe90d02 (diff)
downloadmpv-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/opengl')
-rw-r--r--video/out/opengl/ra_gl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/video/out/opengl/ra_gl.c b/video/out/opengl/ra_gl.c
index ae6cd00765..86488b11ab 100644
--- a/video/out/opengl/ra_gl.c
+++ b/video/out/opengl/ra_gl.c
@@ -96,7 +96,6 @@ static int ra_init_gl(struct ra *ra, GL *gl)
static const int caps_map[][2] = {
{RA_CAP_DIRECT_UPLOAD, 0},
- {RA_CAP_SHARED_BINDING, 0},
{RA_CAP_GLOBAL_UNIFORM, 0},
{RA_CAP_TEX_1D, MPGL_CAP_1D_TEX},
{RA_CAP_TEX_3D, MPGL_CAP_3D_TEX},
@@ -653,6 +652,11 @@ static void gl_blit(struct ra *ra, struct ra_tex *dst, struct ra_tex *src,
gl->BindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
}
+static int gl_desc_namespace(enum ra_vartype type)
+{
+ return type;
+}
+
static void gl_renderpass_destroy(struct ra *ra, struct ra_renderpass *pass)
{
GL *gl = ra_gl_get(ra);
@@ -1122,6 +1126,7 @@ static struct ra_fns ra_fns_gl = {
.clear = gl_clear,
.blit = gl_blit,
.uniform_layout = std140_layout,
+ .desc_namespace = gl_desc_namespace,
.renderpass_create = gl_renderpass_create,
.renderpass_destroy = gl_renderpass_destroy,
.renderpass_run = gl_renderpass_run,