Summary: | [regression, bisected] Steam fails to render content, if mesa is compiled with -O2 -march=native (CPU with bmi instruction supported) | ||
---|---|---|---|
Product: | Mesa | Reporter: | Gregor Münch <gr.muench> |
Component: | Drivers/Gallium/radeonsi | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | Default DRI bug account <dri-devel> |
Severity: | major | ||
Priority: | medium | CC: | lonewolf, lucas.francesco93, mihai.dontu, mike, pan.papadopoulos80 |
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Steam main window
lolscren |
Description
Gregor Münch
2017-06-17 16:02:16 UTC
Sadly, I can't reproduce this on Cape Verde. Piglit results good good. I mean piglit results look good. ;) One thing that comes to my mind, Im using Steam Beta. Maybe the problem is limited to that or its just steam itself. I'm having the same issue on Tonga(Gigabyte R9 380) on Arch Linux Ive tested this now, and again its a compiler flags issue. Arch standard clfags are: CFLAGS="-march=native -O2 -pipe -fstack-protector-strong" Looks like "-O2" is already too much. Setting this to -O1 fixes the problem. This is a very nasty issue. However, -02 is considered "safe" so the issue should probably fixed in mesa. Forgot to add: it isnt a problem with Steam Beta, its also in the non-beta variant. openSUSE, no problem with -O2 CFLAGS='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG' CXXFLAGS='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG' FFLAGS='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables' (In reply to network723 from comment #7) > openSUSE, no problem with -O2 > > CFLAGS='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall > -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables > -fasynchronous-unwind-tables -DNDEBUG' Using your cflags works, but adding -march=native (in my case -march=haswell) let the problem reappear. Same here. Removing -march=native fixes the issue(which in my case would be Skylake). Looks to me like you're hitting a compiler optimisation bug; what compiler (&version) are you using? Can you try another one? For instance, if you were using gcc, `CC=clang CXX=clang++ ./configure` should do it. It could be either a compiler bug, or a Mesa bug which only manifests itself with certain compiler options. Hi, I tried with both clang and gcc on Haswell / Pitcairn with "-O2 -march=native", and I obtained the very same broken display clang version 5.0.0 (trunk 306114) gcc version 7.1.1 20170528 (GCC) Ive tested now some instructions enabled by Haswell according to: https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/x86-Options.html#x86-Options And found the culprit with: -mbmi Setting this and compiling mesa, corrupts Steam interface and also graphs ingame enabled with Gallium_hud. Since the instruction is also used on AMD since Piledriver, it would interesting to see if those CPUs are effected as well. (In reply to Gregor Münch from comment #5) > Ive tested this now, and again its a compiler flags issue. > Arch standard clfags are: > CFLAGS="-march=native -O2 -pipe -fstack-protector-strong" > for clarity, default on archlinux is NOT -march=native . The current pacman version is 5.0.2-2 and it has these defaults : # ARCHITECTURE, COMPILE FLAGS ######################################################################### # CARCH="x86_64" CHOST="x86_64-pc-linux-gnu" #-- Compiler and Linker Flags # -march (or -mcpu) builds exclusively for an architecture # -mtune optimizes for an architecture, but builds for whole processor family CPPFLAGS="-D_FORTIFY_SOURCE=2" CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt" CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" #-- Make Flags: change this for DistCC/SMP systems #MAKEFLAGS="-j2" #-- Debugging flags DEBUG_CFLAGS="-g -fvar-tracking-assignments" DEBUG_CXXFLAGS="-g -fvar-tracking-assignments" -------------------------------------------------- Created attachment 133133 [details]
lolscren
this happens on LoL using nine too(and probably other games using nine with wine), but setting -nobmi as flag make every game that uses nine to not launch.
do we have any hints about what part of the new code is causing this bug?
(In reply to LoneVVolf from comment #14) > for clarity, default on archlinux is NOT -march=native . > Im sorry, youre right. Ive taken things from: https://wiki.archlinux.org/index.php/makepkg#Creating_optimized_packages I guess there are still numerous people affected by this bug and the question is what to do now. Lucas the correct flag to disable BMI is -mno-bmi I tried again today and I was not able to reproduce this bug. Im using gcc 7.2.1 20180116. I close this bug now. If someone still have the same problems, please reopen! |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.