Skip to content
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

Initial Linux Aarch64 port (PPU only) #11315

Merged
merged 1 commit into from Jan 15, 2022
Merged

Conversation

Nekotekina
Copy link
Member

No, nothing works.
image

@Nekotekina Nekotekina changed the title Initial Aarch64 support (Linux) [WIP] Initial Aarch64 support (Linux) Dec 30, 2021
@Nekotekina
Copy link
Member Author

Wow, PPU interpreter works now.

@Nekotekina Nekotekina force-pushed the master2 branch 14 times, most recently from b726ad6 to 6e77597 Compare January 7, 2022 03:09
@Nekotekina
Copy link
Member Author

image

enabled_features.shaderClipDistance = VK_FALSE;
}

if (!pgpu->features.shaderStorageBufferArrayDynamicIndexing)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lavapipe has this implemented on mesa-git and will be part of Mesa 22.0 release in February. It's best if you test lavapipe with mesa-git, Mesa's current stable has an issue that crashes most games on lavapipe (https://gitlab.freedesktop.org/mesa/mesa/-/issues/4855)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested on ubuntu 21.10 aarch64 and it does have all this stuff working. For some reason neko's system does not work right, but yea, this is not really a fix. We do invariably use these features unconditionally and there is no reasonable workaround for it as it is core fixed function stuff. I'll re-review when this is all ready for review.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use Ubuntu 22 container which seems to have outdated Mesa but there is no PPA for this version yet or I couldn't find it.

@Nekotekina Nekotekina force-pushed the master2 branch 7 times, most recently from b58de63 to ad1a69b Compare January 8, 2022 23:58
@Nekotekina Nekotekina force-pushed the master2 branch 14 times, most recently from 4e8b59d to f8ebbbd Compare January 15, 2022 02:02
@Nekotekina Nekotekina changed the title [WIP] Initial Aarch64 support (Linux) Initial Linux Aarch64 port (PPU only) Jan 15, 2022
* Update asmjit dependency (aarch64 branch)
* Disable USE_DISCORD_RPC by default
* Dump some JIT objects in rpcs3 cache dir
* Add SIGILL handler for all platforms
* Fix resetting zeroing denormals in thread pool
* Refactor most v128:: utils into global gv_** functions
* Refactor PPU interpreter (incomplete), remove "precise"
* - Instruction specializations with multiple accuracy flags
* - Adjust calling convention for speed
* - Removed precise/fast setting, replaced with static
* - Started refactoring interpreters for building at runtime JIT
*   (I got tired of poor compiler optimizations)
* - Expose some accuracy settings (SAT, NJ, VNAN, FPCC)
* - Add exec_bytes PPU thread variable (akin to cycle count)
* PPU LLVM: fix VCTUXS+VCTSXS instruction NaN results
* SPU interpreter: remove "precise" for now (extremely non-portable)
* - As with PPU, settings changed to static/dynamic for interpreters.
* - Precise options will be implemented later
* Fix termination after fatal error dialog
@MSuih
Copy link
Member

MSuih commented Jan 15, 2022

There's user reports that Java mode setting got flipped with this PR, causing issues like #5289 to reappear when default settings are used.

@Wooty-B
Copy link

Wooty-B commented Jun 7, 2022

@Nekotekina Are their any brief write ups on compiling for ARM64? I understand performance will be broken at best, but would like to start tinkering around with this as I have access to a decently powerful ARM workstation with a Radeon GPU. My problem in the past building this was always with the VulkanSDK being only available for x86 platforms. Appreciate any info on this, and apologies if this isn't the correct thread for this.

@Nekotekina
Copy link
Member Author

@Wooty-B I used pretty much out-of-the-box Ubuntu 22.04 container to cross compile for arm64. I think separate Vulkan SDK isn't required.

@Wooty-B
Copy link

Wooty-B commented Jun 11, 2022

@Nekotekina I'm currently running on Debian 11 aarch64, been playing around and I'm getting further but seems like it's failing related to ARM NEON. I'm not sure if I need to dig around and try to exclude NEON support, but here is the make failure in question:

[ 85%] Building CXX object rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/Cell/lv2/sys_interrupt.cpp.o
In file included from /home/wooty/Build/rpcs3/rpcs3/util/simd.hpp:21,
                 from /home/wooty/Build/rpcs3/rpcs3/Emu/Cell/PPUInterpreter.cpp:19:
/usr/lib/gcc/aarch64-linux-gnu/11/include/arm_neon.h: In function ‘v128 gv_rmuladds_hds16(const v128&, const v128&, const v128&)’:
/usr/lib/gcc/aarch64-linux-gnu/11/include/arm_neon.h:10656:1: error: inlining failed in call to ‘always_inline’ ‘int16x8_t vqrdmlahq_s16(int16x8_t, int16x8_t, int16x8_t)’: target specific option mismatch
10656 | vqrdmlahq_s16 (int16x8_t __a, int16x8_t __b, int16x8_t __c)
      | ^~~~~~~~~~~~~

Goal would be to get this built locally, however if there's any private builds uploaded anywhere I'd really just like to test a couple of things on this hardware. Thanks again for your ARM64 efforts and feedback!

@kd-11
Copy link
Contributor

kd-11 commented Jun 11, 2022

@Nekotekina I'm currently running on Debian 11 aarch64, been playing around and I'm getting further but seems like it's failing related to ARM NEON. I'm not sure if I need to dig around and try to exclude NEON support, but here is the make failure in question:

[ 85%] Building CXX object rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/Cell/lv2/sys_interrupt.cpp.o
In file included from /home/wooty/Build/rpcs3/rpcs3/util/simd.hpp:21,
                 from /home/wooty/Build/rpcs3/rpcs3/Emu/Cell/PPUInterpreter.cpp:19:
/usr/lib/gcc/aarch64-linux-gnu/11/include/arm_neon.h: In function ‘v128 gv_rmuladds_hds16(const v128&, const v128&, const v128&)’:
/usr/lib/gcc/aarch64-linux-gnu/11/include/arm_neon.h:10656:1: error: inlining failed in call to ‘always_inline’ ‘int16x8_t vqrdmlahq_s16(int16x8_t, int16x8_t, int16x8_t)’: target specific option mismatch
10656 | vqrdmlahq_s16 (int16x8_t __a, int16x8_t __b, int16x8_t __c)
      | ^~~~~~~~~~~~~

Goal would be to get this built locally, however if there's any private builds uploaded anywhere I'd really just like to test a couple of things on this hardware. Thanks again for your ARM64 efforts and feedback!

You must set -DUSE_NATIVE_INSTRUCTIONS=OFF in your cmake command. Also, wrong forum for discussion.

@Wooty-B
Copy link

Wooty-B commented Jun 12, 2022

@kd-11 Setting -DUSE_NATIVE_INSTRUCTIONS=OFF and -DUSE_SYSTEM_FFMPEG fixed my compile errors, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants