Commit Graph

12374 Commits

Author SHA1 Message Date
Nekotekina a69248299d SPU: Don't use shm::map_critical in SPU LS allocations
Use shm::try_map instead until proper area is found.
2021-01-25 17:45:47 +03:00
Nekotekina caa83d20f7 vm_native.cpp: implement shm::try_map
Treats addr as a hint, emulating windows behaviour.
2021-01-25 16:55:19 +03:00
Malcolm Jestadt 486d48e4f8 SPU LLVM: Optimize ROTQBY family for VBMI
- Avoid masking pshufb index by 0xf by using vpermb instead.
- Also fix conversion of vperm2b index to ShuffleVector index.
2021-01-25 13:18:23 +03:00
Nekotekina 8480674708 Thread pool: reset priority 2021-01-24 16:45:28 +03:00
Ani 7c62574e59 spu: Restore workers priority after initialization 2021-01-24 16:40:59 +03:00
kd-11 22584fb2d1 vk/dma: Disable pasthrough DMA for NVIDIA+windows
- The driver seems to cache page mapping as long as allocation has not been removed
- This is undesirable as we cannot stop the emulator to remove stale allocations every time a page is unmapped
2021-01-24 14:24:55 +03:00
kd-11 90ac9165e2 vk/dma: Unmap pages from GPU when they are unmapped in Cell 2021-01-24 14:24:55 +03:00
kd-11 bcb69a54b2 gl: Avoid type shenanigans used to fake byteswap for select formats
- Just use the reversed type instead.
  The new uploader backend combines swizzle+swap so there is no need for tricks anymore
2021-01-24 14:24:55 +03:00
kd-11 f93cb262ba vk/dma: Fix multiple logical bugs
- Fix range chaining.
- Add validation checks that no overlaps exist.
2021-01-24 14:24:55 +03:00
kd-11 67949bb5b7 vk/dma: Allow interoperability between pass-through and write-back DMA caching types 2021-01-24 14:24:55 +03:00
kd-11 e56da4eb46 vk: Workaround for amdgpu kernel driver 2021-01-24 14:24:55 +03:00
kd-11 f7fdfe52bc vk: Fix custom event signals 2021-01-24 14:24:55 +03:00
kd-11 7de0ff337b vk: Polishing and cleanup
Some spec violations fixes
Make the option dynamic
2021-01-24 14:24:55 +03:00
kd-11 e1c0a917fa vk/dma: Modify default page size to 64k 2021-01-24 14:24:55 +03:00
kd-11 ead180aa60 win32: Be a bit more optimistic with allocated ranges; we get contiguous ranges more often than not 2021-01-24 14:24:55 +03:00
kd-11 58d367d704 vk: Add host-imported DMA buffers 2021-01-24 14:24:55 +03:00
kd-11 a1ab6c28c1 vk/rsx: Fix some more bugs 2021-01-24 14:24:55 +03:00
kd-11 59e46f09b7 vk/dma: Disable memory inheritance
- It is not possible to emulate passthrough memory cleanly, and we don't need to
  A stupid race condition appears when trying to synchronize DMA blocks with memory inheritance.
  Since the usage pattern is to acquire a range and then load or write+flush, this new data is going to be..
  overwritten by the commandbuffer execution sequence later. Acquiring a scratch buffer to hold CPU content during the transition is not worth the effort..
  as the data will be destroyed anyway during the transfer process immediately afterwards.

  Fixes data corruption when moving data around using the emulated DMA passthrough
