Building mesa with "-march=native -O3" causes some 32 bit games to crash at start since "gallium: Force blend color to 16-byte alignment" patch (d8d6091a846ac2a40a011d512d6d57f6c8442e6a). This happens using both opengl or nine. Everything works as expected using "-march=native -O2".
tested games are:
The Talos Princible (32 bit) -- Always crash
The Talos Princible (64 bit) -- Works
League of Legends -- Always crash
World of Warcraft 1.21 -- Always crash
World of Warcraft 2.4.3 -- Sometimes crashes
World of Warcraft 3.3.5 -- Most times works
Please attach a gdb backtrace of a crash.
Created attachment 124940 [details]
steam gdb backtrace
Steam crashes (it's 32 bit)
The backtrace looks completely unrelated to the commit you cite. Why do you think that this particular commit is at fault?
Just to be sure, could you please provide a backtrace with debug symbols enabled (-g)?
The previous commit does just fine, this one does not.
I've found the traces to be different with and without the gallium hud, so I'm attaching both traces.
Created attachment 124947 [details]
steam gdb stack trace with gallium hud and mesa debug
Created attachment 124948 [details]
steam gdb stack trace without gallium hud and mesa debug
On second look, I am actually wondering if that commit really is doing the right thing. Shouldn't we try to set the alignment on the struct itself instead? And regardless, if someone uses an ordinary malloc for it it's not going to be aligned anyway (meaning if it's passed to drivers somewhere and the called functions are relying on this to be aligned they might be in for some surprise).
(That said I have no idea if this is really related to this bug.)
(The Gallium HUD crash is "benign": you enabled more graphs than there are pre-defined colors. Annoying, but unrelated to the problem at hand.)
My understanding is that malloc should return pointers with the largest alignment requirement possible for the size that it allocates. Although, perhaps that's less than 16 bytes on 32 bits?
Actually, I think that's it: the backtrace shows ctx=0x569cbfc8, i.e. ctx is only 8-byte aligned even though it contains a pipe_blend_color structure.
Moving to Mesa core since it's not really radeonsi-specific.
Could you please try whether the patch at https://patchwork.freedesktop.org/patch/98293/ fixes those crashes for you?
(In reply to Nicolai Hähnle from comment #9)
> Could you please try whether the patch at
> https://patchwork.freedesktop.org/patch/98293/ fixes those crashes for you?
Everything I've tested so far is working now.
I would actually recommend solving the problem in its root.
Disable auto vectorization.
FFmpeg recently tried removing "-fno-tree-vectorize" for gcc >=4.9 .
After a few weeks they reverted the change.
It caused a bunch of strange regressions, breakages and ICE.
That features has been around for nine years and it is still buggy.
Save yourself some headaches and disable it.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.