FEX 2603 Tagged
Welcome back, take off your shoes and relax, it’s been a while since our last release. With all of the regression hunting sorted out, we now have around two months worth of changes to go over. Let’s jump in to some of the changes that happened!
Steamwebhelper crash - Known Bug
One of the bugs we encountered that caused us to cancel last month’s release was a spurious crash that occurs with Steam’s steamwebhelper process. This ends up behaving like Steam is crashing constantly and coming back. What’s actually happening is one of the steamwebhelper processes crashes, and then steam restarts it consistently. This isn’t actually a regression on the FEX side, but a change that occured in Steam late last year that we didn’t notice initially. The CEF version that Steam is shipping has updated to change some behaviour around FD handling that FEX interacts badly with. We haven’t fully worked around the issue so Steam’s GUI may still crash fairly frequently, but as long as FEX’s logging is disabled then it is less likely to occur.
Hide big.LITTLE layout by default
We determined this month that some games with anti-tamper break if we expose the different CPU core names in the “product string” of CPUID. To combat this we are now hiding the big.LITTLE nature of the CPUs by default and now replicate CPU zero’s name across all cores. This fixes a fairly significant number of of anti-tamper games with just a trivial change.
Convert vzeroupper/vzeroall to use ZVA
This month we found out that some CPU cores are significantly faster at zeroing a couple of cachelines of memory using the dc zva instruction. This hadn’t become an issue on most consumer class CPUs because they can typically saturate their store pipelines using regular stp instructions already. vzeroupper is quite common when executing AVX code, so we want to make sure it is as fast as possible. This change alone increased Death Stranding’s FPS from 55FPS to 70FPS on AmpereOne CPUs in our test scene.
Fix build with upstream Clang/LLVM 22 and Mingw
This month we fixed our builds for both the latest LLVM 22 release and the newest LLVM-Mingw toolchain. There were some minor changes to the clang API and libc++ that required some work on our side to resolve. With these changes in place, this will now more easily allow package managers to build our Wine DLL files and use a newer compiler.
Switch one allocator to RPMalloc
This is a fairly big change that we did this month. We ripped out one of our JEMalloc allocators and instead replaced it with RPMalloc. The driving force behind this change is that RPMalloc uses significantly less RAM for its internal state tracking, which in turn means that FEX itself is using less RAM for the emulation. We’ve seen some dramatic examples where this change would shave hundreds of megabytes of memory off of FEX’s memory usage. This allocator is also quite a bit smaller so it is easier to read and see what it’s doing, which is good when JEMalloc is no longer maintained.
Various JIT changes
Another month of JIT changes that would take too much time to dive in to directly, so we’ll just list them off.
- VEX compare operations fixed
- Optimize x87 conversion instructions
- Fix undocumented x87 instruction alises
- Implement uncommon instruction ARPL
- Switch over to ankerl::unordered_dense instead of tsl for cache
- Fix initial PF flag state
Various Linux frontend changes
This month we had too many frontend changes to dive in to as well.
- Override glibc program_invocation name, so mesa can see application profiles
- Works around execveat Linux kernel bug with MFD_CLOEXEC
- Ensures seccomp gets inherited correctly
- Ensure personality gets inherited correctly
- Moves DRM LRU FD cache to be per-thread
- Updates sigaltstack minimum size requirements
- Ensures XSTATE_MAGIC2 is saved correctly
See the 2603 Release Notes or the detailed change log in Github.
