Commit graph

7045 commits

Author SHA1 Message Date
Eladash
52360b3f98 liblv2 HLE: Fix sys_lwmutex_lock assertation 2020-03-23 21:37:37 +03:00
Eladash
08e66ab14c Minor warning fixes 2020-03-23 21:37:37 +03:00
Eladash
3de41bfea7 _sys_lwcond_signal: Make mode 3 respect ordering of the sleep queue 2020-03-23 21:37:37 +03:00
Megamouse
1537f505a5 cellGem: fix move_handler::mouse left click 2020-03-23 15:10:01 +03:00
Nekotekina
5ebc538d7e Workaround for VS 16.5
Strange codegen bug didn't promote s32 to u64.
2020-03-23 14:48:49 +03:00
kd-11
4965bf7d7a gl/vk: Refactor draw call handling and stub shader interpreter
- Refactors backend draw call management to make it easier to extend
  functionality.
- Stubs shader interpreter functionality.
2020-03-23 14:47:28 +03:00
Eladash
537f175f52 Another fixup after #7826 2020-03-23 11:54:19 +03:00
Eladash
017ef5a94e Minor fixup after #7826 2020-03-23 10:59:51 +03:00
Eladash
cccc32fa9d
sys_lwmutex/lwcond: track lwcond waiters (#7826)
In lwmutex destroy syscall, wait for pending waiters.
2020-03-23 10:30:17 +03:00
Emmanuel Gil Peyrot
425e032a62 SPU: Copy with memcpy() instead of hand-rolled SSE2
In some very unscientific benchmark:
spu_thread::do_dma_transfer() was taking 2.27% of my CPU before, now
0.07%, while __memmove_avx_unaligned_erms() was taking 1.47% and now
2.88%, which added makes about 0.8% saved.
2020-03-22 15:51:03 +03:00
Nekotekina
e606130262 Memoize and print r3-r6 under Current function in the ppu_thread::dump() 2020-03-22 14:13:52 +03:00
Eladash
dc839e1784 lv2: Do not lose r3 data on syscalls
Allows to get the ID of the lv2 sync objects in the debugger by looking at r3's content.
2020-03-22 12:41:02 +03:00
kd-11
12044bd8b0 rsx: Properly calculate vertex range when divisor is active
- The upper bound is to be rounded up, not down.
2020-03-22 10:57:47 +03:00
Eladash
01cafc042d cellSaveData: Ensure savedata_context members are 16-byte aligned
I saw stvx v128{0} (aligned 16-bytes store) usage on the first 16-bytes of CellSaveDataCBResult before funcStat in fw.
Also I saw 4 stw of u32{0} on it as well before funcFile, funcFixed and funcList.
So just add the resets for result before all callbacks, and make all
members of savedata_ontext 16 -byte aligned in case there are more
members guaranteed to be aligned.
2020-03-21 19:05:20 +03:00
Eladash
ceaee0ec68 cellSaveData: Clear traces of setList setup from setBuf->buf, add missing memset
* Always memset 0 setBuf->buf (to bufSize) before funcStat if the direcory is not new.
* Always memset 0 setBuf->buf (to bufSize) if listGet->dirNum became non-zero (listGet->dirListNum can be zero yet memset still occurs) .
* Clear traces of setList setup before funcStat (after funcFixed/List, only if listGet->dirNum != 0, callback can hack this value and prevent the memset).
2020-03-21 19:05:20 +03:00
Eladash
b6a288d383 cellSaveData: Skip directory items in savedata_get_list_item 2020-03-21 19:05:20 +03:00
Eladash
ae14eb0747 Minor fix of cellUserInfoGetStat
stat == nullptr is allowed, fix invalid id error code.
2020-03-21 19:05:20 +03:00
Eladash
be0e586671 cellSaveData: Add error checks for cellSaveData(User)GetListItem 2020-03-21 19:05:20 +03:00
Eladash
66916df4ae cellSaveData: Set listSet->focusPosition to LISTHEAD by default 2020-03-21 19:05:20 +03:00
Eladash
fae46bf194 cellSaveData: Add CELL_SAVEDATA_ERROR_NOUSER 2020-03-21 19:05:20 +03:00
Eladash
e1cb827488 PPU Precise: Fix FMADDS, FMSUBS, FNMSUBS, FNMADDS 2020-03-21 16:32:09 +03:00
Eladash
3a36b713ce Dont spam syscalls stats if emu is paused 2020-03-21 16:31:18 +03:00
Eladash
9acf8e283d Fix OSK thread exit condition 2020-03-21 12:37:29 +03:00
Nekotekina
c577bd2111 Implement thread_state::errored
State after calling thread emergency_exit() function.
Also default-construct thread result in this case.
2020-03-20 21:31:27 +03:00
Megamouse
fd8cda0f2b overlays/osk: fix selection after changing panels
We now try to keep the current x and y selected after panel changes.
Also change some copy to ref
2020-03-19 21:10:08 +01:00
Megamouse
c63f77e3b0 overlays/osk: fix full width characters 2020-03-19 21:10:08 +01:00
Megamouse
a1f70bf96e overlays/osk: do not change the preview text on empty input
This prevents that the placeholder disappears
2020-03-19 21:10:08 +01:00
Megamouse
f1127f1894 overlays: implement osk panels 2020-03-19 21:10:08 +01:00
Eladash
1dbb5422a2 Avoid a segfault when reading ppu stack contents in debuggers
TODO: lock vm mutex.
2020-03-19 14:18:05 +03:00
Eladash
7139c4fbab Fix bug introduced by #7797 2020-03-19 07:22:05 +03:00
Malcolm Jestadt
0bfdc1f62e PPU LLVM: Improve VMADDFP and VNMSUBFP
- Use native FMA to emulate VMADDFP, with a fallback for processors that don't support FMA
- Use native FMA to emulate VNMSUBFP as well, but note that it differs from the emulated path with regards to negative zero
2020-03-19 06:47:16 +03:00
Eladash
b11e8f8b8d Minor fix of sys_ppu_thread_yield return value
Account for a special case where threads were rotated but no context
switch was made.
2020-03-19 06:45:14 +03:00
Eladash
7be35315da Fix lv2 sys_lwcond/sys_lwmutex kernel explorer names 2020-03-19 06:45:14 +03:00
Nekotekina
6a2571d0e1 SPU: print current chunk hash in dump 2020-03-18 18:28:46 +03:00
Nekotekina
20f7544a8a SPU profiler: minor change
Use std::greater to sort
2020-03-18 18:28:46 +03:00
Zion Nimchuk
2678ac6382 Change default audio backend on non-windows
FAudio is preferred, but if we didn't build with FAudio, we default to OpenAL
Also changed it to explicitly use xaudio backend on windows, rather than the static cast we had before.
2020-03-18 09:38:13 +01:00
Eladash
03a6d67c6c Log sys_lwmutex/sys_lwcond names as strings
Use std::string_view instead of creating a temporary NTS string when reading object name.
2020-03-17 18:22:13 +03:00
Eladash
a9f492b605 sys_spu: Fix oops in sys_raw_spu_destroy after #7782
'id' is not the idm id, also explicitly join the thread so a situation where the thread is still active and communicating other threads (e.g via MMIO or MFC) yet its ID is removed won't happen. (logic breakage, destroyed thread can't be  active)
2020-03-17 18:22:13 +03:00
Eladash
664d606123 Add return value of sys_ppu_thread_yield 2020-03-17 18:22:13 +03:00
Eladash
00d25a191b lv2: Uncomment sys_ppu_thread_stop/restart 2020-03-17 18:22:13 +03:00
Eladash
3566faabd9 Add missing lv2_obj::sleep when joining interrupt thread 2020-03-16 21:06:33 +03:00
Eladash
7e224c5585 cellVdecClose: Followup fix to #7663
Avoid executing sys_interrupt_thread_disestablish on different ppu thread with the same ID.
2020-03-16 21:06:33 +03:00
Eladash
9e14e835e7 Fix sys_raw_spu_destroy 2020-03-16 21:06:33 +03:00
kd-11
d25ba03e82 vk: Lazy evaluate renderpass scope
- Spamming the driver with renderpass open/close cycles is bad for performance.
2020-03-15 18:39:40 +03:00
kd-11
7025985c0d rsx: Improve section scanning when updating surface cache resources in blit engine. 2020-03-15 16:51:23 +03:00
kd-11
a756c0679e rsx: Implement cross-aspect slice gathering
- Fixes a data leak that can happen when a surface is rejected due to aspect mismatch.
- Mismatch can lead to rejection due to area covered excluding the RTT and inevitable upload a texture from CPU at the same location.
- Overlapping fbo/shader_read resources are not allowed.
2020-03-15 16:51:23 +03:00
Eladash
377e06a4a2 rsx: Fix unknown Blend equation 2020-03-15 09:53:15 +03:00
Nekotekina
45389dca51 PPU: minor fix for ppu_join_status::max
Don't treat it as special "invalid" value.
2020-03-14 20:36:56 +03:00
Eladash
4e6934c9dc Minor idm::remove_verify usage optimization in sys_interrupty.cpp
Avoid copying a shared ptr, create a weak ptr instead.
2020-03-14 19:26:37 +02:00
Eladash
74c05ec5ee PPU Disasm: Fix non-link extended BCCTR forms 2020-03-14 19:26:22 +02:00