[vlc-devel] [RFC 07/82] contrib: update qt to 5.12, compile it with ANGLE support
Martin Storsjö
martin at martin.st
Fri Feb 1 14:21:59 CET 2019
On Fri, 1 Feb 2019, Pierre Lamot wrote:
> compiling ANGLE support in Qt requires to compile HLSL shaders
> with fxc.exe. When crosscompiling from Linux, this is provided by
> running fxc through wine.
Ok, there I see that my question is answered :-)
This probably is a sensible compromise for making this work.
Patch 13 which adds fxc probably should be ordered before this one?
A few more comments below inline:
> diff --git a/contrib/src/qt/0004-Fix-PMurHash.c-mingw-clang-64-bit-compilation.patch b/contrib/src/qt/0004-Fix-PMurHash.c-mingw-clang-64-bit-compilation.patch
> new file mode 100644
> index 0000000000..47f98a5014
> --- /dev/null
> +++ b/contrib/src/qt/0004-Fix-PMurHash.c-mingw-clang-64-bit-compilation.patch
> @@ -0,0 +1,25 @@
> +From 7e0e146443663db23ea0164e0b72694b8f9a1b69 Mon Sep 17 00:00:00 2001
> +From: LLVM MinGW <root at localhost>
> +Date: Fri, 21 Dec 2018 14:41:36 +0000
> +Subject: [PATCH] Fix PMurHash.c mingw clang 64-bit compilation.
> +
> +---
> + .../angle/src/common/third_party/smhasher/src/PMurHash.cpp | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/3rdparty/angle/src/common/third_party/smhasher/src/PMurHash.cpp b/src/3rdparty/angle/src/common/third_party/smhasher/src/PMurHash.cpp
> +index 071bc31..ff75759 100644
> +--- a/src/3rdparty/angle/src/common/third_party/smhasher/src/PMurHash.cpp
> ++++ b/src/3rdparty/angle/src/common/third_party/smhasher/src/PMurHash.cpp
> +@@ -208,7 +208,7 @@ void PMurHash32_Process(uint32_t *ph1, uint32_t *pcarry, const void *key, int le
> + /* This CPU does not handle unaligned word access */
> +
> + /* Consume enough so that the next data byte is word aligned */
> +- int i = -(long)ptr & 3;
> ++ int i = -(intptr_t)ptr & 3;
> + if(i && i <= len) {
> + DOBYTES(i, h1, c, n, ptr, len);
> + }
> +--
> +2.20.0.rc1
Have you tried upstreaming this patch?
> ifdef HAVE_WIN32
> $(APPLY) $(SRC)/qt/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch
> $(APPLY) $(SRC)/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch
> - $(APPLY) $(SRC)/qt/0003-configure-Treat-win32-clang-g-the-same-as-win32-g.patch
> - $(APPLY) $(SRC)/qt/0004-qmake-Fix-building-with-lld-with-mingw-makefiles.patch
> $(APPLY) $(SRC)/qt/0005-qsimd-Fix-compilation-with-trunk-clang-for-mingw.patch
> -ifndef HAVE_WIN64
> +ifdef HAVE_WIN64
> + $(APPLY) $(SRC)/qt/0004-Fix-PMurHash.c-mingw-clang-64-bit-compilation.patch
> +else
This patch surely should be safe enough to always apply, so there's no
point in applying it only within the ifdef. If patches were fully
upstreamable it should be possible to always apply them anyway.
> $(APPLY) $(SRC)/qt/0001-disable-qt_random_cpu.patch
> endif
> - $(APPLY) $(SRC)/qt/fix-glibc-2.28-build.patch
> -ifndef HAVE_CROSS_COMPILE
> +
> +ifdef HAVE_CROSS_COMPILE
> + $(APPLY) $(SRC)/qt/0003-allow-cross-compilation-of-angle-with-wine.patch
> +else
> cd qt-$(QT_VERSION_FULL); for i in QtFontDatabaseSupport QtWindowsUIAutomationSupport QtEventDispatcherSupport QtCore; do \
> sed -i -e 's,"../../../../../src,"../src,g' include/$$i/$(QT_VERSION)/$$i/private/*.h; done
> endif
> +
> endif
> $(MOVE)
>
> +
> +ifdef HAVE_WIN32
> +ifneq ($(findstring $(ARCH), arm aarch64),)
> +# There is no opengl available on windows on these architectures.
> +QT_OPENGL := -no-opengl
> +else
> +QT_OPENGL := -angle
> +endif
With ANGLE, it should be possible to build with opengl even for these
platforms. Enabling that probably can be left as a separate later patch if
you prefer though. Have you tried building that configuration?
If you have, and you have a prebuilt VLC for Win/ARM64 with ANGLE and QML
GUI I'd like to test it, otherwise if you can point to this branch in a
git repo somewhere I could try compiling it myself.
// Martin
More information about the vlc-devel
mailing list