Megamouse
1b2260132b
only call hid_exit when all hid_handlers are done
2021-02-22 10:45:40 +01:00
Megamouse
1479468730
Input: fix build
2021-02-22 10:45:40 +01:00
Megamouse
f0b7afd7cc
cellPad: minor optimization
2021-02-22 10:45:40 +01:00
Megamouse
870d26f9d8
Input: replace a bunch of static_pointer_cast
2021-02-22 10:45:40 +01:00
Megamouse
f6d465667a
Input: unify some more code
2021-02-22 10:45:40 +01:00
Megamouse
aaae30cb84
DS3: inherit from hid_pad_handler
2021-02-22 10:45:40 +01:00
Megamouse
fbb9396813
DualSense: inherit from hid_pad_handler
2021-02-22 10:45:40 +01:00
Megamouse
b9a4abce0e
DS4: inherit from hid_pad_handler
2021-02-22 10:45:40 +01:00
Megamouse
d0cc5c0fc7
DS4: enumerate devices periodically
2021-02-22 10:45:40 +01:00
kd-11
b7c2bfbcde
vk: Fix cyclic read-write in dma_block::load/flush
...
Some DMA block entries are stubs whose parents are DMA_block_EXT
entries.
Performing load() in this case becomes a memcpy(address,
same_address_again, length) which wastes performance and introduces
bugs.
2021-02-22 01:13:31 +03:00
RipleyTom
8be2a55ccc
Add mutex lock for NP changes
2021-02-21 18:04:55 +03:00
RipleyTom
81270f3142
Remove now useless code from sys_bnet_connect
2021-02-21 18:04:55 +03:00
Eladash
eb0d006168
Fix most of "[x] thread is too sleepy" at Emu.Stop() ( #9813 )
...
* Fixes some thread sleep/wait calls
2021-02-21 16:43:02 +03:00
Oschowa
a47bda026b
Audio/AL: Request our default sampling rate (48kHz) from AL when creating the
...
context.
Otherwise AL might downsample and output in 44.1kHz unnecessarily, which
happens at least on my system. Also tested on an audio device that
doesn't support 48kHz to makes sure that still works.
2021-02-20 14:31:38 +03:00
RipleyTom
5129d0da45
check alcGetString return pointers
2021-02-20 07:39:56 +01:00
Eladash
b86ec2ffcf
Fix potential overflows in utils::aligned_div, utils::rounded_div
2021-02-19 16:10:03 +03:00
Eladash
20eb4352fb
debugger: Fix single stepping ( #9793 )
2021-02-19 14:53:09 +03:00
Nekotekina
e76d8eb046
Fix -Wstring-aliasing (gcc)
2021-02-18 19:38:22 +03:00
Nekotekina
c8fefc4434
Fix -Wpessimizing-move (Clang)
2021-02-18 14:38:56 +03:00
Nekotekina
2c18d67769
Fix -Wsometimed-uninitialized (Clang)
2021-02-18 14:15:52 +03:00
Nekotekina
428771f1d7
Fix -Wself-assign (clang)
2021-02-18 14:07:22 +03:00
Nekotekina
038148bf06
Fix almost all GCC warnings
2021-02-17 22:59:04 +03:00
RipleyTom
6786734d95
Fix mic device default in config
2021-02-17 18:15:58 +03:00
Nekotekina
1446254a03
Add error on missing 'override'
...
For consistency.
2021-02-15 20:21:30 +03:00
Nekotekina
3bcd76bd4e
Fix regression (incorrectly removed specialization)
...
Changed CRLF->LF in VKPipelineCompiler.h
2021-02-15 17:05:51 +03:00
Nekotekina
0bcece4585
Make -Woverloaded-virtual an error
...
Had to devirtualize some functions.
2021-02-15 15:50:05 +03:00
Nekotekina
035ab590ec
Reset -ftemplate-depth to normal
...
It became obsolete.
2021-02-15 14:40:29 +03:00
Nekotekina
8e6e57de86
Enable -Wunused-function warning
2021-02-15 14:39:53 +03:00
Eladash
4c1026436f
Log "Missing Firmware" if firmware is missing
2021-02-15 09:50:52 +01:00
kd-11
9f97bab717
vk: Fixup and refactor for exclusive fullscreen stuff
2021-02-15 10:27:36 +03:00
13xforever
76518d4c59
add a hidden option to prevent switching to exclusive full screen mode
...
this is helpful for people streaming RPCS3, or to prevent disabling HDR mode in Windows
2021-02-14 22:01:33 +03:00
kd-11
eba7d3b172
rsx: Add duplicate section detection when there are too many sections in the surface cache
...
- Check for useless sections.
Helps in games that create a bunch of sections randomly for one-time use
2021-02-14 20:42:34 +03:00
kd-11
b8311caa6b
vk: Silence some compiler warnings
2021-02-14 20:42:34 +03:00
Eladash
5b044a93c1
Fix vm::falloc() for misaligned args ( #9764 )
...
Force addr/size alignment.
2021-02-14 13:19:14 +03:00
Eladash
f009d36811
Update log messages of PPU/SPU hashes and patches applied
2021-02-14 09:35:42 +01:00
Eladash
f43260bd58
Atomic waiting refactoring ( #9208 )
...
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117 )
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Eladash
cf384795d2
debugger: Improve PPU string constraints
2021-02-13 16:00:26 +03:00
Eladash
423cc1685c
PPU LLVM: Reduce PRX/OVL compilation memory usage a little
2021-02-13 13:05:41 +03:00
Eladash
5ed0cc293d
Fix PS3 process exit/exitspawn
2021-02-12 19:39:47 +03:00
Eladash
5401cb7392
kernel explorer: Display all PRX/OVL segments
2021-02-12 15:27:59 +03:00
Eladash
e26ae9899c
Reimplement/fix PRX patches
2021-02-12 15:27:59 +03:00
Alex Saveau
48296c2ba6
Fixup for multi-thread shader compilation (loading stage) ( #9762 )
...
* Multi-thread shader compilation
This offers a huge improvement in startup performance. With around 13,000 shaders we go from ~1:30 to under 10 seconds. It looks like this was the original intention of the author given the outer scope recompile variable.
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2021-02-12 14:39:35 +03:00
Ani
b858fceb4f
vk: Support incomplete lavapipe
...
Disable features still unimplemented by lavapipe when using it:
- samplerAnisotropy
- shaderStorageBufferArrayDynamicIndexing
- wideLines
as of mesa 21.1.0-dev (aea36ee05e9, 2020-02-10)
2021-02-11 14:49:37 +03:00
kd-11
195fb1cf66
rsx: Improve texture cache invalidate
...
- Bunch of improvements
- Properly signal renderer to rebind textures!
- TODO: Range checks, should be pretty easy
2021-02-10 11:37:14 +03:00
kd-11
52acc23ecf
rsx: Fix protection bug
2021-02-10 11:37:14 +03:00
kd-11
0a34fc4bcd
vk: Offload garbage collection to offloader thread
2021-02-10 11:37:14 +03:00
kd-11
bec91aab7b
rsx: Relax inheritance checks a bit
...
- It is not a fatal error for a texture to be defined where a framebuffer once existed.
2021-02-10 11:37:14 +03:00
kd-11
6f4dbf4fcd
vk/vma: Always use aligned requests
...
- Performance optimization when combined with vma optimizations added by me
2021-02-10 11:37:14 +03:00
kd-11
bf66c36ba4
rsx/texture_cache: Add support for reusing dirty images if possible
...
- Avoids a silly situation where a texture is discarded and an identical copy created immediately afterward.
Unfortunately allocating memory blocks is really slow so avoid it as much as possible.
2021-02-10 11:37:14 +03:00
kd-11
0c10f47e85
rsx: Lower cache block length to 256 pages
...
- Drastically lowers time wasted iterating blocks when many small objects
are present
2021-02-10 11:37:14 +03:00
kd-11
1bad9a939f
rsx: Refactor texture cache utils
...
- Also lays groundwork for optional hashed sections
2021-02-10 11:37:14 +03:00
Megamouse
8d6504d6e3
GUI: initial log viewer
2021-02-09 22:56:28 +01:00
Ivan
04c187deb5
Revert "Replace GetEmuDir() with GetExeDir() in handle_rpcs3"
...
This reverts commit f9eb6a31bd .
2021-02-09 22:24:09 +03:00
Megamouse
bc938ce630
dualsense: implement player LEDs
2021-02-09 19:21:37 +01:00
Megamouse
e5f95a450d
dualsense: update description
2021-02-09 19:21:37 +01:00
Megamouse
b31d38eef7
LED settings: set modal and add has_battery check
2021-02-09 19:21:37 +01:00
Megamouse
db402cb8af
dualsense: add player LED support
2021-02-09 19:21:37 +01:00
Megamouse
1af6550db7
dualsense: add lightbar support
2021-02-09 19:21:37 +01:00
Megamouse
7795f5207f
dualsense: fix switched motors
...
The left one seems to be the large motor
2021-02-09 19:21:37 +01:00
Megamouse
a9b8a50c31
dualsense: add output report structs based on linux driver
2021-02-09 19:21:37 +01:00
Megamouse
a9418fa1e7
dualsense: implement SetPadData for rumble in GUI
2021-02-09 19:21:37 +01:00
Megamouse
08f48d27e8
Input: minor simplification
...
This might prevent some copy paste error in the future
2021-02-09 19:21:37 +01:00
Megamouse
25a66da4ca
Input: rename some functions
2021-02-09 19:21:37 +01:00
Megamouse
ff61bc9e7c
dualsense: add mic button
2021-02-09 19:21:37 +01:00
Megamouse
3e8f4ba018
dualsense: add gyro support
2021-02-09 19:21:37 +01:00
Jordy Vieira
f9eb6a31bd
Replace GetEmuDir() with GetExeDir() in handle_rpcs3
2021-02-09 20:06:26 +03:00
Nekotekina
4f8cac731b
Fix SAFE_BUFFERS attribute for GCC
2021-02-09 12:33:50 +03:00
Nekotekina
3e496f6625
Add -fstack-protector (Non-MSVC)
2021-02-09 12:06:17 +03:00
kd-11
2d62f9c4c5
vk: Improve spec compliance ( #9748 )
...
- Always comply when running under strict mode
- Only allow hacky transport for known-to-work GPUs
2021-02-08 22:11:01 +00:00
Eladash
78811b8816
GUI: Always remove manually added fonts in OnChangeStyleSheetRequest()
2021-02-08 21:38:53 +01:00
Eladash
e38cd5149a
Fix firmware updating/reinstallation
2021-02-08 21:38:53 +01:00
Megamouse
dc2a1e270a
Qt: Repaint log on stylesheet change
2021-02-08 13:24:07 +03:00
Megamouse
44ab50553d
Qt: Replace relative paths in stylesheets instead of changing the working directory
2021-02-07 20:07:58 +03:00
Megamouse
7c683c368d
Qt: Fix weird naming issue on linux
2021-02-07 20:07:58 +03:00
Megamouse
62ca7a9b60
Qt: Simplify stylesheet logic
2021-02-07 20:07:58 +03:00
Nekotekina
632e36ab44
Qt: fix stylesheets on various platforms
...
Replace relative paths to resources.
Paths should start from GuiConfigs.
2021-02-07 14:09:50 +03:00
Nekotekina
0057c89eaa
PPU Analyser: follow fallbacks in some cases
...
Fallback is an "invisible" branch to the next instruction.
This may be necessary for certain cases when patches are used.
2021-02-07 11:02:45 +03:00
Nekotekina
9e9a55df46
PPU LLVM: compile instructions from patches
...
For now, only as a single instruction at a time.
2021-02-07 11:02:31 +03:00
Nekotekina
9463238490
PPU Analyser: minor fixups for end pointer
...
Add more sanity checks for sections.
Remove some redundancy.
2021-02-07 11:02:31 +03:00
Nekotekina
b7ff2ecffb
Patch system: export some info for future use
...
For now it's just a list of addresses.
For now it's not used (just a stub).
2021-02-07 11:02:31 +03:00
Eladash
fad89f1c3b
Fix tiny race in PPU breakpoints ( #9731 )
...
If the PPU has just being paused by the debugger, before it entered the breakpoint handler, the PPU would continue onto the next instruction skipping the breakpoint but then being paused on it instead.
2021-02-07 00:25:40 +03:00
Nekotekina
5063eefa96
Fixup for downloader
2021-02-06 15:21:00 +03:00
Nekotekina
25827c12a3
Make out of source builds get copy of /GuiConfigs/, /git/, etc.
...
Reduce quality of kot-bg.jpg.
2021-02-06 12:55:14 +03:00
Nekotekina
cb32fd15ee
Add supporters
2021-02-06 00:37:53 +03:00
Nekotekina
d6dcab443d
Updater: add minor sanity check
2021-02-06 00:37:53 +03:00
Nekotekina
c32fec774f
Create mini-cache for commits
...
Located in bin/git/commits.lst;
Created with GitHub API with --get-commit-db key.
Can be lazily appended with the same key.
2021-02-06 00:37:53 +03:00
kd-11
ddac4686a7
rsx: Clear vertex output register if nothing is written to it
...
- On NVIDIA GPUs, gl_Position is not initialized. Always clear to 0 to avoid on-screen crap
2021-02-05 22:22:07 +03:00
Megamouse
2865865382
Don't use std::exit during Qt initialization
2021-02-05 17:32:48 +01:00
Eladash
7ce835e878
Support logger stopping at std::exit ( #9722 )
2021-02-05 17:07:17 +03:00
Megamouse
7e0fdbbe99
Fix rpcs3.vcxproj
2021-02-04 23:11:05 +01:00
Megamouse
fd1f2ca1c6
Rename some variables to snake_case
2021-02-04 23:11:05 +01:00
Nekotekina
a6a92f7b6b
Qt: remove Q_OBJECT for mouse/kb handlers
...
Had to move QObject in parent list for g_fxo changes.
2021-02-04 23:11:05 +01:00
Eladash
4f85f151fd
SPU: Always signal the debugger about termination
2021-02-03 15:05:38 +03:00
Eladash
478ae0715e
Tiny fix for zombie PPU threads
2021-02-03 15:05:38 +03:00
Megamouse
714eb6dcc5
Disable LimitCacheSize option in custom configs
...
It doesn't make sense on a per game basis and is used before loading them anyway
2021-02-02 18:37:18 +01:00
Megamouse
89942ed92a
optimize add_only boot process
...
No need for hardcore stuff while adding games to the list
2021-02-02 18:37:18 +01:00
Megamouse
6ed9251f44
Remove tooltip event filter from gamelist
...
Fixes a weird issue where tooltips for the wrong game would popup.
I don't know why the event filter was needed.
Maybe the tooltips didn't work otherwise back then or it was just some copy paste from google.
2021-02-02 15:46:42 +01:00
Megamouse
2c32a721fc
Allow BootGame with indirect paths
2021-02-02 13:21:26 +01:00
Nekotekina
08aaae7999
PPU LLVM: workaround patch handling
...
Try to address #9704
2021-02-02 10:33:13 +03:00
Eladash
2005c89baa
memory viewer: Implement RSX mode
...
* Set the ground for RSX modes of register editor and insttruction editor, do not use shared ptrs directly.
* Make register editor and instruction editor modeless to allow to copypaste values from thread context etc in the background.
2021-02-02 01:05:36 +03:00
Megamouse
8c6aa9db31
Print report_fatal_error to cmd
...
useful if used like:
start /w ./rpsc3 --headless <path>
2021-02-01 21:44:23 +01:00
Nekotekina
58eef983e2
PPU Analyser: fix constraints for all elfs.
...
Added for main executable and OVLs.
Forgot to use it not just for SPRX.
2021-02-01 19:14:24 +03:00
Nekotekina
390b192f0a
TSX: workaround for check_state freezes
2021-02-01 19:14:24 +03:00
Nekotekina
7b40859eff
Remove unused header
2021-02-01 19:14:01 +03:00
Nekotekina
d0126f0fa0
Fix freezes in HLE Vdec and SPU LLVM precompilation.
...
Freezes could accidentally occur on close or ingame.
Deprecate range-for loop on lf_queue.
This is a part of PR #9208
Co-authored-by: Eladash <elad3356p@gmail.com>
2021-02-01 19:14:01 +03:00
Nekotekina
0c034ad7de
PPU LLVM: upgrade to GHC call conv
...
Get rid of some global variables.
Implement ppu_escape (unused yet).
Bump PPU cache version to v4.
2021-02-01 11:30:50 +03:00
Nekotekina
aeeceb7d0b
Minor fixups
2021-02-01 11:30:50 +03:00
Nekotekina
d5f16ce272
PPU Analyser: better constraints for SPRX
2021-02-01 11:30:50 +03:00
Nekotekina
c89362f6a2
PPU LLVM: don't use module name as PRX indicator
2021-02-01 11:30:50 +03:00
Nekotekina
8a029159cd
PPU Analyser: compile certain functions on per-instruction basis
...
PPU LLVM: optimize small blocks
2021-02-01 11:30:50 +03:00
Nekotekina
891ebd0cb1
PPU Analyser: use reloc info (disabled for now)
...
Add blocks from relocations.
2021-02-01 11:30:50 +03:00
Nekotekina
382509d778
PPU LLVM: Implement inline __add_get_ov
2021-02-01 11:30:50 +03:00
Nekotekina
f9ee8978ff
PPU LLVM: improve analyser
...
Compile possibly executable holes between detected functions.
Add unused "PPU LLVM Greedy Mode" option (for future updates).
Add "nounwind" attribute to compiled functions (reduces size).
2021-02-01 11:30:50 +03:00
Eladash
e71c2df39d
Debugger: Add some more shortcut descriptions in F1 helper
2021-02-01 00:21:50 +03:00
Eladash
cfc7865f82
Debugger: Allow to unpause a thread which has been paused by global pause
2021-02-01 00:21:50 +03:00
Nekotekina
cf6606065d
PPU: fix some typos in asm code
2021-01-31 20:00:04 +03:00
Megamouse
9feb92df1b
More informative Error message on Vulkan driver crash
...
The message might not be the only reason, but at least it might help someone like me, who had no idea what he was looking at.
2021-01-31 15:51:21 +01:00
Megamouse
be26810cd7
RSX: Implement set_value for progress dialogs
2021-01-31 15:02:26 +01:00
Megamouse
df79b6c238
RSX: update shader loading dialog at 60 fps
...
Looks much smoother
2021-01-31 15:02:26 +01:00
Eladash
82c86ed2f7
Implement standalone OVL (overlay) loading mode
...
* Allow to load OVL alone.
* Add error checks in ppu_load_exec(), do not crash on error.
* Fix crash on exit from standalone PRX mode, allow kernel explorer to work with it as well for the added OVL mode.
2021-01-31 15:47:05 +03:00
Eladash
9077563dac
Add missing destructor of progress dialog
2021-01-31 12:55:20 +01:00
Eladash
8d15f44b33
Fix ppu progress dialog percentage
2021-01-31 12:55:20 +01:00
Eladash
b3fbada10e
Fix potential crash of progress dialog
2021-01-31 12:55:20 +01:00
Megamouse
31cdd7bdd2
Prevent minor race in Progress Dialog Server
2021-01-31 12:18:32 +03:00
Megamouse
c464e90d5d
Fix stop exit of check_only ppu_initialize
2021-01-31 12:18:32 +03:00
Megamouse
670d2b191c
Minor optimization for check_only ppu_initialize
2021-01-31 12:18:32 +03:00
Megamouse
7bddb87306
Simplify compile threads
2021-01-31 12:18:32 +03:00
Megamouse
2025f02105
Search for more game data directories.
...
Also properly remove duplicate paths
2021-01-31 11:42:33 +03:00
Megamouse
1078626eea
Fix ppu compilation progress dialog
...
We could only increase the value because we completely based the dialog on cellMsgDialog.
This led to an issue where the dialog would increase its maximum and thus decrease the current percentage.
It then couldn't decrease and was stuck on the old percentage.
2021-01-30 21:34:16 +01:00
Eladash
16c6b44f55
Fix #9680 ( #9687 )
...
Fix regression from #9680
2021-01-30 19:05:02 +03:00
Eladash
6b3b06df25
rsx: Set frame limit to auto by default
2021-01-30 16:53:14 +03:00
Eladash
e3b3b0cda7
PPU LLVM: Precompile all executable (PRX, MSELF, overlay) code at startup ( #9680 )
...
* Precompile LLVM cache at startup of games, like the GUI "Create PPU Cache" option.
* Allow OVL (overlay) precompilation as well (used by certain games).
Co-authored-by: Megamouse <studienricky89@googlemail.com>
Co-authored-by: Nekotekina <nekotekina@gmail.com>
2021-01-30 16:08:22 +03:00
Nekotekina
bb2cc196a6
Fixup for preloading SPRX from MSELF
...
Forgot to append the offset.
Forgot to use different loop variable.
2021-01-29 21:26:34 +03:00
Eladash
d3bc96a201
Fix minor issue with usage of STL thread::hardware_concurrency()
2021-01-29 18:23:29 +03:00
Nekotekina
11ba6e45ab
Add MSELF support to SPRX precompilation.
...
Add ppu_precompile() function in PPUThread.cpp
Co-authored-by: Eladash <elad3356p@gmail.com>
2021-01-29 13:34:43 +03:00
Eladash
a742501a4f
Do not account RSX for TSX pauses
2021-01-29 10:31:15 +03:00
Eladash
70346028c5
Fix GCM HLE
...
Oops.
2021-01-29 10:31:15 +03:00
Megamouse
3359458175
Handle missing cases of Emu.BootGame failure
2021-01-28 20:54:27 +01:00
Nekotekina
6784301376
Check for rsx::thread existence in Emu.Stop/Pause/Resume
2021-01-28 20:23:13 +03:00
Megamouse
51d19e7c31
Input: remove debug error
2021-01-28 18:02:23 +01:00
Eladash
0652870204
New RSX Debugger
2021-01-28 17:40:26 +03:00
Nekotekina
67dd6754a6
Seal cereal includes in util/cereal.cpp
2021-01-28 10:48:53 +03:00
Nekotekina
34274ec391
Purge unused typeid() invocations
2021-01-28 10:23:29 +03:00
Nekotekina
53267e283b
PPU LLVM: implement ppu_finalize
...
Properly free certain compiled PRX/OVL modules (except dev_flash)
2021-01-27 18:03:49 +03:00
Nekotekina
15ed963a29
UI: Add supporters
2021-01-27 14:23:26 +03:00
Nekotekina
ee288340b0
Implement thread_ctrl::scoped_priority
...
RAII priority control (+1, or -1)
2021-01-25 21:49:16 +03:00
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
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
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
8a2a76da1e
texture_cache: fix some warnings in AUDIT
2021-01-18 13:49:59 +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
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
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
Nekotekina
ea916fd7e1
Memory: fix critical bug in shm::unmap_critical (Linux)
...
It was leaving holes in reserved areas.
Windows is unaffected.
2021-01-14 18:04:29 +03:00
Nekotekina
4bee8dc37f
Crypto: modernize key_vault.h
...
Use constexpr, remove warning guards
2021-01-14 15:23:52 +03:00
Nekotekina
8b01d05146
Crypto: modernize ec.h
...
Add const, use u8
2021-01-14 15:17:07 +03:00
Nekotekina
376e564cff
Crypto: make global vars in ec.cpp thread_local
2021-01-14 12:01:41 +03:00
Nekotekina
caf02d1841
Crypto: don't modify EDAT_IV (all zeros)
...
I didn't notice where it gets restored to zeros.
2021-01-13 21:57:38 +03:00
Nekotekina
6cf73fad13
Crypto: workaround -Wunused-variable
...
Ignore for key vault for now.
2021-01-13 19:02:14 +03:00
Megamouse
cfe660ab35
Qt/curl: fix segfault in curl
...
The QThread lived longer than the m_curl object.
This lead to a crash when closing RPCS3 while the download is still in progress.
2021-01-13 19:01:58 +03:00
Megamouse
8eaf76394c
Qt/Input: Use ellipsis as "mouse deadzone"
...
This is experimental and smoothens the existing square shaped deadzone
2021-01-13 11:25:33 +01:00
Megamouse
a692adefd7
Remove legacy patch support
2021-01-13 10:39:17 +01:00
Eladash
e05f1c37ad
memory viewer: Close all instances after emulation exit
2021-01-12 23:57:36 +03:00
Eladash
923fcc3b3d
utils::shm: Hotfix after #9578
2021-01-12 23:57:36 +03:00
Eladash
c50b9bc4b4
utils::shm: Make map_self() atomic ( #9578 )
2021-01-12 19:53:18 +03:00
Eladash
e1f95ceb54
sceNpTrophy: Fix sceNpTrophyRegisterContext for handler abortion ( #9586 )
...
* Implement handler abortion during context registration.
* Fixed recursive calls to sceNpTrophy functions such as by callbacks from registering context.
* Turns out the reader lock for context registeration was incorrect because ctxt->tropusr and trophy directory are being modified. Made it an exclusive lock after callback.
2021-01-12 19:14:51 +03:00
Megamouse
eb77495d5f
Implement richtext_item_delegate
...
And use it in pkg_install_dialog
2021-01-12 14:13:15 +01:00
Megamouse
270d602a26
Add filename to multi pkg installation
...
Some packages are indistinguishable otherwise
2021-01-12 14:13:15 +01:00
Megamouse
dd41ee68de
Simplify numbered_widget_item
2021-01-12 14:13:15 +01:00
Megamouse
46dc40f3f1
Add filename to single pkg installation
...
Some file info is indistinguishable otherwise
2021-01-12 14:13:15 +01:00
Megamouse
7c7af2e102
fix rebase conflicts
2021-01-12 14:13:15 +01:00
Megamouse
36189b8c3b
Try to distinguish between Update and DLC (Part 2)
2021-01-12 14:13:15 +01:00
Megamouse
cde802b16c
Move blocking code in order to free the explorer
2021-01-12 14:13:15 +01:00
Megamouse
1500e5f588
Try to distinguish between Update and DLC
2021-01-12 14:13:15 +01:00
Megamouse
fbe91fb245
fix linux compilation
2021-01-12 14:13:15 +01:00
Megamouse
321e7d6977
Don't hide the PKG install progress dialog after each package
2021-01-12 14:13:15 +01:00
Megamouse
56488a4ac9
Use boolean values in unedat
2021-01-12 14:13:15 +01:00
Megamouse
4a75f44d47
Minor include cleanup in utlis.h
2021-01-12 14:13:15 +01:00
Megamouse
deb4b03200
Add VERSION fallback to GetPkgInfo
2021-01-12 14:13:15 +01:00
Megamouse
df94c906da
Add more info to PKG install progress dialog
...
And fix installation of single packages
2021-01-12 14:13:15 +01:00
Megamouse
4d50d9daa4
unpkg: add missing break and some cleanup
2021-01-12 14:13:15 +01:00
Megamouse
0624bdc72d
Use package reader in pkg_install_dialog
2021-01-12 14:13:15 +01:00
Megamouse
ccec6e53c0
Rename package_reader member variables
2021-01-12 14:13:15 +01:00
Megamouse
68d411918d
Read patchsets from compat db
2021-01-12 14:13:15 +01:00
Nekotekina
0af452720e
RSX: Fix possible bug in memory streaming utils
2021-01-12 15:06:31 +03:00
Nekotekina
db8e6fe7a7
Enable -Wunused-variable
2021-01-12 14:34:14 +03:00
Nekotekina
631d7d0ce7
Enable -Wunknown-pragmas
2021-01-12 13:01:17 +03:00
Nekotekina
ed345e5b65
Enable -Winvalid-offsetof
2021-01-12 13:01:17 +03:00
Nekotekina
d3a66af7d6
Enable -Wcomment warning
2021-01-12 13:01:17 +03:00
Megamouse
52deff06ba
Random stuff ( #9589 )
...
* minor coding style adjustment
* Qt: simplify osk dialog buttons
* replace std::find_if with convenience functions
* RSX: use sv in swizzle comparison
idk, I'll remove this if it was intentional.
* overlays/osk: rename enter to return
This one confused me and make me look for a bug that caused the "enter" key to be disabled, while it was actually the return key (obviously xD).
2021-01-12 12:59:50 +03:00
Megamouse
838cbe1840
tiny include fix
2021-01-11 13:04:46 +03:00
Eladash
70804e2ba6
kernel explorer: Make it single-instance tool
2021-01-10 20:30:23 +01:00
Eladash
07c925223b
rsx: Fix index array offset bits
2021-01-10 18:40:02 +03:00
kd-11
c2cbc62be6
vk: Refactor some uber-headers
...
- VKHelpers was the rug everything was swept under for a long time.
This commit essentially deprecates its usage across most of the backend.
2021-01-10 12:04:31 +03:00
Nekotekina
9d74d42f2a
Fix compilation for gcc-11
...
In response to #9557
2021-01-09 14:38:01 +03:00
Eladash
bf6f43ec3a
Utils: Rewrite fmt::split
2021-01-08 22:23:48 +03:00
Megamouse
36159c2bd4
Add comment for deprecated avcodec_register_all
...
Apparently this is now done automatically and doesn't even need to be called at all
2021-01-08 14:36:49 +03:00
Megamouse
72e1d03860
Qt: ugly fix for ugly deprecation warning
...
Apparently Qt wants us to implement each comparison on our own, and there is no simple replacement for this.
2021-01-08 14:36:49 +03:00
Megamouse
ed1b8f2545
game_list: fix deprecation warning
...
We only need to check if the data is valid for clicks on empty space in the game grid. I don't remember why I initially checked < 0
2021-01-08 14:36:49 +03:00
Nekotekina
1ad0f24ecd
Fix or silence Qt warnings
2021-01-07 13:18:48 +03:00
Nekotekina
586440622b
Silence another warning (clang)
2021-01-07 12:46:45 +03:00
Nekotekina
6231b07d2a
Silence one warning (clang)
2021-01-07 12:42:15 +03:00
Nekotekina
1dcf5e4f85
Error on no return type warning
...
Added non-existing noreturn destructor to fmt::throw_exception (for clang).
2021-01-07 11:56:16 +03:00
Nekotekina
9ba8f4795c
Remove redundant #pragma once
2021-01-06 23:33:37 +03:00
Eladash
951fe3491e
PS3 Loader: Fix sections memorizing
2021-01-06 23:21:38 +03:00
Nekotekina
6ae1f1b02c
VFS: fixup handling . and .. after #9528
2021-01-05 16:16:01 +03:00
Nekotekina
673e84920b
fixed_typemap.hpp: remove useless reporters
2021-01-05 16:16:01 +03:00
Eladash
d1e1c14dc3
VFS: Escape path components which end with space or period
2021-01-05 16:15:47 +03:00
Megamouse
11db3151ae
VK refactoring Part 2 ( #9542 )
2021-01-05 10:49:03 +03:00
matoro
187216096d
Build: Add include for building on certain configs
2021-01-04 10:04:51 +03:00
kd-11
3f9b699eef
rsx: Fix ambiguous call to min(float16_t, float)
2021-01-04 02:28:24 +03:00
kd-11
cbe0000d23
Improved Zen chip detection
2021-01-03 19:31:18 +03:00
Eladash
0e278d2299
rsx: Make FP shader cache load lock-free
2021-01-03 01:47:07 +03:00
Eladash
21d725daa5
rsx: Fix shader cache of 2 or less pipelines
2021-01-03 01:47:07 +03:00
Eladash
247e90b3d0
rsx: Shaders cache loading and saving bugfixes
...
* Fixed crash whenever files are missing from the cache.
* Fixed crash whenever files are empty.
* Fixed crash whenever file creation/overwrite of cache files failed. (handled by fs::write_file)
* Fixed crash whenever there are any subdirectories inside the pipelines cache directories.
* Overwrite invalid shader cache files if encountered such.
* Optimizations have been added.
2021-01-03 01:47:07 +03:00
Ani
2b8eb8deb6
rpcs3_version: Bump to 0.0.14
2020-12-31 23:15:54 +03:00
Megamouse
7262f3d0b7
VK: make static chip_family_tables const
2020-12-31 22:57:17 +03:00
Megamouse
6f80fd0063
VK: move static chip_family_tables to cpp
2020-12-31 22:57:17 +03:00
Megamouse
7a51b7a019
VK: move helpers to vkutils
2020-12-31 22:57:17 +03:00
Megamouse
d9eb31000d
VK: refactoring part 1
2020-12-31 22:57:17 +03:00
Chris
f8589de476
Initial playlist-based custom soundtracks support ( #9362 )
...
* Initial playlist-based custom soundtracks support
This is the initial implementation of playlist-based (cellSearch) custom soundtracks support.
It is based on the initial work by @Megamouse and currently uses a directory-based approach to manage albums and utilizes FFMPEG to read audio metadata.
Background: The real PS3 can import music in XMB from USB into its internal storage (/dev_hdd0/music) and additionally stores metadata (artist, trackname, tracknumber, ...) in a database (/dev_hdd0/mms/db/metadata_db_hdd). Games can make use of imported music via cellSearch.
For the time being, this implementation does NOT make use of metadata_db_hdd as the db-format is not well understood and a folder-based approch is easier to use. Users only have to create folders inside /dev_hdd0/music and add music to it to create a "playlist". This playlists contents will be sorted alphabetically. As a result, users could prefix numbers to the audio-files to force a specific order.
The only really supported audio format is MP3. I also added support for AAC, AC3, WMA, ATRAC3 and ATRAC3 plus, however, non of these formats were successfully tested for several reasons. AC3 and WMA are not enabled in the current FFMPEG build which makes reading codec-specific data impossible. We could enable these later if we want to. AAC actually could work but I was not able to get it working in WipeOut HD Fury. My guess is that the game does not support AAC. Finally, I could not find any ATRAC3 (or Plus) music to test with.
This implementation currently only implements parts of cellSearchStartListSearch() and cellSearchStartContentSearchInList(). There are several other functions which are still completely unimplemented and will probably be needed by other games. However, this implementation is a starting-point and is enough for WipeOut and maybe a few other games.
A video which showcases this custom soundtrack support is available here: https://www.youtube.com/watch?v=4nu1OCtONTY
Next steps:
- Utilize sortKey in cellSearchStartContentSearchInList()
- Eliminate TODOs
- Implement the missing other functions
- Test on more games - I do not own many that support custom soundtracks
Signed-off-by: gladiac1337 <gladiac@gmail.com>
Co-authored-by: Megamouse <studienricky89@googlemail.com>
Co-authored-by: Ani <ani-leo@outlook.com>
Co-authored-by: Ivan <nekotekina@gmail.com>
2020-12-31 22:47:09 +03:00
Florin9doi
f1c61067bc
Buzz! emulated controller ( #9504 )
...
* Buzz emulated controller
Co-authored-by: Florin9doi <Florin9doi@users.noreply.github.com>
Co-authored-by: Ivan <nekotekina@gmail.com>
2020-12-31 21:02:03 +03:00
Nekotekina
8a5620592b
Implement util/fifo_mutex.hpp
...
Prototype. Uses 2 bytes.
Added minor fix to slow_mutex.hpp as well.
2020-12-31 20:07:50 +03:00
Nekotekina
5227e65808
vm: implement vm::atomic_op, fetch_op helpers
...
Can help to reduce lambda depth hell a little.
2020-12-30 20:11:02 +03:00
Eladash
c4c6dc19a5
memory viewer: Implement SPU mode, fix address GOTO
2020-12-30 15:42:56 +03:00
Eladash
7fc26b1fab
rsx: Implement Texture LOD Bias addend setting
2020-12-30 15:37:21 +03:00
Eladash
c0e121abef
rsx: Fix RSXTexture.h spacing
2020-12-30 15:37:21 +03:00
Eladash
7db13fdeff
rsx: Move Anisotropic Filter Override to RSX state
2020-12-30 15:37:21 +03:00
Malcolm Jestadt
c952e99f3e
SPU LLVM: Fix edgecase in icelake codegen
2020-12-29 22:01:11 +03:00
Nekotekina
35322b5d14
Remove deprecated _bit accessor from v128
...
Complicated (a lot of code), confusing (ambiguous)
2020-12-29 21:04:28 +03:00
Nekotekina
6b96807112
Reimplement utils::popcnt64
...
Implement utils::popcnt128
2020-12-29 15:28:02 +03:00
JohnHolmesII
e04b2eebc3
Warnings: Silence false warnings about fatal code paths
2020-12-29 14:17:34 +03:00
JohnHolmesII
02b684b810
Warnings: Warnings use kebab case, Mr. Kot
2020-12-29 14:17:34 +03:00
kd-11
18c120ab9f
rsx: Revert an accidental deletion
2020-12-28 21:49:11 +03:00
kd-11
f87dd91b52
rsx: Allow attempted fetch of non-existent surface
2020-12-28 21:49:11 +03:00
RipleyTom
4a8a161a43
Improve skylander portal emulator
2020-12-27 22:20:58 +01:00
Nekotekina
e3dec420a2
vm_native.cpp: conditionally define c_madv_free
2020-12-27 12:19:50 +03:00
Nekotekina
1e32311a65
Use MAP_NORESERVE when available in mmap (Linux)
...
Used in: memory_reserve, memory_decommit (vm_native.cpp)
2020-12-27 10:20:42 +03:00
Marin Baron
92e5bb88e8
Remove std typeinfo
2020-12-27 00:30:16 +03:00
Eladash
66581d115b
vm: Fix access violations on super memory, support super memory in vm::get_addr
2020-12-26 17:56:49 +03:00
Florin9doi
733f31f90e
Allow USB passthrough for THQ uDraw GameTablet
2020-12-25 14:27:24 +03:00
kd-11
a96b4412d3
rsx: Do not rely on program env state, instead, always use program ucode analysis results when doing codegen
...
- Some things can be present in program env but not ucode state
e.g A texture can be active and bound in a redirected manner but not actually be used in ucode
In such a case, only the ucode analysis or decompilation can decide whether to inject decoding routines
2020-12-25 02:39:08 +03:00
kd-11
bee76fc8d1
rsx: Refactor shader codegen and fix shadow sampling on depth-float
2020-12-25 02:39:08 +03:00
kd-11
d9cb1a6319
vk: Fix more spec violations
2020-12-25 02:39:08 +03:00
Nekotekina
567d23d856
Implement util/auto_typemap.hpp
...
Used in vm::block_t as an example.
2020-12-24 14:55:25 +03:00
Eladash
c94a98e15a
Fix minor typo
2020-12-23 20:50:33 +03:00
Eladash
72e6e87d82
Fix SPU ELF loader
2020-12-23 20:50:33 +03:00
Eladash
0055d84bd6
Partial revert of 43c87e99b0
2020-12-23 08:25:56 +03:00
Eladash
d17d22139e
SPU Debugger: Print reservation data
2020-12-23 08:25:56 +03:00
Eladash
87b6284275
memory viewer: Only allow "words" steps in powers of 2
2020-12-23 08:25:56 +03:00
Eladash
2c6b974f24
Fixup memory viewer SPU headers for RawSPU
2020-12-23 08:25:56 +03:00
Eladash
020acc8235
GUI: Rewrite GOTO address tools in debugger tools
2020-12-23 08:25:56 +03:00
Nekotekina
a8e0d261b7
types.hpp: more cleanup
...
Also fix compilation.
2020-12-22 19:08:09 +03:00
Nekotekina
6357b9a04f
perf_meter.cpp: register only named threads
...
Can workaround some possible problems.
2020-12-22 14:32:30 +03:00
Nekotekina
43a58df8a0
Butcher narrow cast a little (don't print value).
...
Also remove some forward declarations from util/types.hpp
If they don't work properly, it's easier to remove them.
2020-12-22 14:32:30 +03:00
Nekotekina
b7bf316c1a
Don't randomly include "stdafx.h"
...
It's file for precompiled headers.
Include what is used, don't rely on transitive includes.
2020-12-22 14:32:30 +03:00
Nekotekina
41ee792f95
MSVC: remove MemLeak build support
...
There are better memleak detection tools.
1) Requires to guard placement new and external libs
2) Doesn't work thoroughly
2020-12-22 14:32:30 +03:00
Fro Zen
acadaeed3a
Change skylander variants to use hex
2020-12-22 08:58:36 +01:00
Jan Beich
96bde3df81
atomic.hpp: revert Clang < 11 workaround for u128
2020-12-22 09:00:34 +03:00
Nekotekina
bd269bccaf
types.hpp: remove intrinsic includes
...
Replace v128 with u128 in some places.
Removed some unused files.
2020-12-21 21:11:25 +03:00
Nekotekina
5f618814f6
atomic.hpp: use u128 as storage for masks/values
2020-12-21 13:51:23 +03:00
Eladash
43c87e99b0
Debugger: Switch from NoThread when the emulation is running
...
And fix UpdateUnitList() when the emulation is stopped at initial startup.
2020-12-21 13:46:26 +03:00
Eladash
74a09a6338
PPU memory must be exec memory when using debugger's "Next Instruction" feature
2020-12-21 13:46:26 +03:00
Eladash
2b9c407dc3
Mask PC in debugger_frame::keyPressEvent for SPU
...
SPU only has 256kb of memory, need to work with this.
2020-12-21 13:46:26 +03:00
Eladash
59ed222205
Disasm: read instruction contents only once
...
Memory is volatile and may be changed by guest threads, ensure the decoded instruction matches with the data.
2020-12-21 13:46:26 +03:00
Eladash
2c06043617
Debugger: correctness fixes and cleanup
...
* Remove m_current_choice, it's not correct to rely on thread name entry. In extreme corner cases a newly thread can be created, old destroyed with the same entry name. (reoccuring LV2 SPU/PPU ID)
* Remove m_no_thread_selected, can be easily replaced with std::weak_ptr expired() function and is more accurate this way.
* In HandleBreakpointRequest: only remove breakpoint on valid PPU thread and not any thread! also fix potential nullptr deref if thread has recently been destroyed.
2020-12-21 13:46:26 +03:00
Eladash
ef884642e4
Cleanup disasm classes a bit
2020-12-21 13:46:26 +03:00
kd-11
e449111c33
vk: Fixup for renderpass issues
2020-12-19 12:58:44 +03:00
Megamouse
066e53da55
minor cleanup
2020-12-19 08:33:53 +01:00
Eladash
c74b2cb085
memory viewer: Fix resizing down
2020-12-18 21:00:09 +01:00
Nekotekina
eec11bfba9
Move align helpers to util/asm.hpp
...
Also add some files:
GLTextureCache.cpp
VKTextureCache.cpp
2020-12-18 18:07:42 +03:00
Nekotekina
d254a5736b
Fix bug with vector arg alignment in BIND_FUNC and callbacks.
2020-12-18 18:07:42 +03:00
Megamouse
b655e4aa47
Emu: implement on_exit callback
2020-12-18 16:05:40 +01:00
Nekotekina
1adec3d8e5
Hotfix: Emu.Quit after Emu.Stop
2020-12-18 13:37:14 +03:00
Nekotekina
db9b7db531
Cleanup and move sysinfo.h -> util/sysinfo.hpp
2020-12-18 12:55:54 +03:00
Nekotekina
05099e2ae1
Replace uint64_t with u64
2020-12-18 12:23:53 +03:00
Nekotekina
77352a2a86
Replace uint32_t with u32
2020-12-18 12:23:53 +03:00
Nekotekina
ae633292c0
Replace int32_t with s32
2020-12-18 12:23:53 +03:00
Nekotekina
d6042cf891
Replace uint16_t with u16
2020-12-18 12:23:53 +03:00
Nekotekina
534c63bf57
Replace uint8_t with u8
2020-12-18 12:23:53 +03:00
Nekotekina
fb29933d3d
Add usz alias for std::size_t
2020-12-18 12:23:53 +03:00
Nekotekina
360c4d1554
Simplify f16 type
2020-12-18 12:23:53 +03:00
Nekotekina
4cfa9b11f3
Move busy_wait() to asm.hpp
2020-12-18 12:23:53 +03:00
Megamouse
908465b274
memory viewer: improve layout and resize
2020-12-18 09:58:12 +01:00
Megamouse
a7f10d142e
fix warning
2020-12-18 09:58:12 +01:00
Megamouse
e855673802
memory viewer: check width and height in image viewer
2020-12-18 09:58:12 +01:00
Megamouse
112ac7bd13
memory viewer: fix RGB Image viewer crash
2020-12-18 09:58:12 +01:00
Megamouse
ec7963df3d
memory viewer: use enum for color formats
2020-12-18 09:58:12 +01:00
Megamouse
343d006ae2
memory viewer: more cleanup
2020-12-18 09:58:12 +01:00
Megamouse
ed8e5498d1
memory viewer: fix horrible overflow that freezes rpcs3
2020-12-18 09:58:12 +01:00
Megamouse
3cfead4ca6
memory viewer cleanup
2020-12-18 09:58:12 +01:00
Eladash
c8947eee6a
GUI: Make memory viewer address edit accept 0x/0X prefixes
...
Max length is 10, added regexp validator accordinally.
2020-12-17 22:57:13 +01:00
Eladash
6c1ca7d797
GUI: Polish the memory viewer
2020-12-17 22:57:13 +01:00
Eladash
2172974db9
Link the memory viewer with the debugger
2020-12-17 19:36:35 +01:00
Eladash
ba03df8511
GUI: Improve PS3 decryption tool
2020-12-17 18:49:04 +01:00
kd-11
fb47d1f788
vk: Register ampere GPU PCI IDs
2020-12-17 19:56:48 +03:00
Nekotekina
c16fb61bea
fixed_typemap.hpp: Fix assignment operator for g_ptr
...
Maybe RPCS3 hangs will finally be gone.
2020-12-17 16:47:25 +03:00
kd-11
235db57f0e
rsx: Do not reset vertex program texture mask when updating ucode analysis
...
- Fixes incorrect texture type detection in some games after program env/ucode separation
2020-12-17 09:36:20 +03:00
kd-11
cfbde005fb
vk: Force ampere GPUs to use the slower but spec-compliant depth-color resize route
...
- TODO: More investigation and optimizations
2020-12-17 09:36:20 +03:00
kd-11
0a865bd9dc
vk: Workaround for validation layers bug
2020-12-17 09:36:20 +03:00
Nekotekina
6b3f722ff0
Hotfix: useless error
2020-12-16 11:57:29 +03:00
Fro Zen
3dbecada4e
Almost all Skylander variants ( #9443 )
...
* Update skylander_dialog.cpp
* Fix formatting, sorted
* Support for skylanders variant
* Remove duplicate Legendary Hand of Fate
* Removed accidental Series 2 Dark Spyro
There is no series 2 dark spyro, also im removing these as im finding them so sorry if theres tons of commits
* Add LightCore Hex
* Remove Vehicle tag
* Add Big Bang Trigger Happy
Co-authored-by: RipleyTom <RipleyTom@users.noreply.github.com>
2020-12-16 11:02:59 +03:00
Megamouse
d21f87af5d
Fix unresponsive UI during SPU compilation
2020-12-16 11:01:51 +03:00
Megamouse
0bfec59af8
Fix stop during shader compilation
2020-12-16 11:01:51 +03:00
kd-11
035a76f26d
Fix build
2020-12-16 10:10:06 +03:00
kd-11
42f4e831a2
vk: Clean up some leftovers from shader decompiler rewrites
2020-12-16 10:10:06 +03:00
kd-11
d3686dbb75
rsx: Add some texture upload statistics to the texture cache
2020-12-16 10:10:06 +03:00
kd-11
fb1c790350
rsx: Make debug overlay dynamic
2020-12-16 10:10:06 +03:00
kd-11
0ef5743261
rsx: Fix sampler descriptor updates for framebuffer resources
...
- Each desc manages its own lifetime now instead of relying on global timestamp check
- Fixes situation where same object remains active without update for long
2020-12-16 10:10:06 +03:00
Nekotekina
e82bef425f
vm: fix warnings and add narrow cast for u64 ptrs
2020-12-15 20:10:16 +03:00
Nekotekina
24c246a9f6
Fix potential thread_pool crash on exit
...
Minor issue.
2020-12-15 20:01:26 +03:00
Nekotekina
e39348ad96
Make lf_queue<> compatible with atomic_wait
2020-12-15 19:19:36 +03:00
Nekotekina
ca5f0444bf
shared_ptr.hpp: add wait support for atomic_ptr<>
...
As well as default mask and value transformation function overload.
2020-12-15 12:52:21 +03:00
Nekotekina
4a883ba6ea
atomic.hpp: use SFINAE for waitable atomic detection
...
Add default_mask<> variable.
Refactor get_value<>().
2020-12-15 12:50:44 +03:00
Eladash
bfe1a8673a
PPU: Allow HLE execution from pure instruction decoder type interpreter
2020-12-15 11:18:51 +03:00
Eladash
0445ef393f
FW SPRX install: Fix IDM ID's leak
2020-12-15 11:16:45 +03:00
Eladash
7eb16e13bb
PRX loader: Fix libfs_155.sprx loading
...
Fix relocations' segments referencing when there are "empty" (memsize=0) LOAD segments.
2020-12-15 11:16:45 +03:00
Megamouse
03ad5c6830
Salvaging code ( #9432 )
...
* Minor input refactoring
* fix sys_config_unregister_io_error_listener log message
* Remove unused variables in RepaintTextColors
Co-authored-by: GermanAizek <GermanAizek@yandex.ru>
2020-12-14 14:33:43 +01:00
Megamouse
ab23e5ca0e
Minor tooltip grammar fix
2020-12-14 09:01:07 +03:00
Megamouse
35ecd00559
Remove BOM from new files
2020-12-14 09:01:07 +03:00
Eladash
e5603fec1e
Firmware libraries settings overhaul
2020-12-13 21:52:24 +03:00
Nekotekina
e321765c54
Split BEType.h to util/v128.hpp and util/to_endian.hpp
2020-12-13 16:34:45 +03:00
Nekotekina
62fdcf50ea
vm: initialize g_pages at vm::init
...
Can reduce compile time/overhead.
2020-12-13 15:39:36 +03:00
Nekotekina
09d293592e
shared_ptr.hpp: fix is_same_ptr<>() trait
...
Implemented as constexpr function.
2020-12-13 15:39:36 +03:00
kd-11
f83c2f0b6b
rsx: Restructure and simplify some header include chains
2020-12-13 15:38:35 +03:00
kd-11
d775c8dc73
rsx: Move shader analysis+prefetch to the end of the draw call
2020-12-13 15:38:35 +03:00
Fro Zen
8e07b19bc7
Add variant support for Skylanders ( #9424 )
...
* Update skylander_dialog.cpp
Co-authored-by: RipleyTom <RipleyTom@users.noreply.github.com>
2020-12-13 14:30:38 +03:00
Luke Barr
cb8ef46ec7
Initial DualSense Support ( #9308 )
...
* Initial DualSense Support
* Add Vibration Support
* Add CRC32 Validation to Incoming Bluetooth Packets
Cleanup report sizes
* Consistency, remove button comments, add two buttons.
Co-authored-by: Ani <ani-leo@outlook.com>
2020-12-13 00:00:45 +01:00
Fro Zen
ee814cfd0c
Update skylander_dialog.cpp ( #9419 )
2020-12-12 19:16:15 +03:00
Nekotekina
a6a5292cd7
Use uptr (std::uintptr_t alias)
2020-12-12 16:29:55 +03:00
Nekotekina
b59f142d4e
Move types.h to util/types.hpp
2020-12-12 15:12:01 +03:00
Nekotekina
666a18f5e5
Remove ceil2/floor2 from types.h
2020-12-12 15:12:01 +03:00
Nekotekina
dff4392c10
Move error_code to ErrorCodes.h
2020-12-12 15:12:01 +03:00
Nekotekina
b09b7c1184
Remove any_pod<> from types.h
...
Add simplified any32 to GCM.h
Add simplified cmd64 to PPUThread.h
2020-12-12 13:12:39 +03:00
Nekotekina
6e05dcadb6
Reduce std::numeric_limits dependency
...
Please, stop pretending...
You need these templates for generic code.
In other words, in another templates.
Stop increasing compilation time for no reason.
2020-12-12 12:35:18 +03:00
Nekotekina
bc7acf9f7a
RSX: remove overly long integer sequence (opcode_list)
...
Convert to constexpr array and move to gcm_printing.cpp
2020-12-12 11:38:35 +03:00
Nekotekina
cb19316a17
Fix u128 constructors (MSVC)
2020-12-12 09:54:39 +03:00
Nekotekina
33c3977036
endian.hpp: minor simplification
...
And stop pretending...
2020-12-11 22:00:26 +03:00
Nekotekina
7a015b6fc0
VKMemAlloc.cpp: use shared_mutex in vk_mem_alloc.h
...
Because it allows to use custom implementation.
Also fix compilation.
2020-12-11 19:05:11 +03:00
Nekotekina
aa3aef4beb
std::chrono cleanup: always use steady_clock
2020-12-11 19:01:56 +03:00
Nekotekina
72284b4530
Use atomic_t<> in VKMemAlloc
2020-12-10 18:58:11 +03:00
Nekotekina
65c04e4ddd
Remove constexpr from ppu/spu decoders.
...
We don't need them at compile time (yet).
But can reduce compile time and complexity.
2020-12-10 15:06:01 +03:00
Nekotekina
b382d3b3e9
Remove ASSUME macro
...
It's dangerous and sometimes bluntly misused feature.
Its optimization potential is near-zero.
2020-12-10 14:08:02 +03:00
Nekotekina
36c8654fb8
Remove HERE macro
...
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
kd-11
d25c401aec
vk: Validate image creation inputs
...
- Should avoid things like res scaling breaking when very large scaling is in use
2020-12-09 21:30:08 +03:00
kd-11
aac874a842
vk: Add even more D32_SFLOAT missing locations
2020-12-09 21:30:08 +03:00
Nekotekina
5d934c8759
Improve narrow() and size32() with src_loc detection
2020-12-09 16:26:20 +03:00
Nekotekina
e055d16b2c
Replace verify() with ensure() with auto src location.
...
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
Nekotekina
38745e5782
SPU ASMJIT: fixup mfence replacement
2020-12-09 11:15:40 +03:00
RipleyTom
d0c271e534
Simplify g_pages
...
This was done because otherwise msvc runs out of heap space on azure.
2020-12-09 11:15:08 +03:00
kd-11
f8d2830ac7
vk: Properly register D32_SFLOAT as a depth-stencil format ( #9396 )
2020-12-09 02:06:27 +00:00
Megamouse
a7e5c255b4
Qt 5.15.2 ( #8867 )
...
* Qt15: replace deprecated stuff
* Use Qt 5.15.1
* Move windows to Qt 5.15.2
* Move Ubuntu to Qt 5.15.2
2020-12-08 22:22:08 +01:00
Nekotekina
062c605eb1
atomic.hpp: fixup (rsp addressing)
2020-12-08 08:51:27 +03:00
Eladash
2602be426f
Allow emulation to work without firmware ( #9367 )
...
* Allow emulation to work without firmware
* Fix HLE prx path detection.
* Fix manual list loading bugs.
* Fix HLE gcm
* GUI: Fix fonts search
* GUI: Hardcode sprx list
Do not depend on /dev_flash/sys/external/ contents.
2020-12-07 20:10:34 +03:00
RipleyTom
51dcb4a79d
Remove bom from .hpp files
2020-12-07 20:03:44 +03:00
Nekotekina
24e4e329ed
atomic.hpp: add atomic_t<bool> specialization
...
May be required in future, plus adds/hides some methods.
2020-12-07 17:13:12 +03:00
Nekotekina
eb66302907
atomic.hpp: replace std::atomic with atomic_t
...
Dual dependency is nothing good.
2020-12-07 17:13:12 +03:00
Nekotekina
b16cc618b5
atomic.hpp: add some features and optimizations
...
Add atomic_t<>::observe() (relaxed load)
Add atomic_fence_XXX() (barrier functions)
Get rid of MFENCE instruction, replace with no-op LOCK OR on stack.
Remove <atomic> dependence from stdafx.h and relevant headers.
2020-12-07 17:13:12 +03:00
Nekotekina
77aa9e58f2
shared_ptr.hpp: add trivial conversion for shared/single types
...
These conversions don't exist in std::shared_ptr-alike types.
But I don't want to bother with == operators until we have proper C++20.
Removed trivial conversion for atomic_ptr because it's heavyweight.
2020-12-07 15:33:28 +03:00
kd-11
3a0b3a85a5
rsx: Separate program environment state from program ucode state
...
- Allows for conservative texture uploads
- Allows to update a program object without running full ucode analysis for no reason
2020-12-07 00:45:27 +03:00
Eladash
15a12afe25
Debugger: Implement code flow tracking
2020-12-06 15:32:13 +03:00
Eladash
427cf91447
Debugger: rewrite GetPc()
2020-12-06 15:32:13 +03:00
RipleyTom
af8c661a64
Remove BOM markers
2020-12-06 15:30:12 +03:00
Nekotekina
d1e7837422
atomic_t: cleanup type requirements
...
Add C++17 requirements.
Remove alignment requirements (auto-align type).
What's missing is to detect padding and forbid it.
2020-12-04 19:11:36 +03:00
Nekotekina
8efc22bd45
atomic.hpp: simplify and unify bit test instructions
...
Also make them available on all platform.
Rename some rare methods.
2020-12-04 14:33:38 +03:00
Nekotekina
983439076b
shared_ptr.hpp: fixups and updates
...
Fix atomic_ptr load() edge case.
Implement atomic_ptr::peek_op() to make possible to reduce load() overhead.
Implement atomic_ptr::compare_exchange() and friends.
Implement null_ptr constant, remove nullptr_t assignment/construction.
2020-12-04 14:10:53 +03:00
Nekotekina
019f566239
atomic.cpp: more phase splitting in notify_all()
2020-12-04 14:10:53 +03:00
Nekotekina
332410d20b
shared_ptr.hpp: improve atomic_ptr methods
2020-12-04 14:10:53 +03:00
JoãoPaulo
c2a85bde08
Update FW 4.87 Latest Version ( #9366 )
...
Updates the latest FW version according to: https://www.playstation.com/en-us/support/system-updates/ps3/
List of changes:
・ Updated blu-ray keys for new movie releases
・ Minor security fix
2020-12-03 18:16:38 +01:00
Nekotekina
13a0b88755
atomic.cpp: improve hashtable access
...
Simplified, tried to use all ptr bits.
Try to prevent self-collisions (bug).
Hashtable size doubled (to 8 MiB).
2020-12-01 10:19:31 +03:00
Nekotekina
32f39fec1c
Make cpu_counter::remove() async
...
Remove both mutex and assertion from it.
2020-12-01 10:18:41 +03:00
Nekotekina
cad3a6c547
sceNp.cpp: fix some UTF-8 string mismatch
2020-11-30 03:21:34 +03:00
kd-11
2aa5c437e8
rsx: Fix upscaled image reconstruction
...
- Base the upscaling on the real source and not the "attr" parameter.
- In case of reconstruction, the source is much larger than the subslice in "attr"
2020-11-30 01:20:17 +03:00
kd-11
67f48ce21c
rsx: Fix uncaught depth-func changes
...
- Depth func of always or never usually disqualifies depth testing.
Invalidate contested surfaces when depth func is changed.
2020-11-30 00:46:36 +03:00
kd-11
845a7d9968
Fix RSX replay thread lifecycle
2020-11-29 22:39:52 +03:00
Nekotekina
e0635cf65c
Remove unneeded non-ASCII character (unedat.cpp)
2020-11-29 16:18:22 +03:00
Nekotekina
3b8e3a9714
stdafx.h: remove BOM from custom included headers
...
Also add warnings about adding them.
2020-11-29 15:35:05 +03:00
Nekotekina
2bee096246
Try to set 2-3 GiB working space and show error if it's failed (Windows)
2020-11-27 14:49:07 +03:00
Nekotekina
872655369a
shared_ptr.hpp: fix critical bugs
...
Fix array initialization.
Fix reference counting.
Fix offset to refctr.
Add some features.
2020-11-27 14:32:41 +03:00
Nekotekina
b5d498ffda
Homebrew atomic_ptr rewritten (util/shared_ptr.hpp)
...
It's analogous to C++20 atomic std::shared_ptr
The following things brought into global namespace:
single_ptr
shared_ptr
atomic_ptr
make_single
2020-11-26 20:11:26 +03:00
Nekotekina
bd90e3e37f
atomic.cpp: shrink and simplify main hashtable
...
Reduce collision detection to 1 or 0 for now.
I think it should be offloaded to notifiers.
2020-11-26 20:11:26 +03:00
Nekotekina
8b6d615aa6
atomic.hpp: remove/deprecate incomplete notify features
...
Notification with "phantom value" could be useful in theory.
As an alternative way of sending signal from the notifier.
But current implementation is just useless.
Also fixed slow_mutex (not used anywhere).
2020-11-26 06:31:36 +03:00
Megamouse
9e352da052
Handle some undefined behavior regarding null pads
2020-11-26 00:45:49 +01:00
Nekotekina
95b8467a76
perf_meter.hpp: move logic to noinline function
...
May improve performance if perf meter is disabled.
2020-11-25 10:41:17 +03:00
Nekotekina
2b674d4d8c
utils::shm: allow 2M hugepages on demand
2020-11-25 10:41:17 +03:00
Nekotekina
487b572aa6
Linux: remove assertions on MADV_HUGEPAGE
...
It's a hint and is allowed to fail.
2020-11-25 10:41:17 +03:00
Nekotekina
600c0ea5ba
atomic.cpp: fix windows/std path
...
Always check condition after rearming internal semaphore.
2020-11-25 10:41:17 +03:00
Nekotekina
00e64920c8
Implement "slow mutex" without spin-waiting.
...
Benefits: only 1 byte.
Testing atomic wait.
2020-11-25 10:41:17 +03:00
Megamouse
9efedbe76a
Minor changes related to Emu.Stop()
2020-11-25 00:11:07 +01:00
Nekotekina
d8e9382573
asm.hpp: constexpr refactoring
...
Removed asm (what an irony), made many functions constexpr.
Removed some unused function, readding them should be trivial.
2020-11-24 13:20:40 +03:00
Nekotekina
ab248e170c
vm_native.cpp: add MADV_HUGEPAGE
...
It enables Transparend Huge Pages for some regions on Linux.
Although it can't be actively useful, it seems to do something.
Maybe it's even harmful for recompilers.
2020-11-24 12:31:11 +03:00
Nekotekina
27097cbcfe
atomic.hpp: alter atomic_storage<>::store a bit
...
Always fallback to exchange. May improve codegen on gcc.
2020-11-24 12:31:11 +03:00
Nekotekina
43952e18e2
Implement prefetch_write() and prefetch_exec() wrappers
...
Do some refactoring to prefetch_read() in util/asm.hpp as well.
Make all these function constexpr because they are no-ops.
2020-11-24 12:31:11 +03:00
Megamouse
5076da8f77
Fix auto exit
...
- Don't quit on stop if force boot was set
- Don't stop the emulator on gs_frame close when it was already stopped. This would remove the force boot flag by mistake.
2020-11-24 11:17:03 +03:00
kd-11
8228a4adcd
gl: Disable depth test before rendering text to the backbuffer which does have a Z buffer
2020-11-24 11:10:43 +03:00
Eladash
3f028fbb83
Fix SPU LS MMIO
2020-11-24 03:44:30 +03:00
Nekotekina
f0cba1371c
vm: adjustments
...
Increase max range lock size (less than 512 MiB)
Remove "range_executable" flag, make it reserved.
2020-11-24 01:09:04 +03:00
Nekotekina
14fa96fdef
atomic.cpp: don't use empty notify callback
...
Instead, allow setting it to null and check for null.
Similar could be done for wait cb, but it's set for all named threads.
2020-11-24 01:09:04 +03:00
kd-11
f1c65dcefc
vk: Improve support for RDNA
...
- Add support for RDNA2
- Add RDNA MSAA workaround
2020-11-23 19:20:00 +03:00
Nekotekina
16cc88dd0e
atomic.hpp: fix atomic_wait::list regression
...
Typo-regressions. Also improve static asserts.
2020-11-23 09:26:25 +03:00
Nekotekina
280f5f0b54
atomic.hpp: redefine op::ne to actually mean "not equal"
...
WTF is "native endianness", it's native by default.
2020-11-23 09:24:16 +03:00
Nekotekina
f85c8584b0
Attempt to fix #9316
2020-11-22 12:57:50 +03:00
Nekotekina
6cf50f8f6c
Second attempt to fix hanging RPCS3 process
...
Now fix exit logic a bit.
Remove Init() call from Stop().
Remove Stop() call from Quit().
2020-11-22 12:45:19 +03:00
Nekotekina
d70ab11477
atomic.cpp: remove redundant constexpr
...
Static initialization is all-zeros anyway.
But constexpr was killing my intellisense.
And probably also affected compile time.
Also make some internal structures hidden ("static").
2020-11-22 12:07:49 +03:00
kd-11
cab4c78b7b
rsx: Some shader compiler threads tuning
...
- Allow more threads for wide CPUs
- Simplify 'auto' selection a bit
2020-11-21 20:43:15 +03:00
kd-11
14358d5e84
qt: Add shader compiler threads to GUI
2020-11-21 20:43:15 +03:00
kd-11
7553429130
gl: Thread shader source compilation dispatch
...
- glCompileShader is in itself much slower than anticipated
2020-11-21 20:43:15 +03:00
kd-11
3ddfa288cf
rsx: Use multithreaded shader compiler backend
2020-11-21 20:43:15 +03:00
Nekotekina
e89a568765
Attempt to fix Emu.Quit()
...
There was some kind of "initialization order fiasco" of g_fxo.
Not only should it be used after main, but also destroyed before exit.
2020-11-21 18:27:16 +03:00
Nekotekina
71f1021648
Fix thread pool entry point and get_cycles()
...
Fix possible race between thread handle availability.
Don't treat zero thread as invalid one.
Now entry point is full is assembly.
Attempt to fix #9282
Also fix some TLS.
2020-11-21 17:18:42 +03:00
Nekotekina
60cff6f3d4
Attempt to fix #9271
2020-11-21 07:09:48 +03:00
Nekotekina
5f010c2f4c
atomic.cpp: optimize "cond" allocation with TLS
...
Billions of events can reduce to thousands, saving CPU time a few s.
Only 4 slots are available (arbitrarily), and only 1 is usually used.
Other slots are used only for waiting on multiple atomics.
2020-11-20 19:13:22 +03:00
Nekotekina
6c18e00977
atomic.cpp: use deterministic "cond" allocation
...
Takes ~80 ns instead of ~40 ns, same about deallocation.
Loops don't exist here, only 4-level semaphore tree.
Worst case only happens with concurrence, not from looping.
This optimization is not really necessary at current state of RPCS3.
This is more like to test C++ compilers and MSVC u128 implementation.
2020-11-20 15:04:17 +03:00
Nekotekina
72ac1aa537
atomic.cpp: use some actual hash for hashtable (std::minstd_rand)
...
Should only take about 5ns for initialization.
Should also make collisions almost impossible.
I also suspect I fixed some bad bug in process...
2020-11-20 15:04:17 +03:00
Nekotekina
5bcaa25c02
CPU: remove descheduled threads from suspend_all list
2020-11-20 13:53:34 +03:00
Eladash
85880ffded
SPU: Log STOP full opcode ( #9292 )
...
Co-authored-by: Ani <ani-leo@outlook.com>
2020-11-20 13:53:16 +03:00
Megamouse
5b207c3b95
hotfix for infinite loop when booting game data
2020-11-19 23:53:10 +01:00
Megamouse
3087f15dd8
Update disc boot detection and hope it works
2020-11-19 21:55:06 +01:00
Nekotekina
292af1e4cd
CPU: use u128 in bit counter
...
Apparently, u64 was not enough.
2020-11-19 16:05:08 +03:00
Nekotekina
d4d5dc99f3
Fix perf_meter<> after adding thread pool.
...
Print and reset sorted information after emulation stop/pause.
Print useless average value.
2020-11-19 14:44:58 +03:00
Nekotekina
3e1344e4e4
vm.cpp: minor optimization for filling stack guards
...
Use REP STOSQ on all compilers.
2020-11-19 14:44:58 +03:00
Nekotekina
6d37bc62a5
CPU: remove cpu_counter from g_fxo
...
Convert it to a namespace, simplify add/remove functions.
Don't add() threads just creates, they are trapped in check_state() anyway.
Don't add() threads which are leaving check_state() because stopped.
2020-11-19 09:46:22 +03:00
Nekotekina
e9f7c100a0
CPU: update suspend interface (dummy)
2020-11-18 19:15:56 +03:00
Nekotekina
190676c982
CPU: Fix g_suspend_counter waiting logic
2020-11-18 14:38:01 +03:00
Eladash
28cbba5a7d
SPU LLVM: fix AND instruction family ( #9290 )
...
Incorrect immediate test (looks like copypasta)
2020-11-18 14:36:26 +03:00
kd-11
0e7a705254
rsx: Resolution scaling overhaul
...
- Enforce square pixels instead of per-axis scaling
2020-11-18 09:29:34 +03:00
Nekotekina
68931b4c43
Debugger: fill stack guard with STACKGRD
2020-11-17 16:32:59 +03:00
Nekotekina
65c81c5e83
Fix memory viewer for SPU LS
2020-11-17 15:22:04 +03:00
Nekotekina
ccd0d2046d
SPU: increase max SPU count
...
According to max SPU TG count.
2020-11-17 15:22:04 +03:00
Nekotekina
0fec99e75b
SPU: absolutely unacceptable hack for SPU LS
...
Make normal threads inaccessible in PS3 memory.
2020-11-17 15:22:04 +03:00
Nekotekina
f8d1f070f5
sys_memory: HORRIBLE HACK for sys_memory_get_page_attributes
2020-11-17 15:22:04 +03:00
Nekotekina
3dd48a24ce
atomic.cpp: remove tiny redundancy
2020-11-17 15:22:04 +03:00
Nekotekina
984e97cbdc
Potential fix for Linux compilation
2020-11-17 15:22:04 +03:00
Eladash
50ea1a12c9
Debugger: Fix scrolling in first registers panel
2020-11-17 09:39:39 +01:00
Eladash
992a372fc7
cellGame fixes
2020-11-17 09:04:35 +01:00
Nekotekina
d7e1cf7dd2
vm: respect initial protection for allocation mapping
...
Unused yet.
2020-11-17 05:33:46 +03:00
Nekotekina
ea5f5aea5f
vm: memory locking rewritten
...
Added vm::lock_sudo method (wrapper for utils::memory_lock).
Put locking outside of vm::g_mutex scope.
Prelock sudo memory for RSX, vm::stack, vm::main.
Prelock sudo memory for shared memory objects.
Don't check for TSX path.
2020-11-16 12:46:15 +03:00
Nekotekina
eaf0bbc108
SPU: don't allocate SPU LS in vm::main
...
Create its own shared memory object.
Use vm::spu to allocate all SPU types.
Use vm::writer_lock for shm::map_critical.
2020-11-16 12:46:15 +03:00
Eladash
b1710bb712
SPU Debugger: Implement float registers view + General debugger fixes ( #9265 )
...
* SPU Debugger: Fix try_get_insert_mask_info
* Debugger: Always update thread state on context's data change
No longer needing to press on thread's instructions for actions to work!
2020-11-15 08:45:28 +03:00
Nekotekina
dfae7bd073
SPU: Fix some stat printing
2020-11-15 04:41:16 +03:00
Nekotekina
333fe9a561
atomic.cpp: fix notification on windows
2020-11-15 04:40:44 +03:00
Nekotekina
badb3dc2dd
atomic.cpp/threads: remove old wait callback
...
Add new wait callback which simply collects statistics.
Shift workarounds towards actual problem detection.
2020-11-14 18:16:27 +03:00
Nekotekina
3ac819ee70
atomic.cpp: fix waiting on multiple variables
...
Silly bugs are so silly...
2020-11-14 17:25:02 +03:00
Nekotekina
00f877e812
atomic.cpp: fix rare overload scenario
...
If slot allocation fails, increase reference counter in every slot.
This prevents search routine from "losing" some slots.
2020-11-14 13:56:23 +03:00
Nekotekina
1e269751bf
Temporarily disable memory locking if TSX is not used
...
It's a very heavy operation that could cause some problem under mutex lock.
2020-11-14 11:12:58 +03:00
Nekotekina
5b69eda39a
Fix suspend_all bug (TSX, TSX-FA)
...
Could cause freezes.
2020-11-14 10:56:05 +03:00
Nekotekina
71ca413067
Don't add lonely cpu_flag::memory on TSX path (bug)
2020-11-14 09:03:33 +03:00
Nekotekina
ab365fe494
Fixed thread pool a bit
...
Use 128-bit allocator instead of queue.
When pool is full (128), threads just terminate as before.
2020-11-13 13:32:44 +03:00
Nekotekina
e48f160a29
atomic.cpp: continuation of fixing all-ones masks
...
Also added missing const noexcept.
2020-11-13 12:40:02 +03:00
Nekotekina
cfda4d0ade
atomic.cpp: optimize raw_notify() for unspecified pointer mode
...
Remove unnecessary optimization from cond_alloc().
Optimistic case was absolutely dominating anyway.
Although the whole function is a dirty hack.
Now scanning through all threads is faster.
2020-11-13 07:05:33 +03:00
RipleyTom
debfae06a8
Improve disconnected state handling of dns queries
2020-11-13 07:05:06 +03:00
RipleyTom
e6f2f8ad0d
Add some error checking in sceNp2.cpp
2020-11-13 05:28:00 +03:00
Nekotekina
67785a918c
Implement simple thread pool
2020-11-13 03:32:24 +03:00
Nekotekina
3888b0429c
atomic.cpp: print some stats on stop
2020-11-12 05:52:22 +03:00
Nekotekina
70761a4ef0
atomic.cpp: fix notification bug from few commits before
...
Make sure forced notification ignores mask comparison.
Also fix masks provided by smaller types to correct ones.
2020-11-12 05:01:44 +03:00
Nekotekina
e37df998e9
atomic.cpp: minor optimization
...
Silly MSVC emits unnecessary initialize-on-first-use code guards.
Didn't check other compiler. But workaround just works anyway.
2020-11-12 03:41:19 +03:00
Nekotekina
c30cdfb3a7
atomic.cpp: merge more atomic variables for simplicity
...
Compress 16-bit ref counter and two 48+64 bit slot allocators.
This allowed to remove some weird unnecessary logic paths.
Adjust hashtable size to keep it the same.
2020-11-12 03:39:05 +03:00
Nekotekina
350b704cd7
atomic.cpp: combine two atomics (ref ctr and wait ptr)
...
Should fit into cache line perfectly.
Also makes ptr check more robust.
2020-11-12 01:06:12 +03:00
Nekotekina
ad013d59f4
atomic.cpp: don't load actual memory on empty mask
...
It's not an optimization. It just allows some tricks safely.
2020-11-11 23:59:09 +03:00
Nekotekina
d391133524
atomic.cpp: minor notification improvement
...
Check mask before locking the reference.
Can help to not bother non-eligible waiters.
2020-11-11 23:51:41 +03:00
Nekotekina
4b823469f7
atomic.cpp: restore notify_all() behaviour
...
Restore batch notification with non-blocking attempts.
2020-11-11 22:43:13 +03:00
Nekotekina
7cd1e767be
atomic.cpp: implement some atomic wait operations.
...
Instead of plain waiting while equal to some value,
it can be something like less, or greater, or even bitcount.
But it's a draft and untested. Hopefully doesn't break anything.
2020-11-11 20:46:37 +03:00
Eladash
fefab50e06
Fix vm::range_lock, imporve vm::check_addr
2020-11-11 10:30:09 +03:00
Eladash
6e27ab60ca
Registers Editor: Implement SPU/PPU register value broadcast
2020-11-11 10:27:45 +03:00
Eladash
74274f6d77
Debugger: Improve SPU/PPU vector registers
2020-11-11 10:27:45 +03:00
RipleyTom
908b2703f3
Fix missing controller mapping
2020-11-11 07:16:45 +03:00
Nekotekina
c047ab6147
atomic.cpp: waitable atomics got brutally rewritten
...
Hashtable increased and flatten, tree-alike extensions removed.
Some things simplified, so it can actually decrease perf a bit.
But most platforms shouldn't be affected.
Removed limit of 56 waiters per pointer.
Real limit now is about 65535.
2020-11-11 05:35:27 +03:00
Eladash
52fa69d93d
SPU Debugger: Improve registers panel
2020-11-10 22:51:52 +03:00
RipleyTom
a83df01bfd
rpcn 0.3.5 ( #9227 )
2020-11-10 08:55:49 +00:00
Eladash
b32d989a10
Fix PPU stack contents on allocation
2020-11-10 06:30:35 +03:00
Nekotekina
d1ee7c651f
Make memory locking optional (mlock, VirtualLock).
...
Fix desired locking operation (to fix "sudo" memory).
It was discovered that some systems have outdated configuration.
With too tight limit, it's almost impossible to lock anything in memory.
2020-11-10 06:05:37 +03:00
Nekotekina
dcbe8ef5f4
Import VirtualAlloc2 if available (Win10+)
...
Import MapViewOfFile3 as well.
Unused, this crap is tricky.
2020-11-10 03:04:38 +03:00
Nekotekina
bd5253047b
Improve DYNAMIC_IMPORT
...
Don't call get_proc_address every time if if failed.
Also rename Utilities/dynamic_library.h to util/dyn_lib.hpp
2020-11-10 01:44:31 +03:00
Nekotekina
cdaa8cb5c4
CPU: Improve suspend_all g_suspend_counter handling
...
Increase in two stages, giving more chances to use it.
Second stage is when all wait flags have been seen.
2020-11-09 23:54:36 +03:00
Nekotekina
083397a555
vm: lock memory under "sudo" addr
...
Remove memory touching from transactions.
2020-11-09 23:54:36 +03:00
Nekotekina
e98eb4659e
Implement utils::memory_lock
2020-11-09 22:57:36 +03:00
Nekotekina
d1988d384c
vm: remove unnecessary memset() on stop
2020-11-09 22:57:36 +03:00
Nekotekina
bc61835d97
CPU: use unsigned (u8) priority in suspend_all
2020-11-09 22:57:36 +03:00
RipleyTom
8a50880613
Fix path not being saved on install pkgs
2020-11-09 14:23:54 +03:00
Nekotekina
b05d12df0e
Hotfix for shm->map_self()
...
Make sure mmap returns 64K-aligned results, as on Windows.
2020-11-08 22:15:59 +03:00
Nekotekina
733b46d51a
sys_semaphore: add state check to sys_semaphore_get_value
...
Also to sys_semaphore_create, although we don't do it.
2020-11-08 19:03:41 +03:00
Nekotekina
8bc9868c1f
SPU/vm: Improve vm::range_lock a bit
...
Use some prefetching
Use optimistic locking
2020-11-08 17:23:17 +03:00
Nekotekina
3507cd0a37
SPU: improve spu_thread::reservation_check
...
Use optimistic locking and optimistic loop (expecting 1 iteration).
2020-11-08 16:43:15 +03:00
Nekotekina
21ec32b465
vm: implement g_shmem for range locks
...
Renamed from g_shareable. Contains pointers instead of bits.
Used in range locks to prevent any "collision" between memory.
2020-11-08 16:43:15 +03:00
Nekotekina
1c99a2e7fb
vm: add map_self() method to utils::shm
...
Add complementary unmap_self() method.
Move VirtualMemory to util/vm.hpp
Minor associated include cleanup.
Move asm.h to util/asm.hpp
2020-11-08 16:43:15 +03:00
Nekotekina
b68bdafadc
vm: refactor vm::range_lock again
...
Move bits to the highest, set RWX order.
Use only one reserved value (W = locked).
Assume lock size 128 for range_locked.
Add new "Size" template argument that replaces normal argument.
2020-11-08 16:43:15 +03:00
Eladash
bacfa9be19
Debugger fixups ( #9226 )
...
Fix logic error in callstacks handling code, always set first to false after first iteration.
Add explicit check for zero return addresses. Current code validity checks may not check for it properly when it sits on interrupt handler entry point (which may contain valid code).
Do not allow 0x3FFF0 to be a back chain address because it needs space for LR save area, only 0x3FFE0 and below satisfy this criteria.
2020-11-08 16:42:20 +03:00
Eladash
5265eb81e0
kernel-explorer: Add basic process info
2020-11-08 09:17:13 +03:00
Eladash
516da4ecdd
Debugger: Improve SPU/PPU callstack handling
2020-11-08 09:17:13 +03:00
Eladash
3cb5fd8ebc
Debugger: Implement SPU callstack, fix PPU callstack
2020-11-07 20:45:57 +03:00
Nekotekina
fd7ea82965
atomic.cpp: fix 3-arg notify functions
...
Third arg forces comparison with itself, and possibly forced wakeup.
2020-11-07 19:18:14 +03:00
Nekotekina
0bd989b118
atomic.cpp: allow waiting on multiple variables simultaneously
...
Arbitrary maximum set to 8, but really we need 2, maybe 3.
Added atomic_wait::list object for multi-waiting.
Added atomic_wait::get_unique_tsc just in case.
2020-11-07 18:18:02 +03:00
Nekotekina
bd0b292b39
atomic.cpp: adjust assumed pointer mask
...
Increase waiter mask (allow 65535 waiters).
Assume 47-bit pointers instead of 48-bit.
2020-11-07 15:08:46 +03:00
Nekotekina
31f0a0c064
atomic.cpp: add minor safety check
2020-11-07 15:08:46 +03:00
Nekotekina
3e445eff8e
atomic.cpp: maintenance of wait() function
...
Move hashtable allocation into another function.
2020-11-07 15:08:46 +03:00
Eladash
6dcd482dd0
SPU reservations: Do not illegally dereference reservation data
2020-11-07 14:03:09 +03:00
Morgan Creekmore
a28ab0a408
Set AccountAge to 18 to fix age restriction checks, fix incorrect logged function name ( #9218 )
2020-11-07 09:47:44 +00:00
Megamouse
a3eb5c2d63
More Header cleanup
2020-11-06 22:14:05 +01:00
Nekotekina
0a5742587a
atomic.cpp: upgrade raw_notify()
...
Now it searches all semaphores if data arg is nullptr.
Also it tries to wake up all threads if thread_id is 0.
2020-11-06 17:15:40 +03:00
Nekotekina
ad4df2d946
atomic.cpp: refactor native signaling functions
...
Add native_alert() and try_native_alert()
2020-11-06 17:15:40 +03:00
Nekotekina
bfe9580551
atomic.cpp: fix cond_handle data structures
...
Fix a critical bug with possible id out of range.
2020-11-06 16:56:59 +03:00
Nekotekina
1e45437498
Remove unused atomic with lock bit
2020-11-06 16:48:43 +03:00
Nekotekina
557f0c5a8a
atomic.cpp: remove load() from notify functions
...
Only compare masks for overlap for second overload (with mask provided).
Explicit "new value" can be provided in new 3-arg overloads.
Also rename atomic_storage_futex -> atomic_wait_engine.
2020-11-06 04:44:31 +03:00
Nekotekina
9fb8d449fe
atomic.cpp: more improvements
...
Add ref counters for internal semaphores for concurrent notifying.
Lack of them could result in loss of notification.
2020-11-06 00:14:53 +03:00
Nekotekina
1bb7c74c93
atomic.cpp: various cleanups and fixes
...
Add pointer comparison to notifiers (to prevent spurious wakeups).
Fix a bug with a possible double notification in raw_notify().
Fix a bug with incorrect allocatin bit slots for cond_handle.
Add a semaphore counter to track max allowed number of threads.
Use #define for some constants to STRINGIZE them in errors.
Add some error messages when certain limits are reached.
Fix a bug with a wrong check simply throwing std::abort.
Use "special" notify_all patch with batch processing for every arch.
Fix Win7 bug who no one probably noticed.
2020-11-06 00:10:16 +03:00
Nekotekina
34fa010601
Improve cond_var notifiers
...
But nobody uses it anyway, so clean up includes.
2020-11-06 00:10:16 +03:00
Nekotekina
5248240e10
atomic.cpp: improvements.
...
Reduced static memory amount for waitable atomics.
Allow notifier to skip notifications if wait/notify masks don't overlap.
Improve raw_notify to wake up the thread by its id, add thread_id arg.
Add optional mask argument to notify_one() and notify_all().
2020-11-05 05:51:43 +03:00
Nekotekina
ba5ed5f380
Fix vm::lock_range wrong check
...
Minor header refactoring.
2020-11-04 14:59:26 +03:00
Nekotekina
8d5e119582
Improve cpu_flag::temp handling
...
Ignore cpu_flag::suspend
Ignore cpu_flag::signal
2020-11-04 14:59:26 +03:00
Nekotekina
d022e7cd27
sys_prx: add cpu_flag::wait
2020-11-04 14:59:26 +03:00
Nekotekina
5d7acda80e
vm: minor refactoring
...
Renamed internal main range locking method.
2020-11-04 14:59:25 +03:00
Nekotekina
9b595c68a5
Fix some switch warnings
2020-11-04 14:59:25 +03:00
Nekotekina
dea8aa675a
Optimize cpu check_state() a bit
...
Move cpu_flag::dbg_pause check from the start.
To the moment before it actually goes to sleep.
2020-11-04 14:59:25 +03:00
Megamouse
027eba2b59
Add Quadro to fast version of VK get_driver_vendor
2020-11-04 12:13:56 +01:00