From a42b8b1142fd26e82ca0e8b0ea7ab6cafd78776d Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Fri, 29 Sep 2017 14:41:52 +0200 Subject: vo_gpu: attempt re-using the FBO format for p->output_tex This allows RAs with support for non-opaque FBO formats to use a more appropriate FBO format for the output tex, possibly enabling a more efficient blit operation. This requires distinguishing between real formats (which can be used to create textures) and fake formats (e.g. ra_gl's FBO hack). --- video/out/opengl/ra_gl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video/out/opengl') diff --git a/video/out/opengl/ra_gl.c b/video/out/opengl/ra_gl.c index 37b7285235..72b411a16f 100644 --- a/video/out/opengl/ra_gl.c +++ b/video/out/opengl/ra_gl.c @@ -283,6 +283,8 @@ static struct ra_tex *gl_tex_create(struct ra *ra, const struct ra_tex_params *params) { GL *gl = ra_gl_get(ra); + assert(!params->format->dummy_format); + struct ra_tex *tex = gl_tex_create_blank(ra, params); if (!tex) return NULL; @@ -382,6 +384,7 @@ static const struct ra_format fbo_dummy_format = { .flags = F_CR, }, .renderable = true, + .dummy_format = true, }; // Create a ra_tex that merely wraps an existing framebuffer. gl_fbo can be 0 -- cgit v1.2.3