[vlc-devel] [PATCH 5/5] opengl: drop support for PL_API_VER < 4

Niklas Haas vlc at haasn.xyz
Wed Oct 10 03:46:37 CEST 2018


From: Niklas Haas <git at haasn.xyz>

Since the minimum libplacebo version has been bumped for the vulkan
vout, we can safely drop the cases for old API versions.
---
 modules/video_output/opengl/fragment_shaders.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c
index 52af4939a0..f58b4467b6 100644
--- a/modules/video_output/opengl/fragment_shaders.c
+++ b/modules/video_output/opengl/fragment_shaders.c
@@ -399,18 +399,10 @@ tc_base_prepare_shader(const opengl_tex_converter_t *tc,
             continue;
 
         struct pl_shader_var sv = res->variables[i];
-#if PL_API_VER >= 4
         struct pl_var var = sv.var;
         // libplacebo doesn't need anything else anyway
         if (var.type != PL_VAR_FLOAT)
             continue;
-#else
-        struct ra_var var = sv.var;
-        // libplacebo doesn't need anything else anyway
-        if (var.type != RA_VAR_FLOAT)
-            continue;
-#endif
-
         if (var.dim_m > 1 && var.dim_m != var.dim_v)
             continue;
 
@@ -613,11 +605,7 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target,
         tc->uloc.pl_vars = calloc(res->num_variables, sizeof(GLint));
         for (int i = 0; i < res->num_variables; i++) {
             struct pl_shader_var sv = res->variables[i];
-#if PL_API_VER >= 4
             const char *glsl_type_name = pl_var_glsl_type_name(sv.var);
-#else
-            const char *glsl_type_name = ra_var_glsl_type_name(sv.var);
-#endif
             ADDF("uniform %s %s;\n", glsl_type_name, sv.var.name);
         }
 
-- 
2.19.0



More information about the vlc-devel mailing list