[vlc-devel] [PATCH 1/2] vout/opengl: set the correct GLSL shader version for libplacebo

Thomas Guillem thomas at gllm.fr
Thu May 14 13:14:59 CEST 2020


LGTM for the set,
thanks !

On Wed, May 13, 2020, at 22:29, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.xyz>
> 
> This prevents shader compilation errors when VLC requests old versions
> of GLSL, by forwarding the correct GLSL version to the libplacebo shader
> generators.
> ---
>  modules/video_output/opengl/renderer.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/modules/video_output/opengl/renderer.c 
> b/modules/video_output/opengl/renderer.c
> index ae4179be4a..57a8d3ce0e 100644
> --- a/modules/video_output/opengl/renderer.c
> +++ b/modules/video_output/opengl/renderer.c
> @@ -464,7 +464,14 @@ vlc_gl_renderer_New(vlc_gl_t *gl, const struct 
> vlc_gl_api *api,
>      renderer->pl_ctx = vlc_placebo_Create(VLC_OBJECT(gl));
>      if (renderer->pl_ctx) {
>  #   if PL_API_VER >= 20
> -        renderer->pl_sh = pl_shader_alloc(renderer->pl_ctx, NULL);
> +        renderer->pl_sh = pl_shader_alloc(renderer->pl_ctx, &(struct 
> pl_shader_params) {
> +            .glsl = {
> +                .version = renderer->glsl_version,
> +#       ifdef USE_OPENGL_ES2
> +                .gles = true,
> +#       endif
> +            },
> +        });
>  #   elif PL_API_VER >= 6
>          renderer->pl_sh = pl_shader_alloc(renderer->pl_ctx, NULL, 0);
>  #   else
> -- 
> 2.26.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list