Skip to content

FEX-2210

Compare
Choose a tag to compare
@Sonicadvance1 Sonicadvance1 released this 13 Oct 08:57
· 4397 commits to main since this release

Read the blog post at FEX-Emu's Site!

This month's release was a bit delayed due to the fact that most of FEX-Emu's developers were meeting up physically at the X.Org Developer's
Conference this year! Before we talk about this months changes we need to spend a bit of time talking about some cool things.

FEX-Emu XDC talk

This year FEX-Emu had a talk to discuss some of the weird interactions with Mesa in an emulated environment. You can see the full talk in the embedded
video.
XDC Talk

At the end of the video we showed a quick demo of (mostly!) Proton games running under FEX-Emu on a Snapdragon 888 device. You can see this demo
directly embedded below.
XDC Sizzle Reel

Ubuntu 22.04 Rootfs Mesa update

We have had to update the Ubuntu 22.04 rootfs image with a newer version of Mesa today. Unfortunately our last update with Mesa 22.2 had a bug in the
Raspberry Pi Vulkan driver which completely broke Vulkan on ALL devices, not just raspberry pi. We have updated the rootfs today with a mesa git
version of the library to work around this issue. As a benefit, this version of the FEX rootfs includes the new Venus Vulkan 1.3 driver which can be
useful for testing.

Pick up the latest rootfs with the FEXRootFSFetcher tool.

New Lenovo ThinkPad X13s Gen 1 laptops

Last month Lenovo launched a new Snapdragon laptop that is one of the best development platforms that FEX-Emu devs could ask for. This platform is
shipping the Snapdragon 8cx Gen 3 SoC which is one of Qualcomm's most powerful chips. The only downside with this platform currently is that the GPU
doesn't yet work under Linux. There is an ongoing community effort to get the GPU up and running but these Snapdragon chips typically take a while
before support is fully in-place.

Once the GPU works then this will be a perfect platform for testing Adreno with the Turnip Vulkan driver and Freedreno. At that point we will be
shipping out these laptops to all of our devs so we have a good Vulkan development platform.

Tweet from @FEX_Emu

FEX-2210

Although most of our developers were at XDC, there is no shortage of code that was merged this last month.

IR changes preparing for AVX emulation

This last month had at least 32 commits preparing our JITs for emulating AVX. While AVX isn't yet wired up, this is still a required step before it is supported. We are still requiring ARM SVE hardware that is shipping with 256-bit wide registers. This means the current consumer CPUs and just announced Neoverse-V2 won't work for our emulation here! This is future-proofing work since more games are requiring AVX to run but we'll just need to live with the problem that we will need new CPUs for the latest AAA games to run under FEX.

Support clang for thunks

We added support for building our thunks with clang this release. In particular the Ubuntu PPA is shipping this already. This might give a very minor perf increase but the main thing is removing a hard dependency on GCC.

Add uninstall cmake target

While it is generally advised to not install directly from source building, user tend to still do this.
It was asked multiple times to have an uninstall target so we finally added this convenience feature.

32-bit VDSO thunking support

This is FEX-Emu's first 32-bit thunk library! This exercises most of the thunking framework to bring this feature to 32-bit, without some of the harder parts that require data repacking. Now that this is proving that our 32-bit thunking is working, it is likely that we will start working towards getting the rest of the thunks supporting 32-bit as well!

IR cleanups

While this isn't directly user facing, this makes the JIT IR a bit easier to handle. Making the devs lives easier. We've removed redundant operations that aren't necessary.

Add support for vixl simulator in CI

While we are waiting for SVE-256bit hardware to get on the market, we need CI to prove that our implementation is correct. We have once again added the vixl simulator to our source tree.
The vixl simulator supports emulating the SVE instructions at whichever register width you want. While stacking emulators isn't good for performance, it is good for ensuring correct behaviour.
Sadly ARM's simulator doesn't emulate 100% of the operations correctly, we have had to disable a few of our unit tests in this case; but, it works well enough that it can pick up major mistakes.

CI functional testing

We have added functional testing of some of our thunks in our CI system. Specifically we are testing our OpenGL and Vulkan thunks to ensure they don't break. Since this is the beginning of functional testing, we currently only run vulkaninfo and glxinfo.
Soon we will be expanding this functional testing to encompass more features which will likely capture even more problems if they come up.

Map ELF files more like the kernel

The kernel has an interesting behaviour around how it maps ELF files in memory. It will always load the dynamic linker at around the highest address
it can. The primary ELF file will be loaded roughly in the middle of the address space with a bit of ASLR bias. We now emulate the same behaviour in
FEX to help with problems when running WINE. While not all the issues are sorted out, this is a good step towards making it more stable.

Fix LLVM ASAN

We had an issue with our ELF loading where LLVM ASAN was breaking due to mixing multiple mmaps in the same space. Simple bug with a simple fix. ASAN
all the things!

SMC deadlock fix

There was a fix to prevent a potential deadlock in our Self-Modifying-Code detection routines. Thanks to the developer that found this!

Lots of misc fixes this month

It would be hard to list all of the misc other fixes that happened this month. Find out more in our raw release notes!

