New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Counter Strike Global Offensive doesn't start with mesa compiled with -march=native #111
Comments
I've compiled mesa with -march=native and without this compiler flag, but it doesn't make any difference. The game starts and runs fine regardless of the CFLAGS chosen. |
Maybe it's a compiler version thing? I used gcc 5.1 on archlinux. |
Tested again with GCC 5.1.1 and I can confirm: |
crashes here: |
@siro20 , most likely a compiler bug. I do suspect that SSE instructions are used for memory transfer but some of the pointers is not aligned. Adding Making the smallest program that replicates it might be the most tricky part. |
replacing the memcpy with a loop resolves the problem. Both addresses are 8 byte aligned. |
This is a compiler/libc bug. |
@siro20, could you check the alignment of dst, src pointers and the offset of the field in the structure? I do not think it is glibc bug, since gcc tries to inline fixed sized memcpy operations. |
It's allocated by creating device9. |
Yes, SSE is able to handle unaligned access, by using two instruction for the load, instead of one. The CFLAGS should be in the |
I'm pretty sure that was also fixed with 29e2ccf. At least I think I have it with march=native again and it doesn't crash. Someone please reopen if not. |
As I said in irc, this log is from mesa git with nine/master merged in, compiled with --enable-debug with these cflags:
-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
with NINE_DEBUG=allhttps://gist.github.com/anonymous/d644e92447e1fa1518a3
When mesa is compiled with CFLAGS="-O2" csgo works flawlessly. When mesa is compiled with CFLAGS="-O2 -march=native", csgo does not start.
Another application I tried is skyrim. Skyrim starts either way. With AND without -march=native.
Maybe I should also say: I use an i7 3632qm (ivy bridge).
The text was updated successfully, but these errors were encountered: