mpv does not work if opengl32.dll presents from mesa
Biswa96 opened this issue · comments
-
Steps:
- Download mpv and mesa packages.
- Run mpv with a media file.
-
Workaround: Remove or rename the
/mingw64/bin/opengl32.dll
file. -
Thoughts: I think opengl32.dll should be from System32. But as the opengl32.dll presents in
/mingw64/bin/
folder,mpv.exe
loads it from that path first instead of the System32 one. Also mesa-demos has this same issue.
mingw-w64-mesa package maintainer, @pal1000 any hint about this issue?
@lazka mpv is not updated. PKGBUILD shows version 0.33.0 but pacman shows 0.32.0-3
@lazka mpv is not updated. PKGBUILD shows version 0.33.0 but pacman shows 0.32.0-3
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-mpv/PKGBUILD#L7
Opps my bad. I was trying to update it before sleep and forgot that. The issue is not related with the mpv version.
uh why use mesagl with mpv ?!? does it fail with desktop opengl.
uh why use mesagl with mpv ?!? does it fail with desktop opengl.
the problem is that if it's installed it gets used, even if not intended.
Hmm could we not place the dll's in some subdir under bin ? that should avoid this.
Ideally we'd let the user pick which implementation is used, probably via package installation. Obviously it would need to work on both scenarios here.
Should be easy enough to just copy the dll's from say bin/mesa to bin if a user prefers to use the mesagl binaries no ?
Adding a system-opengl package that is mutex with mesa sounds like a better idea to me personally.
Also a possibility. 👍
I tried to reproduce but I couldn't using this MSYS2 environment:
base 2020.12-1
bash 5.1.004-1
bash-completion 2.11-1
bison 3.7.4-1
brotli 1.0.9-1
bsdtar 3.5.0-1
bzip2 1.0.8-2
ca-certificates 20190110-1
coreutils 8.32-1
curl 7.74.0-4
dash 0.5.11.2-1
db 5.3.28-3
file 5.39-2
filesystem 2020.10-1
findutils 4.7.0-1
flex 2.6.4-1
gawk 5.1.0-1
gcc-libs 10.2.0-1
gdbm 1.18.1-3
getent 2.18.90-2
gettext 0.19.8.1-1
glib2 2.66.4-1
gmp 6.2.1-1
gnupg 2.2.25-1
grep 3.0-2
gzip 1.10-1
heimdal-libs 7.7.0-2
icu 67.1-1
inetutils 1.9.4-2
info 6.7-3
less 563-2
libargp 20110921-2
libasprintf 0.19.8.1-1
libassuan 2.5.4-1
libbz2 1.0.8-2
libcrypt 2.1-2
libcurl 7.74.0-4
libdb 5.3.28-3
libedit 20191231_3.1-2
libexpat 2.2.10-1
libffi 3.3-1
libgcrypt 1.8.7-1
libgdbm 1.18.1-3
libgettextpo 0.19.8.1-1
libgnutls 3.7.0-1
libgpg-error 1.39-1
libgpgme 1.15.0-1
libhogweed 3.6-1
libiconv 1.16-2
libidn2 2.3.0-1
libintl 0.19.8.1-1
libksba 1.4.0-1
liblz4 1.9.3-1
liblzma 5.2.5-1
libmetalink 0.1.3-3
libnettle 3.6-1
libnghttp2 1.41.0-1
libnpth 1.6-1
libopenssl 1.1.1.i-1
libp11-kit 0.23.21-1
libpcre 8.44-1
libpcre2_8 10.36-1
libpsl 0.21.1-2
libreadline 8.1.0-1
libsqlite 3.34.0-1
libssh2 1.9.0-1
libtasn1 4.16.0-1
libunistring 0.9.10-1
libutil-linux 2.35.2-1
libxml2 2.9.10-6
libxslt 1.1.34-3
libzstd 1.4.8-1
m4 1.4.18-2
mingw-w64-i686-binutils 2.35.1-3
mingw-w64-i686-bzip2 1.0.8-2
mingw-w64-i686-ca-certificates 20200601-2
mingw-w64-i686-clang 11.0.0-5
mingw-w64-i686-crt-git 9.0.0.6029.ecb4ff54-1
mingw-w64-i686-expat 2.2.10-1
mingw-w64-i686-gcc 10.2.0-6
mingw-w64-i686-gcc-libs 10.2.0-6
mingw-w64-i686-gettext 0.19.8.1-10
mingw-w64-i686-gmp 6.2.0-3
mingw-w64-i686-headers-git 9.0.0.6029.ecb4ff54-1
mingw-w64-i686-isl 0.22.1-2
mingw-w64-i686-libffi 3.3-2
mingw-w64-i686-libiconv 1.16-2
mingw-w64-i686-libsystre 1.0.1-4
mingw-w64-i686-libtasn1 4.16.0-1
mingw-w64-i686-libtre-git r128.6fb7206-2
mingw-w64-i686-libwinpthread-git 9.0.0.6029.ecb4ff54-1
mingw-w64-i686-llvm 11.0.0-5
mingw-w64-i686-meson 0.56.0-2
mingw-w64-i686-mpc 1.2.0-2
mingw-w64-i686-mpdecimal 2.5.0-1
mingw-w64-i686-mpfr 4.1.0-3
mingw-w64-i686-ncurses 6.2-2
mingw-w64-i686-ninja 1.10.2-1
mingw-w64-i686-openssl 1.1.1.i-1
mingw-w64-i686-p11-kit 0.23.21-4
mingw-w64-i686-pkgconf 1.7.3-5
mingw-w64-i686-python 3.8.6-6
mingw-w64-i686-python-appdirs 1.4.3-1
mingw-w64-i686-python-attrs 19.3.0-1
mingw-w64-i686-python-beaker 1.11.0-1
mingw-w64-i686-python-mako 1.1.2-1
mingw-w64-i686-python-markupsafe 1.1.1-1
mingw-w64-i686-python-ordered-set 3.1.1-1
mingw-w64-i686-python-packaging 20.3-1
mingw-w64-i686-python-pyparsing 2.4.7-1
mingw-w64-i686-python-setuptools 47.1.1-1
mingw-w64-i686-python-six 1.15.0-1
mingw-w64-i686-readline 8.0.004-1
mingw-w64-i686-spirv-headers 1.5.3.1-1
mingw-w64-i686-spirv-tools 2020.4-1
mingw-w64-i686-sqlite3 3.34.0-1
mingw-w64-i686-tcl 8.6.10-1
mingw-w64-i686-termcap 1.3.1-6
mingw-w64-i686-tk 8.6.10-2
mingw-w64-i686-vulkan-headers 1.2.158-1
mingw-w64-i686-vulkan-loader 1.2.158-1
mingw-w64-i686-vulkan-validation-layers 1.2.158-1
mingw-w64-i686-windows-default-manifest 6.4-3
mingw-w64-i686-winpthreads-git 9.0.0.6029.ecb4ff54-1
mingw-w64-i686-xz 5.2.5-2
mingw-w64-i686-z3 4.8.9-1
mingw-w64-i686-zlib 1.2.11-8
mingw-w64-i686-zstd 1.4.5-1
mingw-w64-x86_64-SDL2 2.0.12-8
mingw-w64-x86_64-aom 2.0.1-1
mingw-w64-x86_64-binutils 2.35.1-3
mingw-w64-x86_64-boost 1.75.0-1
mingw-w64-x86_64-brotli 1.0.9-2
mingw-w64-x86_64-bzip2 1.0.8-2
mingw-w64-x86_64-c-ares 1.16.1-1
mingw-w64-x86_64-ca-certificates 20200601-2
mingw-w64-x86_64-cairo 1.17.4-1
mingw-w64-x86_64-celt 0.11.3-4
mingw-w64-x86_64-clang 11.0.0-5
mingw-w64-x86_64-cppunit 1.15.1-1
mingw-w64-x86_64-crt-git 9.0.0.6029.ecb4ff54-1
mingw-w64-x86_64-curl 7.74.0-2
mingw-w64-x86_64-cython 0.29.21-1
mingw-w64-x86_64-dav1d 0.7.1-2
mingw-w64-x86_64-djvulibre 3.5.27-4
mingw-w64-x86_64-expat 2.2.10-1
mingw-w64-x86_64-ffmpeg 4.3.1-7
mingw-w64-x86_64-ffms2 2.23.1-1
mingw-w64-x86_64-fftw 3.3.8-2
mingw-w64-x86_64-flac 1.3.3-1
mingw-w64-x86_64-flif 0.3-1
mingw-w64-x86_64-fontconfig 2.13.93-1
mingw-w64-x86_64-freeglut 3.2.1-1
mingw-w64-x86_64-freeimage 3.18.0-5
mingw-w64-x86_64-freetype 2.10.4-1
mingw-w64-x86_64-frei0r-plugins 1.7.0-2
mingw-w64-x86_64-fribidi 1.0.10-2
mingw-w64-x86_64-gavl 1.4.0-1
mingw-w64-x86_64-gcc 10.2.0-6
mingw-w64-x86_64-gcc-libgfortran 10.2.0-6
mingw-w64-x86_64-gcc-libs 10.2.0-6
mingw-w64-x86_64-gdk-pixbuf2 2.42.0-1
mingw-w64-x86_64-gettext 0.19.8.1-10
mingw-w64-x86_64-gflags 2.2.2-2
mingw-w64-x86_64-giflib 5.2.1-1
mingw-w64-x86_64-glib2 2.66.4-1
mingw-w64-x86_64-glog 0.4.0-2
mingw-w64-x86_64-glsl-optimizer-git r66914.9a2852138d-1
mingw-w64-x86_64-gmp 6.2.0-3
mingw-w64-x86_64-gnutls 3.6.15-2
mingw-w64-x86_64-graphite2 1.3.14-2
mingw-w64-x86_64-gsfonts 20200910-2
mingw-w64-x86_64-gsm 1.0.19-1
mingw-w64-x86_64-harfbuzz 2.7.3-1
mingw-w64-x86_64-hdf5 1.12.0-2
mingw-w64-x86_64-headers-git 9.0.0.6029.ecb4ff54-1
mingw-w64-x86_64-hlsl2glsl-git r848.957cd20-1
mingw-w64-x86_64-icu 68.2-1
mingw-w64-x86_64-ilmbase 2.5.3-1
mingw-w64-x86_64-imagemagick 7.0.10.11-3
mingw-w64-x86_64-intel-tbb 1~2020.2-2
mingw-w64-x86_64-isl 0.22.1-2
mingw-w64-x86_64-jansson 2.13.1-1
mingw-w64-x86_64-jasper 2.0.22-2
mingw-w64-x86_64-jbigkit 2.1-4
mingw-w64-x86_64-jemalloc 5.2.1-1
mingw-w64-x86_64-jxrlib 1.1-3
mingw-w64-x86_64-l-smash 2.14.5-1
mingw-w64-x86_64-ladspa-sdk 1.15-1
mingw-w64-x86_64-lame 3.100-1
mingw-w64-x86_64-lcms2 2.11-1
mingw-w64-x86_64-leptonica 1.80.0-1
mingw-w64-x86_64-libarchive 3.5.0-1
mingw-w64-x86_64-libass 0.15.0-1
mingw-w64-x86_64-libbluray 1.2.1-1
mingw-w64-x86_64-libcaca 0.99.beta19-5
mingw-w64-x86_64-libcddb 1.3.2-5
mingw-w64-x86_64-libcdio 2.1.0-3
mingw-w64-x86_64-libcdio-paranoia 10.2+2.0.0-1
mingw-w64-x86_64-libdatrie 0.2.12-1
mingw-w64-x86_64-libde265 1.0.8-1
mingw-w64-x86_64-libdeflate 1.7-1
mingw-w64-x86_64-libdvdcss 1.4.2-1
mingw-w64-x86_64-libdvdnav 6.1.0-2
mingw-w64-x86_64-libdvdread 6.1.1-1
mingw-w64-x86_64-libexif 0.6.22-1
mingw-w64-x86_64-libffi 3.3-2
mingw-w64-x86_64-libheif 1.10.0-1
mingw-w64-x86_64-libiconv 1.16-2
mingw-w64-x86_64-libidn2 2.3.0-1
mingw-w64-x86_64-libjpeg-turbo 2.0.5-1
mingw-w64-x86_64-liblqr 0.4.2-4
mingw-w64-x86_64-libmetalink 0.1.3-3
mingw-w64-x86_64-libmfx 1.25-1
mingw-w64-x86_64-libmodplug 0.8.9.0-1
mingw-w64-x86_64-libmysofa 1.1-1
mingw-w64-x86_64-libogg 1.3.4-3
mingw-w64-x86_64-libplacebo 1.29.1-3
mingw-w64-x86_64-libpng 1.6.37-3
mingw-w64-x86_64-libpsl 0.21.1-2
mingw-w64-x86_64-libraqm 0.7.0-1
mingw-w64-x86_64-libraw 0.20.2-1
mingw-w64-x86_64-libsamplerate 0.1.9-1
mingw-w64-x86_64-libsndfile 1.0.30-1
mingw-w64-x86_64-libssh2 1.9.0-2
mingw-w64-x86_64-libsystre 1.0.1-4
mingw-w64-x86_64-libtasn1 4.16.0-1
mingw-w64-x86_64-libthai 0.1.28-2
mingw-w64-x86_64-libtheora 1.1.1-4
mingw-w64-x86_64-libtiff 4.2.0-1
mingw-w64-x86_64-libtool 2.4.6-18
mingw-w64-x86_64-libtre-git r128.6fb7206-2
mingw-w64-x86_64-libunistring 0.9.10-2
mingw-w64-x86_64-libunwind 11.0.0-5
mingw-w64-x86_64-libvorbis 1.3.7-1
mingw-w64-x86_64-libvpx 1.9.0-1
mingw-w64-x86_64-libwebp 1.1.0-1
mingw-w64-x86_64-libwinpthread-git 9.0.0.6029.ecb4ff54-1
mingw-w64-x86_64-libwmf 0.2.12-2
mingw-w64-x86_64-libxml2 2.9.10-5
mingw-w64-x86_64-llvm 11.0.0-5
mingw-w64-x86_64-lua51 5.1.5-4
mingw-w64-x86_64-lz4 1.9.2-1
mingw-w64-x86_64-lzo2 2.10-1
mingw-w64-x86_64-mesa 20.3.1-1
mingw-w64-x86_64-meson 0.56.0-2
mingw-w64-x86_64-mpc 1.2.0-2
mingw-w64-x86_64-mpdecimal 2.5.0-1
mingw-w64-x86_64-mpfr 4.1.0-3
mingw-w64-x86_64-mpv 0.32.0-3
mingw-w64-x86_64-ncurses 6.2-2
mingw-w64-x86_64-nettle 3.6-2
mingw-w64-x86_64-nghttp2 1.41.0-1
mingw-w64-x86_64-ninja 1.10.2-1
mingw-w64-x86_64-ogre3d 1.12.6-1
mingw-w64-x86_64-openal 1.20.1-2
mingw-w64-x86_64-openblas 0.3.12-3
mingw-w64-x86_64-opencore-amr 0.1.5-1
mingw-w64-x86_64-opencv 4.5.0-2
mingw-w64-x86_64-openexr 2.5.3-1
mingw-w64-x86_64-openjpeg2 2.3.1-1
mingw-w64-x86_64-openssl 1.1.1.i-1
mingw-w64-x86_64-opus 1.3.1-1
mingw-w64-x86_64-p11-kit 0.23.21-4
mingw-w64-x86_64-pango 1.48.0-1
mingw-w64-x86_64-pcre 8.44-2
mingw-w64-x86_64-pixman 0.40.0-2
mingw-w64-x86_64-pkgconf 1.7.3-5
mingw-w64-x86_64-protobuf 3.12.4-1
mingw-w64-x86_64-pugixml 1.11.3-1
mingw-w64-x86_64-python 3.8.6-6
mingw-w64-x86_64-python-appdirs 1.4.3-1
mingw-w64-x86_64-python-attrs 19.3.0-1
mingw-w64-x86_64-python-beaker 1.11.0-1
mingw-w64-x86_64-python-mako 1.1.2-1
mingw-w64-x86_64-python-markupsafe 1.1.1-1
mingw-w64-x86_64-python-ordered-set 3.1.1-1
mingw-w64-x86_64-python-packaging 20.3-1
mingw-w64-x86_64-python-pyparsing 2.4.7-1
mingw-w64-x86_64-python-setuptools 47.1.1-1
mingw-w64-x86_64-python-six 1.15.0-1
mingw-w64-x86_64-readline 8.0.004-1
mingw-w64-x86_64-rtmpdump-git r514.c5f04a5-3
mingw-w64-x86_64-rubberband 1.9.0-1
mingw-w64-x86_64-speex 1.2.0-1
mingw-w64-x86_64-speexdsp 1.2.0-1
mingw-w64-x86_64-spirv-headers 1.5.3.1-1
mingw-w64-x86_64-spirv-tools 2020.4-1
mingw-w64-x86_64-sqlite3 3.34.0-1
mingw-w64-x86_64-srt 1.4.2-1
mingw-w64-x86_64-szip 2.1.1-2
mingw-w64-x86_64-tcl 8.6.10-1
mingw-w64-x86_64-termcap 1.3.1-6
mingw-w64-x86_64-tesseract-ocr 4.1.1-4
mingw-w64-x86_64-tinyxml 2.6.2-4
mingw-w64-x86_64-tk 8.6.10-2
mingw-w64-x86_64-ttf-dejavu 2.37-3
mingw-w64-x86_64-uchardet 0.0.7-1
mingw-w64-x86_64-vamp-plugin-sdk 2.10.0-1
mingw-w64-x86_64-vapoursynth 49-1
mingw-w64-x86_64-vulkan-headers 1.2.158-1
mingw-w64-x86_64-vulkan-loader 1.2.158-1
mingw-w64-x86_64-vulkan-validation-layers 1.2.158-1
mingw-w64-x86_64-wavpack 5.3.0-1
mingw-w64-x86_64-windows-default-manifest 6.4-3
mingw-w64-x86_64-wineditline 2.205-3
mingw-w64-x86_64-winpthreads-git 9.0.0.6029.ecb4ff54-1
mingw-w64-x86_64-x264-git r2991.1771b556-1
mingw-w64-x86_64-x265 3.4-1
mingw-w64-x86_64-xvidcore 1.3.7-1
mingw-w64-x86_64-xz 5.2.5-2
mingw-w64-x86_64-z3 4.8.9-1
mingw-w64-x86_64-zimg 3.0.1-1
mingw-w64-x86_64-zlib 1.2.11-8
mingw-w64-x86_64-zstd 1.4.5-1
mingw-w64-x86_64-zziplib 0.13.71-1
mintty 1~3.4.4-1
mpfr 4.1.0-1
msys2-keyring 1~20201002-1
msys2-launcher 1.0-1
msys2-runtime 3.1.7-4
nano 5.4-1
ncurses 6.2-1
nettle 3.6-1
openssl 1.1.1.i-1
p11-kit 0.23.21-1
pacman 5.2.2-7
pacman-contrib 1.4.0-1
pacman-mirrors 20201208-1
patch 2.7.6-1
perl 5.32.0-2
pinentry 1.1.0-2
rebase 4.4.4-2
sed 4.8-1
tar 1.32-1
tcl 8.6.10-1
tftp-hpa 5.2-3
time 1.9-1
tzcode 2020d-1
util-linux 2.35.2-1
wget 1.20.3-1
which 2.21-2
winpty 0.4.3-1
xz 5.2.5-1
zlib 1.2.11-1
zstd 1.4.8-1
OK, am I the only one with this issue? Can anyone here reproduce it in your machine?
I am using Intel G2020 (yeah! it's very much old). lscpu
does not show SSE3. there is only SSE and SSE2. Any explanation why?
There is only SSE and SSE2. Any explanation why?
I don't know. It should be able to work as your CPU should be able to run anything up to and including AVX. Are running MSYS2 in a VM or something?
No VM, just Windows on bare metal. So, where did you get the hint about sse3? Just curious.
march=core2
specified at lines 106-107 on mingw-w64-mesa PKGBUILD. That's the clue. It provides a 3-5% FPS boost over default SSE2 build with either MinGW-W64 or MSVC.
I thought msys2 does not enable any CPU specific instructions. OK, then it's conclusion time.
- The reason for this issue is my old CPU & hardware.
- The workaround is to rename/remove the opengl32.dll file. Or disable the CPU specific option in PKGBUILD.
Your CPU does supports all the extensions enabled by core2
march.
@Biswa96 @mati865 @revelator @lazka @mingwandroid I finally figured out what's going on here. I looked again at Intel G2020 specs and it looks like it doesn't support AVX. mingw-w64-x86_64-mesa includes swr driver which unfortunately is plagued by issues with AVX usage leaking into common code:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3860
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4437
It's good to see I'm not the only one 😅 OK, then reopening this issue. Waiting for fixes in mesa upstream...
All Pentium CPUs do no support AVX but still they cover more features than core2
so it indeed must be AVX that got enabled somewhere.
Aside from that IMO the fact that mesa is preferred over the system graphics driver is the problem here.
All Pentium CPUs do no support AVX but still they cover more features than core2
Recently I have seen this kind of thing with _xgetbv
intrinsic. If I compile it with a simple printf program with -mavx
option the program works. But if I add the -mavx
option in the actual project (ispc) the program crashes with illegal instruction error.
some of the later models do infact support AVX but support came much later than on the core models.
which kinda sucks when something requires this extension :/ and you have one of the older models
Recently I have seen this kind of thing with
_xgetbv
intrinsic. If I compile it with a simple printf program with-mavx
option the program works. But if I add the-mavx
option in the actual project (ispc) the program crashes with illegal instruction error.
-mavx
doesn't force using AVX everywhere, it tells the compiler to use AVX where it can help with the performance.
Recently I have seen this kind of thing with
_xgetbv
intrinsic. If I compile it with a simple printf program with-mavx
option the program works. But if I add the-mavx
option in the actual project (ispc) the program crashes with illegal instruction error.
-mavx
doesn't force using AVX everywhere, it tells the compiler to use AVX where it can help with the performance.
-mavx
turns on -msse2avx
on gcc and converts sse to avx Specify that the assembler should encode SSE instructions with VEX prefix. The option -mavx turns this on by default.
so that might break some things
-mavx
turns on-msse2avx
on gcc and converts sse to avxSpecify that the assembler should encode SSE instructions with VEX prefix. The option -mavx turns this on by default.
so that might break some things
Oh, I wasn't aware about it.
Interestingly gcc -Q -march=native --help=target
doesn't say it's enabled:
...
-mavx [enabled]
-mavx2 [enabled]
...
-msse [enabled]
-msse2 [enabled]
-msse2avx [disabled]
-msse3 [enabled]
-msse4 [enabled]
-msse4.1 [enabled]
-msse4.2 [enabled]
-msse4a [enabled]
-msse5 -mavx
if that's so, I think gcc needs to update their docs https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
as a note, on 3 machines with different gcc versions all show the same thing with -mavx
as well