Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/chromium/chromium-vaapi-uintptr.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/chromium/chromium-vaapi-uintptr.patch')
-rw-r--r--extra/chromium/chromium-vaapi-uintptr.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/extra/chromium/chromium-vaapi-uintptr.patch b/extra/chromium/chromium-vaapi-uintptr.patch
new file mode 100644
index 00000000..c64414a8
--- /dev/null
+++ b/extra/chromium/chromium-vaapi-uintptr.patch
@@ -0,0 +1,42 @@
+diff -rauN chromium-72.0.3626.121/media/gpu/vaapi/vaapi_wrapper.cc chromium-72.0.3626.121-vaapi-uintptr-patch/media/gpu/vaapi/vaapi_wrapper.cc
+--- chromium-72.0.3626.121/media/gpu/vaapi/vaapi_wrapper.cc 2019-03-02 05:10:25.000000000 +0100
++++ chromium-72.0.3626.121-vaapi-uintptr-patch/media/gpu/vaapi/vaapi_wrapper.cc 2019-03-09 19:02:37.795731310 +0100
+@@ -4,6 +4,7 @@
+
+ #include "media/gpu/vaapi/vaapi_wrapper.h"
+
++#include <cstdint>
+ #include <dlfcn.h>
+ #include <string.h>
+
+@@ -333,10 +334,17 @@
+ DVLOG(1) << "VAAPI version: " << major_version << "." << minor_version << " "
+ << va_vendor_string_;
+
+- if (major_version != VA_MAJOR_VERSION || minor_version != VA_MINOR_VERSION) {
+- LOG(ERROR) << "This build of Chromium requires VA-API version "
+- << VA_MAJOR_VERSION << "." << VA_MINOR_VERSION
+- << ", system version: " << major_version << "." << minor_version;
++ // The VAAPI version is determined from what is loaded on the system by
++ // calling vaInitialize(). Since the libva is now ABI-compatible, relax the
++ // version check which helps in upgrading the libva, without breaking any
++ // existing functionality. Make sure the system version is not older than
++ // the version with which the chromium is built since libva is only
++ // guaranteed to be backward (and not forward) compatible.
++ if (VA_MAJOR_VERSION > major_version ||
++ (VA_MAJOR_VERSION == major_version && VA_MINOR_VERSION > minor_version)) {
++ LOG(ERROR) << "The system version " << major_version << "." << minor_version
++ << " should be greater than or equal to "
++ << VA_MAJOR_VERSION << "." << VA_MINOR_VERSION;
+ return false;
+ }
+ return true;
+@@ -1000,7 +1008,7 @@
+ }
+ va_attrib_extbuf.num_planes = num_planes;
+
+- std::vector<unsigned long> fds(num_fds);
++ std::vector<uintptr_t> fds(num_fds);
+ for (size_t i = 0; i < num_fds; ++i) {
+ int dmabuf_fd = pixmap->GetDmaBufFd(i);
+ if (dmabuf_fd < 0) {