commit 769011a047a03a6a7a5f7a8a442011c0c9c3eb1e
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Tue Feb 27 08:40:45 2018 +0000
update for libplacebo v0.4.0 API changes
...es_video_output_opengl_fragment_shaders.c.patch | 40 ++++++++++++++++++++++
vlc.spec | 4 +++
2 files changed, 44 insertions(+)
---
diff --git a/modules_video_output_opengl_fragment_shaders.c.patch
b/modules_video_output_opengl_fragment_shaders.c.patch
new file mode 100644
index 0000000..6e0ffc6
--- /dev/null
+++ b/modules_video_output_opengl_fragment_shaders.c.patch
@@ -0,0 +1,40 @@
+X-Git-Url:
https://git.videolan.org/?p=vlc%2Fvlc-3.0.git;a=blobdiff_plain;f=modules%...
+
+diff --git a/modules/video_output/opengl/fragment_shaders.c
b/modules/video_output/opengl/fragment_shaders.c
+index f959d9a69c..0c91a4db76 100644
+--- a/modules/video_output/opengl/fragment_shaders.c
++++ b/modules/video_output/opengl/fragment_shaders.c
+@@ -399,11 +399,18 @@ 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;
+
+@@ -657,7 +664,12 @@ 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];
+- ADDF("uniform %s %s;\n", ra_var_glsl_type_name(sv.var),
sv.var.name);
++#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);
+ }
+
+ // We can't handle these yet, but nothing we use requires them, either
diff --git a/vlc.spec b/vlc.spec
index 234d701..4a2d96e 100644
--- a/vlc.spec
+++ b/vlc.spec
@@ -48,6 +48,9 @@ License: GPLv2+
Group: Applications/Multimedia
URL:
http://www.videolan.org
Source0: %{vlc_url}/%{?!vlc_rc:%{vlc_vers}/}vlc-%{vlc_vers}%{?vlc_tag}.tar.xz
+# opengl: update for libplacebo v0.4.0 API changes
+#
https://git.videolan.org/?p=vlc/vlc-3.0.git;a=commit;h=f33a7b19f0a55e70f1...
+Patch0: modules_video_output_opengl_fragment_shaders.c.patch
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
@@ -267,6 +270,7 @@ VLC media player extras modules.
%prep
%setup -q -n %{name}-%{vlc_vers}%{?vlc_rc:-%{vlc_rc}}
+%patch0 -p1
%{?_with_bootstrap:
rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || :
./bootstrap