Commit Graph

13923 Commits

Author SHA1 Message Date
sguo35 b02e6e222f arm64: enable fma and "avx" on Apple and Cortex CPUs 2022-07-15 12:37:33 +03:00
sguo35 c52abed4d3 spu: implement ubertrampoline generator for arm64
Implement the ubertrampoline generator for arm64. It generally follows
the x86 version, but uses asmjit to generate code instead of writing raw
opcodes to memory, trading memory usage for readability. Currently the
trampoline implementation is fairly inefficient in terms of instruction
size and is substantially larger than the x86 version.
2022-07-15 12:37:33 +03:00
sguo35 9e57efe82c spu: implement assembly functions for arm64 2022-07-15 12:37:33 +03:00
sguo35 77ab872bec spu: remove rotqby C++ impl
rotqby C++ implementation is broken, since replacing it with the
intrinsic version reliably fixes spurs test. A conditional branch
immediately after a rotqby instruction will fail using the C++ version
but succeed using the intrinsic.
2022-07-15 12:37:33 +03:00
sguo35 27acebc5f5 spu: use portable llvm recompiler on arm64
Since there is not yet an arm64 version of the assembly (fast) version.
2022-07-15 12:37:33 +03:00
sguo35 2755d9941c ppu: fix a bug where arm64 sp wasn't being saved
ASMJIT can silently fail and drop instructions when invalid operations
are performed (e.g. loading/storing sp). Explicitly move sp to a gp
register before doing loads/stores to fix this.
2022-07-15 12:37:33 +03:00
sguo35 488982f424 spu: external function calls should be marked non-tail
Mark external function calls as non-tail, since they aren't tail calls
and assuming they are will cause returns to fail in Arm64 GHC CC.
2022-07-15 12:37:33 +03:00
sguo35 086e12c6ca mac: mmap calls should initialize with r/w page perms
Mac/Arm64 pages should be R/W by default due to 16k page
incompatibility. Without this there will be segfaults due to invalid
permissions.
2022-07-15 12:37:33 +03:00
sguo35 9b19f16698 arm64: add optimized 16byte ld/st for armv8.4a+
16B ldp/stp are atomic on v8.4a+. See Arm Architecture Reference Manual,
"Changes to single-copy atomicity in Armv8.4". Add load/release atomic
impls for this instruction and add detection for 8.4a+ capability.
2022-07-15 12:37:33 +03:00
sguo35 b13fd68848 [3rdparty] update asmjit dependency 2022-07-15 12:37:33 +03:00
Eladash 3e51426379 Savestates/SPU: Kill emulation when its safe to save SPU state 2022-07-15 09:30:53 +03:00
Megamouse 105781fa76 overlays: properly align lines with leading or trailing whitespace 2022-07-14 23:32:20 +02:00
Megamouse d2be12bb07 overlays: find missing characters lost during wrapped rendering 2022-07-14 23:32:20 +02:00
Megamouse fdc15e12c4 overlays: properly calculate offsets for wrapped text 2022-07-14 23:32:20 +02:00
Eladash e548743cbf Fixup rsx cpatures 2022-07-14 18:50:31 +03:00
Megamouse 7499f875a6 cellCrossControllerInitialize: add dialog 2022-07-13 19:12:46 +02:00
kd-11 cdef752a9c gl: Fix 2D->3D splat in CopyBufferToImage 2022-07-13 02:09:58 +03:00
kd-11 1483941bea gl: Implement row alignment in CopyBufferToImage routines 2022-07-13 02:09:58 +03:00
kd-11 9cc15be7f2 Fix linux build 2022-07-13 02:09:58 +03:00
kd-11 453e1bfaec gl: Silence compiler warning 2022-07-13 02:09:58 +03:00
kd-11 82439327fa gl: Support loading data from SSBO using compute shaders
- Gives better performance than using raw draw calls.
- Does not work with all formats. The draw call version is still used when needed.
2022-07-13 02:09:58 +03:00
kd-11 f60002e87d gl: Optimize memory barriers a bit
- Move waits to server side
- Increase the scratch buffer size to avoid waiting on barriers
2022-07-13 02:09:58 +03:00
kd-11 9fc6382909 gl: Finalize BGRA storage format internals
- Performance is terrible but it works properly now
2022-07-13 02:09:58 +03:00
kd-11 ebad08aa97 gl: Fix image creation for virtual formats 2022-07-13 02:09:58 +03:00
kd-11 599f1dd157 gl: Properly match BGRA RTT formats 2022-07-13 02:09:58 +03:00
kd-11 bb5ce67d57 gl: Handle corner cases for CopyBufferToImage
- Handle 3D textures and cubemaps
- Handle writing to mip > 0
2022-07-13 02:09:58 +03:00
kd-11 f948ce399e gl: Implement CopyBufferToImage in software
- Overrides the drivers CopyBufferToImage handling where possible
2022-07-13 02:09:58 +03:00
kd-11 954c60947d gl: Avoid calling gl functions without a context even if the object is GL_NONE
- While calling glDestroyXXXX with GL_NONE is a no-op, calling it without a context will crash some drivers.
2022-07-13 02:09:58 +03:00
kd-11 98b6783c05 gl: Fix image views broken after refactor 2022-07-13 02:09:58 +03:00
kd-11 0894d2886a Fix build 2022-07-13 02:09:58 +03:00
kd-11 4995b4abe3 gl: Do not use raw GL image copy command for RSX data 2022-07-13 02:09:58 +03:00
kd-11 35ef19cfc8 gl: Refactor the rest of GLHelpers 2022-07-13 02:09:58 +03:00
kd-11 09824a718f gl: Separate BGRA8 storage from RGBA8 2022-07-13 02:09:58 +03:00
Megamouse f4e85af53c sceNpUtil: implement skeleton bandwidth test 2022-07-12 22:45:40 +02:00
Eladash 74a909cfbc logs: Batch log messages (optimization) 2022-07-12 21:37:06 +02:00
Eladash 0bfdfd8433 Savestates: Implement Ctrl+R to reload the most recent savestate
Ctrl+R no longer means Resume emulation, this functionality has been transferred to Ctrl+P which is also capable of pausing the emulation. (so it's now a toggle)
2022-07-12 15:15:42 +03:00
Eladash 1f5cf776b2 Savestates: Fix "Suspend Emulation Savestate Mode" setting 2022-07-12 15:15:42 +03:00
Eladash cdd6840826 Savestates/SPU: Complete fix for saving sys_spu_thread_receive_event 2022-07-12 15:15:42 +03:00
Eladash ab27ee4cf4 Savestates/RSX: Save NV406E semaphore waiting 2022-07-12 15:15:42 +03:00
Eladash 6211295155 atomic.hpp: Truncation warning fix 2022-07-12 15:15:42 +03:00
Eladash befd7ceb89 Savestates/sys_spu: Minor fix in saving sys_spu_thread_receive_event 2022-07-10 14:19:59 +03:00
Eladash 2cead6f328 Savestates/SPU: Fix saving sys_spu_thread_send_event 2022-07-10 14:19:59 +03:00
Eladash 4e3d58f75a Savestates: Fix crash when savestating before PPU/SPU compilation finishes
Unintentional concurrent access to m_ar ptr itself.
2022-07-10 14:19:59 +03:00
Eladash 24fddf1ded rsx: Fix emu stopping crash when using multi-threaded rsx
FXO signaled abort before it completed its work, leading to unsignalled vk::fence and deadlock. Fix it by deregistering it from FXO.
2022-07-10 14:19:59 +03:00
Eladash 87cd65ff03 Savestates: support game collections 2022-07-10 14:19:59 +03:00
Eladash 219e3d61f8 Minor fix in shm::map_critical 2022-07-10 14:19:59 +03:00
Eladash 4ade06f36f Savestates/RSX: Restore the ZCULL control state
And fix the ZCULL control state at the initial state of RSX.
2022-07-10 14:19:59 +03:00
Nekotekina 786510a937 Use gettid() on Linux, don't use std:🧵:id
pthread_self() returns a large opaque pointer which is harder to use.
2022-07-10 12:22:28 +03:00
Megamouse 0c6df39a45 cellSearch: more error checks and shuffle 2022-07-09 16:39:10 +02:00
Vestrel 648ad0cd90
cellAudio: fix downmix if device doesn't support multichannel (#12328)
* cellAudio: fix downmix if device doesn't support multichannel
* Downmix in 2 stages
2022-07-09 15:25:28 +02:00