Raw Changes

  • Arm64

  • Fixes SVE VectorImm (ad85268)

  • Centralize location for register defines (169cfbb)

  • VectorOps

  • Make use of static predicate registers (0fee355)

  • CI

  • Fixes struct verifier on Ubuntu 20.04 (f97a4af)

  • Adds support for flakes (96fecfd)

  • CMake

  • Add toolchain file for 32-bit cross-compiler (1ed3ecb)

  • Extend AArch64 check to include arm64 (a583ebe)

  • Docs

  • Update Release docs (c987e1e)

  • ELFCodeLoader

  • Map primary ELF more like the kernel (b44b340)

  • Fixes dynamic non-interpreter ELFs (edca528)

  • Map interpreter first (71f7ff5)

  • ELFCodeloader

  • Map once and then use MAP_FIXED to overwrite (d68b84b)

  • FEXConfig

  • Ensure APP_CONFIG_NAME isn't stored in json (8d69f53)

  • FEXLinuxTests

  • Adds missing pthread_cancel flake status (c262362)

  • Migrate to Catch2 (8f70137)

  • Build 32-bit and 64-bit test variants separately (3448c83)

  • Use the build system instead of setting up compile flags via source-code annotations (d213869)

  • FEXServer

  • Fix waiting on kernel version older than 5.3 (8f9d799)

  • FHU

  • Convert to a interface target (dee85f1)

  • IR

  • Handle 256-bit VSMul/VUMul (23dd056)

  • Handle 256-bit VRev64 (c412d07)

  • Handle 256-bit VShlI/VUShlI/VUShrI (c2b6aef)

  • Handle 256-bit VSShrS/VUShlS/VUShrS (51214d1)

  • Handle 256-bit VFCMPORD/VFCMPUNO (7b4b9a8)

  • Handle 256-bit VFCMPLT/VFCMPGT/VFCMPLE (25a8a00)

  • Handle 256-bit VFCMPEQ/VFCMPNEQ (a67f742)

  • Handle 256-bit VCMPGT/VCMPGTZ/VCMPLTZ (ed8150c)

  • Handle 256-bit VCMPEQ/VCMPEQZ (462a163)

  • Handle 256-bit VBSL (6374175)

  • Handle 256-bit VSMax/VUMax (8d8b029)

  • Handle 256-bit VSMin/VUMin (aa6a499)

  • Handle 256-bit VNot (64c4fdc)

  • Handle 256-bit VFNeg (d715ffb)

  • Handle 256-bit VNeg (1799d4c)

  • Handle 256-bit VFRSqrt (dacd96c)

  • Handle 256-bit VFSqrt (ca4d3bf)

  • Handle 256-bit VFRecp (ea38b04)

  • Handle 256-bit VFMax (a39746d)

  • Handle 256-bit VFMin (2367a8e)

  • Handle 256-bit VAddP (cb121d7)

  • Handle 256-bit VFDiv (50eba40)

  • Handle 256-bit VFMul (4472265)

  • Handle 256-bit VFSub (3f8b872)

  • Handle 256-bit VFAddP (e573ddc)

  • Handle 256-bit VFAdd (eedbde6)

  • Handle 256-bit VPopcount (4e441e5)

  • Handle 256-bit VAbs (3e287a3)

  • Removes Mov IR op (46bde40)

  • Removes VExtractElement (01beac4)

  • Removes unnecessary VBitcast IR op (fcd981e)

  • Removes SplatVector{2,4} (2b9cc96)

  • Removes VInsScalarElement (82eba22)

  • Interpreter

  • Handle 256-bit VSShr/VUShl/VUShr (4d6e15d)

  • Use constant for AVX register size where applicable (808e1c0)

  • Handle 256-bit VMov (412793c)

  • Handle 256-bit VAnd/VBic/VOr/VXor (b5cb429)

  • JITs

  • Handle spilling/filling 256-bit vectors (6742e0c)

  • Expand max spill slot size to 32 bytes (0d0d116)

  • SMC

  • Fix possible deadlock (8da9ebc)

  • Scripts

  • Updates DefinitionExtract (3977e1f)

  • StructVerifier

  • Fixes CI failure (d4b5bf0)

  • ThunkLibs

  • X11/Xext: Removes two functions that don't exist on 32-bit (cc4c705)

  • Thunks

  • Add support for building with clang (2b1ef97)

  • Adds dependency on linker script (eaddf7f)

  • Implement the Thunk IR op for 32-bit mode (1ea00f6)

  • Adds functional thunk testing to CI (a590977)

  • Host

  • Adds bool operator to fex_guest_function_ptr (3237de3)

  • gen

  • Use fmt for writing formatted output (704afed)

  • libvulkan

  • Fixes print for 32-bit (d8c2a82)

  • VDSO

  • Fix vsyscall (5cf5940)

  • VectorOps

  • Handle 256-bit VURAvg (977d6dd)

  • Handle 256-bit VUMinV (0261ed3)

  • Extend VSQAdd/VSQSub/VUQAdd/VUQSub (f34f130)

  • Extend VAdd/VSub (0ad52b7)

  • Misc

  • Add opencl thunk db (b693112)

  • 32-bit VDSO support (6f6f3c9)

  • Update vixl external (832a320)

  • Move thunk generator logic from ASTVisitor to ASTFrontendAction (54915f8)

  • Add support for the vixl simulator (b36ec15)

  • cmake

  • Adds uninstall target (6adf227)

  • unittests

  • Disable gvisor pselect test (acddc03)