Commit graph

577 commits

Author SHA1 Message Date
Herman Semenov
c1fb5d5bca
core,shader_recompiler: added const ref filesystem::path and removed if type size less 16 (#446) 2024-08-16 11:36:05 +03:00
Vladislav Mikhalin
23dddca1f0 last minute fixes 2024-08-16 10:30:48 +03:00
Vladislav Mikhalin
b3ef959b25 Fixed threading, migrated to CVs, added looping 2024-08-15 22:02:04 +03:00
Vladislav Mikhalin
5c4ac98d49 fixing build on linux and mac 2024-08-15 22:00:51 +03:00
Vladislav Mikhalin
0d6e8e227a Fixed some sound and threading issues.
Details:
* Switched SDL audio mutex to RW lock. This fixes games that continiously call SetVolume in a different thread (like Ghostbusters)
* Added contition to buffer audio packets independent of video packets. This fixes choppy audio across many games.
* Increased the number of audio frame buffers from 2 to 4. Just in case.
* Migrated to std::jthread and std::mutex from pthreads.
* Fixed a race condition with joins on avplayer close that caused a crash.
2024-08-15 22:00:51 +03:00
Vladislav Mikhalin
e33ff10212 Added some logs, fixed some crashes, fixed align. 2024-08-15 22:00:51 +03:00
Vladislav Mikhalin
b5c69189e5 avplayer WIP 2024-08-15 22:00:51 +03:00
psucien
d32e584839 libraries: vide_out: redundant assert removed 2024-08-15 17:41:53 +02:00
menaman123
effd813b93
Merge branch 'shadps4-emu:main' into main 2024-08-15 08:40:55 -04:00
¥IGA
8c77d4dde6
Ability to change username (#432) 2024-08-15 12:33:10 +03:00
menaman123
0f37c903ef
Merge branch 'shadps4-emu:main' into main 2024-08-14 18:38:17 -04:00
Dzmitry Dubrova
6f4e1a47b9
core: misc changes (#430)
* core: misc changes

* video_core: add some formats for detiling

* clang format
2024-08-14 20:37:05 +02:00
Stephen Miller
5f963772a0
scePthreadAttrSetstack implementation (#391)
* scePthreadAttrSetstack implementation

Used by Final Fantasy XV

* Address Comments

Verify parameters before calling the pthread_attr_setstack function.
Swap uses of SCE prefix with ORBIS prefix.

* Quick fix

Addresses the newest review and appears to fix issues caused in games by my previous commit.
2024-08-14 18:43:00 +02:00
Daniel R.
6cc4a682fd
core/memory: Fix error on virtual queries of reserved regions 2024-08-14 15:34:17 +02:00
psucien
27cb218584
video_core: CPU flip relay (#415)
* video_core: cpu flip is propagated via gpu thread now

* tentative fix for cpu flips racing

* libraries: videoout: better flip status handling
2024-08-14 11:36:11 +02:00
TheTurtle
d8b9d82ffa
video_core: Various fixes (#423)
* video_core: Various fixes

* clang format
2024-08-13 20:05:10 +03:00
counter185
bb159eafb9
Basic gamepad support through SDL (#407)
* Add basic gamepad support through SDL

* lightbar, vibration, code style changes

* okay fine

* one day clang format will finally pass
2024-08-13 12:54:08 +03:00
TheTurtle
1fb0da9b89
video_core: Crucial buffer cache fixes + proper GPU clears (#414)
* translator: Use templates for stronger type guarantees

* spirv: Define buffer offsets upfront

* Saves a lot of shader instructions

* buffer_cache: Use dynamic vertex input when available

* Fixes issues when games like dark souls rebind vertex buffers with different stride

* externals: Update boost

* spirv: Use runtime array for ssbos

* ssbos can be large and typically their size will vary, especially in generic copy/clear cs shaders

* fs: Lock when doing case insensitive search

* Dark Souls does fs lookups from different threads

* texture_cache: More precise invalidation from compute

* Fixes unrelated render targets being cleared

* texture_cache: Use hashes for protect gpu modified images from reupload

* translator: Treat V_CNDMASK as float

* Sometimes it can have input modifiers. Worst this will cause is some extra calls to uintBitsToFloat and opposite. But most often this is used as float anyway

* translator: Small optimization for V_SAD_U32

* Fix review

* clang format
2024-08-13 09:21:48 +03:00
Lizardy
5eecd089ab
thread_management.cpp: Various Mandatory Threading Fixes | Resolve #398 (#394)
* Handle empty mutex attribute

- scePthreadMutexInit did not return default when the mutex attributes were empty, now it does

* fix conditional unsafety

* Update thread_management.cpp

fix deref

* accurate heap api

- modified HeapAPI to a struct with preset function fields
- utilized the full array parameter passed to _sceKernelRtldSetApplicationHeapAPI

* fallback to std malloc

* clang format

* Declare all HeapAPI replacement functions

- calloc, realloc, memalign, reallocalign, malloc_stats, malloc_stats_fast, malloc_usable_size
- posix_memalign corrected parameters

* resolve suggestions

- `using` definition replacement for AppHeapAPI
- linux uses heap_malloc, windows uses std::malloc

---------

Co-authored-by: microsoftv <6063922+microsoftv@users.noreply.github.com>
2024-08-13 09:08:03 +03:00
Borchev
18f1799280
Add partial unmap support (#322)
* Add partial unmap support

* undo accidental whitespace removal

* Fix assertions

* Adjust Reserve and Free functions for partial unmapping
2024-08-13 09:05:30 +03:00
psucien
3d0fdf11f0
Build stabilization (#413)
* shader_recompiler: fix for float convert and debug asserts

* libraries: kernel: correct return code on invalid semaphore

* amdgpu: additional case for cb extents retrieval heuristic

* removed redundant check in assert

* amdgpu: fix for linear tiling mode detection fin color buffers

* texture_cache: fix for unexpected scheduler flushes by detiler

* renderer_vulkan: missing depth barrier

* texture_cache: missed slices in rt view; + detiler format
2024-08-12 17:23:01 +03:00
psucien
3e2d4d6b79
Gnmdriver: More functions (#410)
* libraries: gnmdriver: added `sceGnmGetGpuCoreClockFrequency`

* libraries: gnmdriver: `sceGnmSetVgtControl` added

* amdgpu: gpuclock64 in write eop packet
2024-08-12 13:29:57 +02:00
georgemoralis
834e3a500e added a fix for audio (seems that some games calls sceAudioOutInit twice) Thanks Roamic for tracing this! 2024-08-11 13:16:50 +03:00
Antonio
d0600dd096 Merge branch 'main' of https://github.com/menaman123/shadPS4 2024-08-09 19:59:36 -04:00
Antonio
4098d57cab Fixed the order of mtypeprotect and mprotect in batchmap2 2024-08-09 19:59:31 -04:00
menaman123
8b9843c1ec
Merge branch 'shadps4-emu:main' into main 2024-08-09 19:43:02 -04:00
georgemoralis
425e5491a8 added setting for change language
(reference to https://github.com/shadps4-emu/shadPS4/wiki/PS4-Modules#supported-languages for values)
2024-08-09 11:58:42 +03:00
Antonio
153362f13e clang-format issues 2024-08-08 21:38:53 -04:00
Antonio
ed2b29524c Took out logs stopping build 2024-08-08 21:24:13 -04:00
Antonio
5da085aa24 '' 2024-08-08 18:46:27 -04:00
Antonio
96d13fa210 '' 2024-08-08 18:07:58 -04:00
Antonio
e1e8927823 '' 2024-08-08 18:03:22 -04:00
Antonio
61c4096ae1 Fixed Mtypeprotect and MProtect 2024-08-08 18:03:09 -04:00
georgemoralis
250b2e4969 small playgo adjustments 2024-08-09 00:02:26 +03:00
georgemoralis
3ef69cae5e some pad fixes (fixing metal slug 3 and risk of rain) 2024-08-09 00:02:25 +03:00
georgemoralis
7b7d1cb26f added missing NIDs in thread management 2024-08-09 00:02:25 +03:00
georgemoralis
816700d34d fixed to scePadGetControllerInformation , (fixes CUSA04892 - power rangers multi user issue) 2024-08-09 00:02:25 +03:00
Stephen Miller
48c58d5ce0
Kernel-Related Fixes (#386)
* Fix OrbisKernelBatchMapEntry struct

UE4 games and GTA V cause the BatchMap offset to overflow on Windows. Changing the type fixes this, and doesn't seem to cause any regressions on Windows or Linux.

* Implement posix_sem_trywait

Grand Theft Auto V needs this.

* Add missing scePthreadAttrGetdetachstate NID

Noticed this missing NID while testing games.
2024-08-08 23:42:51 +03:00
TheTurtle
381ba8c7a5
video_core: Implement guest buffer manager (#373)
* video_core: Introduce buffer cache

* video_core: Use multi level page table for caches

* renderer_vulkan: Remove unused stream buffer

* fix build

* oops forgot optimize off
2024-08-08 15:02:10 +03:00
Antonio
88cbf4128a reverted the previous function 2024-08-06 21:37:31 -04:00
Antonio
fc4c96b8c0 Changed Protect for Windows 2024-08-05 22:31:01 -04:00
TheTurtle
159be2c7f4
video_core: Minor fixes (#366)
* data_share: Fix DS instruction

* vk_graphics_pipeline: Fix unnecessary invalidate

* spirv: Remove subgroup id

* vector_alu: Simplify mbcnt pattern

* shader_recompiler: More instructions

* clang format

* kernel: Fix cond memory leak and reduce spam

* liverpool: Print error on exception

* build fix
2024-08-05 13:45:28 +03:00
Antonio
9ad6317f01 Added Mtyprotect and moved Mprotect to ORBIS_KERNEL_MAP_OP_PROTECT 2024-08-05 03:00:49 -04:00
Antonio
4914809672 Removed MProtect from AddressSpace 2024-08-05 01:27:01 -04:00
Antonio
1a84804100 Changed 4 to ORBIS_KERNEL_MAP_OP_TYPE_PROTECT 2024-08-05 01:20:29 -04:00
Antonio
b967f37312 Fix merge 2024-08-05 01:17:49 -04:00
Antonio
d9da4a9d2b '' 2024-08-05 01:06:40 -04:00
Antonio
c6c679ca0c Fixed ORBIS_KERNEL_MAP_OP_TYPE_PROTECT for batchmap2 2024-08-05 00:41:42 -04:00
georgemoralis
0ac9f8ffa4
Merge pull request #346 from shadps4-emu/savedata_1
SaveData Fixes
2024-07-31 17:34:44 +03:00
Dzmitry Dubrova
0fe766db6c
core: Implement sceRandomGetRandomNumber (#350) 2024-07-31 14:01:22 +03:00