Commit graph

1389 commits

Author SHA1 Message Date
jnack fd5b2735b1 add V_CMPX_LE_I32 (#1056) 2024-09-24 18:22:31 +03:00
Paris Oplopoios a7672f660e Fixup designator order (#1039) 2024-09-24 17:18:35 +03:00
Paris Oplopoios 90c04d8447 Patch insertq (#635)
* Patch `insertq`

* Don't clobber flags, fix asserts a bit

* Format code

* Fixup some edge cases

* A couple nits

* Remove extraneous space
2024-09-24 17:03:32 +03:00
baggins183 51e919fe01 fix lane inst decoding (#1051) 2024-09-24 12:29:57 +03:00
Vinicius Rangel 840915b1be Save data: fix nullptr & concurrent file write (#1049)
* Save data: fix nullptr & concurrency file write

* Save data memory: fix overriding icon
2024-09-24 06:50:18 +03:00
squidbus 71f683fd03 core: Add wrapper for calling into guest code. (#967) 2024-09-23 20:30:16 +03:00
Daniel R. e931c203f8 core/memory: Fix sceKernelMTypeProtect setting VMA type (#1037)
* I hate programming and will furiously smash my monitor if I ever see another oversight of this caliber ever again in my goddamn life

* Merge both protect functions together
2024-09-23 18:49:57 +02:00
Paris Oplopoios a425f7a63e Patch extrq (#943)
* Use a singleton for instruction decoding

* Use singleton class

* Patch `EXTRQ`

* Fixup signal context functions

* Update CMakeLists.txt

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-09-23 19:19:52 +03:00
Vinicius Rangel 843d5d388e Frame graph + Precise 60 fps timing (#998)
* video info: add frame graph

Toggle advanced info with CTRL+F10.
Also fixed imgui using gamepad for nav in wrong situations

* 60fps!

Implemented a timer that accumulates the time spent sleeping and sleeps for the remaining time.
Also measure entire PresentThread time instead of just the time spent in Flip.

* sceKernelGettimeofday: replace chrono by win32 api. Better performance

bb uses this function too much. Consuming almost 30% of cpu time
2024-09-23 18:43:51 +03:00
georgemoralis 6311406ba6 starting 0.3.1 WIP 2024-09-23 18:42:11 +03:00
georgemoralis 53f8b4cfaa added 0.3.0 version 2024-09-23 18:17:50 +03:00
TheTurtle 93abdab5b3 video_core: Separate dirty flags and better gpu invalidation (#1034) 2024-09-23 18:03:42 +03:00
Vinicius Rangel 9f0d78aae4 Save fixes (#1031)
* Add ElfInfo to track current game info in a singleton

* SaveData compatibility with old firmwares

* sceKernelOpen: fix for write-only mode

* imgui: add font to render non-ascii characters

* save_data: fix Backup Job including old backup in the new backup

* Save backup: fix to avoid filling the queue

 Also limiting 1 backup / 10sec

* Save backup: fix search not handling empty pattern

*backup time improv
2024-09-23 14:50:49 +03:00
squidbus 470895c170 shader_recompiler: Increase push constants user data to full capacity. (#1032) 2024-09-23 13:40:33 +03:00
TheTurtle 2b8e9d57af shader_recompiler: Additional scope handling and user data as push constants (#1013)
* shader_recompiler: Use push constants for user data regs

* shader: Add some GR2 instructions

* shader: Add some instructions

* shader: Add instructions for knack

* touchups

* spirv: Better names

* buffer_cache: Ignore non gpu modified images

* clang format

* Add log

* more fixes
2024-09-23 08:55:43 +02:00
psucien 0dd5fbd020 hot-fix: unnecessary optimization removed 2024-09-22 19:56:07 +02:00
IndecisiveTurtle 50968c8b0c hotfix: Fix mipmap query for images 2024-09-22 19:17:54 +03:00
squidbus 1a82b1d132 core: Reduce some library log spam. (#1023) 2024-09-22 14:13:58 +02:00
squidbus 564b4d3267 vulkan: Use closest available equivalent to missing clamp modes. (#1007) 2024-09-22 15:07:05 +03:00
squidbus f0ab14acb8 shader_recompiler: Exclude non-float results from output modifiers. (#1016) 2024-09-22 15:03:17 +03:00
korenkonder 734a0a896d Add V_CVT_PK_U8_F32 opcode (#1022) 2024-09-22 15:02:34 +03:00
korenkonder 126b2c30bd Optimise out unnecessary shifts (#1021) 2024-09-22 15:02:20 +03:00
Vinicius Rangel a73b5c3e02 SaveLib PR related fixes (#1011)
* Safety checks in all SFO readings

* SaveData: log backup error and continue & fix possible concurrent file editing

* SaveData: Fix issue with old firmwares
2024-09-22 08:16:06 +03:00
TheTurtle d11415ca53 hotfix: Revert ADDC change 2024-09-22 01:53:10 +03:00
squidbus 7185dd8943 shader_recompiler: Use SetDst in more instructions. (#1015) 2024-09-22 01:41:19 +03:00
psucien 3939bc4f10 Image subresources barriers (#904)
* video_core: texture: image subresources state tracking

* shader_recompiler: use one binding if the same image is read and written

* video_core: added rebinding of changed textures after overlap resolve

* don't use pointers; slight `FindTexture` refactoring

* video_core: buffer_cache: don't copy over the image size

* redundant barriers removed; fixes

* regression fixes

* texture_cache: 3d texture layers count fixup

* shader_recompiler: support for partially bound cubemaps

* added support for cubemap arrays

* don't bind unused color buffers

* fixed depth promotion to do not use stencil

* doors

* bonfire lit

* cubemap array index calculation

* final touches
2024-09-21 21:45:56 +02:00
squidbus 4fc28b39af resource_tracking_pass: Allow derivatives for 2D array images. (#1000) 2024-09-21 14:19:01 +02:00
squidbus 9123dc4228 save_data: Fix save data list back button. (#1003)
* save_data: Fix save data list back button.

* common: Add more null checks in CString.

Co-authored-by: Vinicius Rangel <me@viniciusrangel.dev>

---------

Co-authored-by: Vinicius Rangel <me@viniciusrangel.dev>
2024-09-21 10:21:53 +03:00
squidbus 32df2b8e43 vulkan: Add alternatives when nullDescriptor is not supported. (#1001)
* vulkan: Add alternatives when nullDescriptor is not supported.

* vulkan: Set identifying name on null image/image view/buffer
2024-09-21 03:50:57 +03:00
squidbus 1e9199fd94 vulkan: Upgrade format queries to use format feature flags 2. (#941) 2024-09-21 00:05:16 +03:00
Daniel R. 5e5d2cc008 libraries/kernel: add sceKernelMmap to HLE 2024-09-20 17:53:18 +02:00
Vinicius Rangel d2d51373b5 Rewrite Save Data & Impl Save Data Dialog (#824)
* core: Rewrite PSF parser & add encoder

add .sfo hex pattern to /scripts

* core/fs: allow to mount path as read-only

* common: Add CString wrapper to handle native null-terminated strings

* SaveData: rewrite to implement full functionality

* mock value for SYSTEM_VER

* SavaData: backup features

* SavaData: SaveDataMemory features

* imgui Ref-counted textures

- has a background thread to decode textures

* imgui: rework gamepad navigation

* PSF: fixed psf not using enum class for PSFEntryFmt (was a standard old ugly enum)

- Add null check to CString when itself is used in a nullable field

* SaveDataDialog implementation

- Fix Mounting/Unmounting check of SaveInstance
2024-09-20 12:34:19 +03:00
ElBread3 24a91d7daf QOL: Set Log Filter On Save (#991)
* set log filter on reset

* clang format
2024-09-20 12:07:45 +03:00
¥IGA 0f3a4aa40b Set High Priority for Windows (#961) 2024-09-20 07:54:30 +03:00
squidbus 770cbf14e9 videoout: Make present thread realtime on macOS. (#990) 2024-09-20 01:28:35 +03:00
korenkonder 03ba49a3e0 video_core: stride fix (#986)
I don't know why it was forced to be 1 while in reality it should be as is
2024-09-19 21:43:03 +02:00
psucien e71f5c6f93 core: file_sys: fix for racing in fs mount 2024-09-19 21:42:19 +02:00
korenkonder 6b52ee0644 Sort opcodes by their indices. Group them too when applicable (#945) 2024-09-19 20:29:56 +02:00
Daniel R. 63409fb26d core: name avplayer threads 2024-09-19 20:19:29 +02:00
georgemoralis 185667a44d MiscFixes11 (#984)
* fixed an issue in sceSaveDataSetSaveDataMemory , makes chariot CUSA00739 goes ingame

* added branch name into sdl window title
2024-09-19 18:46:07 +03:00
georgemoralis e9add1669a hotfix2 : fix previous fix 2024-09-19 12:34:45 +03:00
georgemoralis d8de458b73 hot fix : always check if eboot.bin is available in path 2024-09-19 12:17:05 +03:00
TheCamrew dbb89b9d86 Improve es_ES translation & fix typos (#974)
Replaced Latin American Spanish terms with equivalent Spain-specific vocabulary.

Adjusted grammatical structures to reflect common usage in Spain.
2024-09-19 07:16:05 +03:00
adjonesey a5c15e643e Fix Regression #932 (#973) 2024-09-19 07:15:42 +03:00
psucien c4ff866e34 libraries: gnmdriver: sceGnmResetVgtControl added (#965) 2024-09-17 22:10:50 +02:00
Raven 2a9b353f8b Add other 64-bit floating point shader instructions (#944) 2024-09-17 18:01:33 +02:00
psucien 6152fe8419 hot-fix: make profiler to show real frame time 2024-09-17 09:45:10 +02:00
squidbus d79d9c280f cpu_patches: Revert to ahead-of-time patching on Linux for now. (#949) 2024-09-17 00:53:41 +03:00
squidbus 8f2c971d9a signals: Fix compilation on GCC. (#934) 2024-09-16 12:54:47 +03:00
Vladislav Mikhalin c02649d2ac Do not wait for audio packets without audio stream (#939) 2024-09-16 12:54:20 +03:00
Daniel R. 4006fcb7d9 shader_recompiler: Implement basic 64-bit floating point support (#915)
* shader_recompiler: Implement basic 64-bit floating point support

* Fix formatting
2024-09-15 22:53:08 +02:00
squidbus a441244365 cpu_patches: Patch just-in-time using signal handlers. (#852)
* cpu_patches: Patch just-in-time using illegal instruction handler.

* core: Add common signal dispatch system and use for on-demand TCB patches.

* page_manager: Re-add userfaultfd implementation.
2024-09-15 23:48:34 +03:00
TheTurtle a56b7f2a24 graphics_pipeline: Move some depth configuration to dynamic state (#931)
* graphics_pipeline: More proper masking

* pipeline_cache: Skip setting depth/stencil fields when test is disabled

* pipeline_cache: More fixes to depth stencil state

* vk_rasterizer: Use dynamic state for depth bounds and bias

* pipeline_cache: Missed depth bias enable

* vk_rasterizer: Add stencil dynamic states

* thread: Reduce spammy log

* Remove some leftover state

* pipeline_cache: Allocate pipelines from pools

* vk_graphics_pipeline: Remove bindings member

Saves about 1KB from each pipeline
2024-09-15 22:42:14 +02:00
TheTurtle 18a7f074c6 semaphore: Fix semaphore wait list leaking (#928)
Co-authored-by: Daniel R. <47796739+polybiusproxy@users.noreply.github.com>
2024-09-15 19:08:37 +03:00
psucien afe65d55fa Merge pull request #918 from raven02/patch-5
Add PM4 opcodes
2024-09-14 20:24:41 +02:00
Raven 102a246ec3 Add DS_READ2ST64_B32 (#916)
* Add DS_READ2ST64_B32

* Fix CLANG

* Fix CI again

* Parameter update for DS_READ
2024-09-14 21:16:12 +03:00
Raven 1159050dfd Add PM4 opcodes 2024-09-15 01:46:39 +08:00
Daniel R. a73d3ce78c core/libraries/save_data: Fix inaccurate behaviour on sceSaveDataSetupSaveDataMemory (#913) 2024-09-14 19:00:22 +02:00
Raven bf4c7d421e Add S_XOR_B32 opcode (#911)
* Add S_XOR_B32

* Stub S_OR_B32
2024-09-14 18:52:30 +03:00
Raven 4857c39e25 Map BUFFER_AUTOMIC SMIN/SAMX/AND/OR/XOR/INC/DEC (#910) 2024-09-14 18:52:20 +03:00
squidbus 13d819bc6b vulkan: Disable exceptions for getImageFormatProperties and account for errors. (#906) 2024-09-14 17:12:08 +03:00
nnn27 15b2236b0f Fix initialization of change_layers (#907) 2024-09-14 15:07:34 +02:00
Emulator-Team-2 1caf32a336 Implement IMAGE_SAMPLE_L_O opcode (#899) 2024-09-13 19:20:35 +02:00
Luke Warner 1852243d36 Implement S_ABSDIFF_I32 shader instruction (#902) 2024-09-13 19:02:17 +02:00
CrazyBloo 884d25fc66 Enable patches on cli builds (#897)
* patch support for cli

* fix mac build

* format
2024-09-13 07:44:20 +03:00
Adam Jones ada64d8459 Fix Regression 895 2024-09-13 02:23:55 +01:00
TheTurtle fdb0bc212a hotfix: Restore unreachable 2024-09-12 23:46:29 +03:00
illusion0001 604c8e31d0 Silence unhandled case warns (#823) 2024-09-12 23:01:13 +03:00
squidbus 174c676143 shader_recompiler: Add buffer offset calculation when swizzle is enabled. (#834) 2024-09-12 22:59:52 +03:00
squidbus 23d5dd08f6 vulkan: Limit multisampling to supported sample counts. (#828) 2024-09-12 22:59:23 +03:00
baggins183 2859a13e5b Fix copyGpuBuffers when resize invalidates commands in flight (#876)
* Fix copyGpuBuffers when resize invalidates commands in flight

* Use _MB macro for size constant
2024-09-12 21:54:54 +02:00
Vladislav Mikhalin c4af6a8109 Fixed the return value of sceAvPlayerIsActive 2024-09-12 10:16:03 +03:00
CrazyBloo e0ff95f426 implement more nptrophy functions (#874)
* fix review's from last pr

* save timestamp when trophies are unlocked

* implement GetTrophyInfo()

* use strncpy instead of strcpy_s, should fix actions

* nptrophy: GetGameInfo(), GetGroupInfo()

* various fixes

* format
2024-09-12 06:49:04 +03:00
psucien 79f45d153c hot-fix: mark null image as tracked by default to avoid its updates 2024-09-11 22:39:21 +02:00
squidbus 64d989e775 shader_recompiler: Use correct integer type for OpImageWrite. (#871) 2024-09-11 23:04:02 +03:00
georgemoralis d29d5748fe Misc Fixes 10 (#781)
* libSceRazorCpu needed for gravity rush

* libSceCesCs needed for blue reflection

* clang format fix

* set scePadSetVibration to log debug

* initial sceNetCtl module implementation

* improved error codes in file system

* some intial work on netctl callbacks (helps a bit CUSA10135)

* misc

* improved callbacks handling in sceNetCtl

* small fixes

* added libSceRudp.sprx to lle modules

* draft work for npcallbacks
2024-09-11 16:48:16 +03:00
Pipi86 eb2915f295 Typo fix (#820)
* Update pm4_cmds.h

* Update pm4_cmds.h
2024-09-11 13:40:19 +03:00
georgemoralis 1dba92616e Revert "sceNetAccept sleep and SDLAudio::AudioOutOutput latency and cpu improvements (#507)"
This reverts commit d66d129357.
2024-09-11 12:56:41 +03:00
georgemoralis 9d9249d72b Revert "Add UI to configure keyboard-to-controller mapping (#308)"
This reverts commit fdb13a3b90.
2024-09-11 12:56:27 +03:00
squidbus f980e789e4 vulkan: Skip draw when primitive type is None. (#867) 2024-09-11 08:58:20 +03:00
kh0nsu 7fb079e3d8 sceNetAccept sleep and SDLAudio::AudioOutOutput latency and cpu improvements (#507)
* Add 5-second sleep on sceNetAccept as this can be called in an infinite loop and would normally block (this isn't ideal for non-blocking sockets but it's all stubs at the moment anyway)

* SDLAudio::AudioOutOutput: protect against invalid handle, support NULL input (wait only), replace fixed 65536 with an amount based on settable latency target (20ms for now)

* Fix whitespace

---------

Co-authored-by: j <j@local>
2024-09-11 08:57:05 +03:00
Vasyl_Baran d03e9fc63d Add UI to configure keyboard-to-controller mapping (#308)
* Add UI to configure keyboard-to-controller mapping

* Add an optional "---fix" argument to format-checking script

* clang fix

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-09-11 08:51:18 +03:00
CrazyBloo 5b26dc8e36 support for unlocking trophies (#854)
* add pugixml

* trophy_viewer: support for trophy unlocking

* nptrophy: UnlockTrophy(), DestroyContext()

* initial imgui popup

* queue to handle multiple trophies at once

* extract trophy info on game start + various fixes

* platinum trophy support + extract trophy data on startup

* format

* nptrophy: GetTrophyUnlockState

* implement vinicius' reviews
2024-09-11 06:50:55 +03:00
georgemoralis fa8e81df96 Merge pull request #858 from DanielSvoboda/main
use github api to download patches
2024-09-10 22:05:23 +03:00
TheTurtle af7e826dee video_core: Add fallback path for pipelines with more than 32 bindings (#837)
* video_core: Small fixes

* renderer_vulkan: Add fallback path for pipelines with more than 32 bindings

* vk_resource_pool: Rewrite desc heap

* work
2024-09-10 20:54:39 +03:00
DanielSvoboda e85f43102c use github api to download patches
removing this workaround makes the code cleaner
2024-09-10 11:30:35 -03:00
georgemoralis 96bf77e680 Merge pull request #851 from shadps4-emu/stabilization/barriers
Various barrier fixes
2024-09-10 06:45:15 +03:00
adjonesey 84c88d0996 Fix deadlocks by enabling reuse of exited threads (#855)
Simplify loop

const correctness

Simplify setting is_free

Co-authored-by: Adam Jones <a.c.jones@outlook.com>
2024-09-09 23:13:28 +03:00
Yussur Mustafa Oraji b43e65b62a Fix compilation on linux (#846) 2024-09-09 22:53:49 +03:00
Lizardy 0300cac3ff [libSceAudio3d] Initialize Audio3d Library (#761)
* init libSceAudio3d

* complete header and func params

* clang

* rm incl

* incl stddef

* revert module num

* print params

* correct logs

* clang

---------

Co-authored-by: microsoftv <6063922+microsoftv@users.noreply.github.com>
2024-09-09 22:51:15 +03:00
Andrew Middendorp 73dff547a7 Added S_ANDN2_B32 and S_NAND_B32 opcodes (#833)
* Added S_ANDN2_B32 and S_NAND_B32 opcodes

* Update src/shader_recompiler/frontend/translate/scalar_alu.cpp

Co-authored-by: baggins183 <baggins31084@proton.me>

* Fix result and src1

Co-authored-by: baggins183 <baggins31084@proton.me>

* update result

Co-authored-by: baggins183 <baggins31084@proton.me>

* Update src1

Co-authored-by: baggins183 <baggins31084@proton.me>

---------

Co-authored-by: baggins183 <baggins31084@proton.me>
2024-09-09 22:46:57 +03:00
squidbus 52175b2efa Initial support for compiling on ARM64. (#788) 2024-09-09 13:23:16 +03:00
psucien 491c5afd45 hot-fix: nullGpu functionality restored 2024-09-09 08:59:47 +02:00
Vinicius Rangel 8533e1386b imgui: fix End call when window is collapsed (#850) 2024-09-09 07:00:19 +03:00
psucien 87c65140ae presentation barriers fixed 2024-09-09 00:10:33 +02:00
psucien cf2a3203fb fix for image view storage flag handling 2024-09-09 00:09:38 +02:00
TheTurtle 37044f78a4 kernel: Delete cond attr
May solve memory leaks in games that create/destroy these often
2024-09-09 00:48:00 +03:00
Zack McKevitt 8d46ba513a Redefined ffmpeg's av_err2str macro to be c++ friendly (#815)
* Fixed compiler error for av_err2string by redefining in c++ friendly way

* removed link from comment, putting in PR

* fixed formatting

* Minor fix: enable qt gui to find PKG files with lowercase extension .pkg

* Added missing dependencies and instructions for enabling QT for linux builds
2024-09-09 00:30:18 +03:00
¥IGA eea19d800c Improved Dark theme, search bar and icon theme (#830)
* Improved Dark theme, search bar and icon theme

* Update FR translation
2024-09-08 23:39:48 +03:00
Vinicius Rangel 7fde5d8f07 Message Dialog library (#767)
* system/MsgDialog: types & basic text display

* system/MsgDialog: User message dialog

* system/MsgDialog: RAII for MsgDialog ui

* system/MsgDialog: Progress bar dialog

* system/MsgDialog: System message texts

* system/MsgDialog: copy all ui state to local memory

handles when game release memory before close
extracted all UI code to it's own file
use single window instead of creating new one every single dialogOpen

* system/MsgDialog: debug logging
2024-09-08 23:27:50 +03:00