2021-01-24 14:24:55 +03:00
kd-11 7766076042 rsx/vk: DMA stuff 2021-01-24 14:24:55 +03:00
Eladash b96864c7e6 rsx: Improve gs frame exit workaround
Move to close(), hide before potential hanging at Emu.Stop()
2021-01-23 12:45:53 +03:00
Eladash 79513f06a4 rsx/gui: Delay game window pop-up until first frame 2021-01-23 12:45:53 +03:00
RipleyTom 00ff53499a fix UserInfo2_to_SceNpUserInfo2 2021-01-22 20:51:10 +03:00
Eladash 142b44d4be debugger: Implement F1 helper 2021-01-22 00:39:41 +01:00
Eladash 7f28489c70 Improve ppu_thread_cleaner a bit
Always join thread.
2021-01-21 21:32:13 +03:00
Eladash a58c12db0b SPU: fixup after #9630
Co-Authored-By: Ivan <nekotekina@gmail.com>
2021-01-21 21:32:13 +03:00
Eladash 12e1be2626 Implement thread_ctrl::wait_on (see #9208) 2021-01-21 18:31:51 +03:00
Eladash f81674232e Remove SPU and PPU destructors 2021-01-21 18:31:51 +03:00
kd-11 eb086b0e3f rsx: Add support shadow1D and shadowCube 2021-01-21 10:24:49 +03:00
kd-11 b6b9085773 rsx: Use unsigned variables to avoid sign problems when calculating stipple bits 2021-01-21 10:24:49 +03:00
Nekotekina 241989c5fa Fix new warnings
Added CELL_GCM_CONTEXT_DMA_NOTIFY_MAIN_0+ enums.
Added CELL_GCM_CONTEXT_DMA_TO_MEMORY_GET_NOTIFY0+ enums.

Co-authored-by: Eladash <elad3356p@gmail.com>
2021-01-20 12:27:37 +03:00
Nekotekina f944573b3c Fix old warnings: remove strncpy
Use strcpy_trunc instead.
Change some sce structs.
2021-01-20 12:26:09 +03:00
Nekotekina c66b155dcb Remove unnecessary fmt::throw_exception destructor body
Tested with GCC and Clang in Debug mode, it now works.
2021-01-20 09:02:25 +03:00
RipleyTom 5662867730 Change the way skylander ID is generated 2021-01-20 08:46:39 +03:00
Eladash dbecf0fa50 Introducing RSX debugger entry (main debugger) 2021-01-19 22:55:12 +03:00
Megamouse 62cb532460 Qt: hotfix for downloader
I accidentally broke the download progress bar in the last related PR.
I should've put more trust in the sanity of the younger version of myself.
This should fix it.
2021-01-18 22:41:31 +01:00
Nekotekina f9bc682115 Refactor some 'offending' code a bit (no effect)
It appears linkage errors were rare even in debug mode (GCC/clang).
2021-01-18 21:58:28 +03:00
Nekotekina 6cf0c5cd6d Fix fmt::throw_exception destructor v2
Remove destructor for MSVC.
2021-01-18 21:19:34 +03:00
Nekotekina 8a2a76da1e texture_cache: fix some warnings in AUDIT 2021-01-18 13:49:59 +03:00
Nekotekina e07484f057 Rewrite fmt::throw_exception destructor
Add _DEBUG in debug mode for consistency with MSVC.
2021-01-18 13:49:16 +03:00
Eladash 0070fce286
Compilation fix (#9622) 2021-01-18 13:41:39 +03:00
Malcolm Jestadt a2e8e3090c SPU LLVM: Optimize FSM following comparison
- FSM following a comparison instruction can be optimized to a single shuffle instruction
2021-01-17 16:52:44 +03:00
Nekotekina 0ac68def49 vm_native.cpp: minor compilation fix 2021-01-17 15:14:11 +03:00
Nekotekina def364fe28 SPU LLVM: add splat_scalar helper
Unrolls into zshuffle from the preferred slot.
2021-01-17 15:13:28 +03:00
Alex James c06707c891 CMake: Unset LIBUSB_LIBRARIES when using libusb submodule
If the system has libusb installed but USE_SYS_LIBUSB is false, the
static libusb will link against the system libusb (as pkg_check_modules
sets LIBUSB_LIBRARIES, and 3rdparty/libusb_cmake/libusb.cmake links the
usb-1.0-static target with LIBUSB_LIBRARIES). Unset LIBUSB_LIBRARIES to
avoid this when using the libusb submodule.
2021-01-17 13:51:03 +03:00
Alex James d7a8d385d8 CMake: Use find_package to find SDL2
This ensures that the SDL2 uses an absolute library path, which is
necessary when SDL2 isn't present in the default link directories (e.g.
on macOS).
2021-01-17 13:51:03 +03:00
Nekotekina 3567c43fb5 LLVM: generate trampolines for "null" functions
Embed name into the trampoline for easier debugging.
Only warn about it during the compilation phase.
2021-01-15 21:38:33 +03:00
Nekotekina aaaeb66cc8 vm: Minor fix in vm::close
Supplied size was wrong.
2021-01-15 20:12:30 +03:00
Nekotekina 4ed76a15ff Use different approach in shm::unmap_critical (Linux)
For now, set protection to PROT_NONE.
Attempt to address #9609
2021-01-15 20:11:09 +03:00
Nekotekina b5837d1271 Memory: use MADV_DONTDUMP if available (Linux)
Also refactor other madvise() usage
2021-01-15 19:54:41 +03:00
Eladash e4c3b1c2bd vm: Remove vm::dealloc_verbose_nothrow 2021-01-15 17:37:52 +03:00