Commit Graph
4136 Commits
Author SHA1 Message Date
kalaposfos13 bf4809fed2 Rewrite kernel event flags (#4772)
* a hopefully not too questionable attempt at rewriting event flags

* remove obsolete error message

* misc fixes
2026-07-31 01:06:13 +03:00
Connor Garey 34e0f83998 Bump derivation version number to 0.17.1 (#4777) 2026-07-30 17:05:13 -05:00
georgemoralis 75073ab24c starting 0.17.1 WIP 2026-07-31 00:30:44 +03:00
georgemoralis 5a4373c80e tagged 0.17.0 release v.0.17.0 2026-07-30 23:48:02 +03:00
Vladislav Mikhalin 57e4da0376 avplayer: lock state shile starting (#4775) 2026-07-30 21:31:20 +03:00
georgemoralis e7eb1da596 Trophy fix (#4774)
* trophies cleanup and fixes

* even more trophy fixes for stephen
2026-07-30 19:40:12 +03:00
Masamune3210 24e68bafde Fix emulator read issues with WinFSP/rclone storage (#4766)
* Fix emulator being unable to read from WinFSP/rclone backed storage

* fix code style error

* add comment explaining code change
2026-07-29 18:38:53 +03:00
Arthur Cuesta cc728e1c7c input: reduce pad state latency for single-sample reads (#4508)
* input: reduce pad state latency for single-sample reads

* Restore original disconnected pad handling

* input: restore axis smoothing default in FinalizeUpdate

Explicitly passing false to GameController::Axis() unconditionally
disabled smoothing for all input sources. Controller hardware is
unaffected (the <16-unit guard in UpdateAxisSmoothing already skips
interpolation for fine-grained inputs), but KBM users rely on it for
smooth analog motion (e.g. Bloodborne). Revert to the default smooth=true.

* input: correct controller state copyright year
2026-07-29 10:31:19 +03:00
Marcin Mikołajczyk 9894036b3f Implement a fragment shader emulating clip distance on NVIDIA (#4511)
* Implement a fragment shader emulating clip distance on NVIDIA

* Rework clip distance emulation after review
2026-07-28 22:46:40 +03:00
georgemoralis b45b289761 Abstract FS (#4749)
* abstract fs part1

* ops ifile :P

* added backedn to fs/file_system

* memory handling for non hosted backends

* remove ZArchive

* total remove

* make linux happy

* refactor loader to support backends

* AVIO streamer for ffmpeg

* Improved IterateDirectory so it can getdents in zarchieve works

* support for fstat in zachieve

* fixed module loading

* fs : added ReadFile

* improve file reading

* fixed trophy extraction , npbind,playgo

* argg

* fixed headers

* zarchive improvements for concurrent access

* playgo fix

* system service fix

* fixed restart from zar

* fixed save data icon read from zarchive

* fonts fix

* some stephen's comments fixups

* improved

* fixed rest of stephen's comments

* even more stephen review fixes

* possible linux fix

* fixed stephen's issue with multi games

* added thread worker to zarchive to solve some race conditions videos should be working fine now

* fixed paths for updates,mods

* fixes for updates , splash screen , icon

* fixed case sentitive issues in linux?
2026-07-28 20:05:58 +03:00
Arthur Cuesta 4f89152f93 video_core: Respect depth write state for register clears (#4767) 2026-07-28 16:52:47 +03:00
Vladislav Mikhalin dc5a33d6f1 avplayer: improve sync between audio and video (#4761) 2026-07-26 22:13:24 +03:00
Stephen Miller d976c33ca8 Use pthread* instead of std::mutex in PthreadOnce (#4758)
* Use pthread* instead of std::mutex in PthreacOnce

mutex goes unused, so this is all that needs fixing for this to be accurate. pthread_once struct is something guest applications can use, so it's relatively valuable to have it done correctly.

* Some days I wonder how absent-minded I can be

oops
2026-07-25 15:14:39 -07:00
Kravickas 0afb317afe video_core: Implement T# min_lod (VK_EXT_image_view_min_lod) (#4756)
* Implement min_lod support in image view creation

* Add min_lod member to ImageViewInfo struct

* Add ImageViewMinLod feature support

* Add support check for minLod feature

* log

* Update FindView to use modified lookup_info

* cleanup

* Adress comments

more cleanup
2026-07-25 14:49:48 -07:00
Niram7777 4dc3cf83e4 Log option for flushing (#4755) 2026-07-25 15:19:59 +03:00
Vladislav Mikhalin 1ce5c2b5e6 avplayer: fixes to stack usage (#4754) 2026-07-25 08:59:23 +03:00
squidbus d392abed77 externals: Update mesa-kosmickrisp to latest (#4606) 2026-07-24 22:03:02 +03:00
Stephen Miller 38272a44b2 Miscellaneous renderer fixes (#4751)
* Change buffer sharp struct

Hardware testing confirms that the last 4 bits of base_address (which would be outside the GPU address space) are ignored.

* Do not bind buffers with an address of 0

We check for this in most places, but apparently not here.

* Log fault addresses in SrtWalkerSignalHandler

* Bump SRT walker patch to warning

Whenever this hack triggers, there's usually more trouble. Not sure why it's a debug, but it should at least be a warning to alert developers.

* Revert BufferCache::ObtainBuffer "optimization"

Was a change done for performance in BB, but it broke UE games.
2026-07-24 20:34:22 +03:00
Valdis Bogdānsandw1naenator 26f4270174 R&C menu Wait: Unreachable code fix (Syncronization race) (#4045)
* kernel: Enhance condition variable wait and signal handling with improved timeout logic and error checks

* kernel: Enhance logging in condition variable and mutex handling for better debugging

* Add vectored exception handler stack support for Windows

* I love you, CLang!

* Fix the resource release order in Pools::ReleaseContents.
This file was accidentally omitted from the previous commit.

* Implement exception stack management for Windows threads

* Fix stale pthread condvar wakes across platforms

* kernel: align pthread synchronization with libkernel

Updated:
- Replace generation-based condvar wakes with PS4-style FIFO and deferred wake behavior.
- Rework semaphore waits, posts, cancellation, and timeout races.
- Harden mutex ownership and Windows VEH stack lifecycle.

Added:
- pthread cancellation, cancel-type, testcancel, and timed-join exports.
- Native cross-thread cancellation delivery on Windows, Linux, and macOS.
- Relative timed semaphore waits.

* kernel: isolate synchronization race fixes

Remove unrelated VEH stack and shader changes, keeping this branch focused on pthread synchronization and cancellation behavior.

* some updates.

---------

Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
2026-07-24 09:33:15 +03:00
Stephen Miller 8161049f22 Lock priority pending ops mutex in PopPendingOperations (#4748)
Thanks to recent changes to readbackLinearImages, we get a lot more of these pending ops, and a lot more of these PopPendingOperations calls. This exposed a race condition where calls to PopPendingOperations would run simultaneously with our PriorityPendingOpsRunner threads, and potentially call a callback while a runner pops it off the pending ops queue.
2026-07-23 23:09:39 +03:00
Stephen Miller aca3c63634 Kernel.Fs: Use intermediate buffer for storing file read data before copying to host memory (#4742)
* Read files into a host buffer, then copy to guest.

For some reason this might fix the fread errors we see?

* Reduce unnecessary logging

* Assert on failed malloc

No reason not to do this.

* Use a static vector instead of allocating each read

* Make file_buf thread local

Shouldn't matter, but prevents any possible concurrency issues (though ReadFile was always called under a lock anyway)

* Assert on failure instead of logging an error

Also adds checks to other unchecked reads and writes

* Flush on all writes

Might as well do this while I'm here.
2026-07-23 21:00:11 +02:00
Vladislav Mikhalin 0f9b689058 avplayer: fixes to streams and frame buffers (#4747) 2026-07-23 21:17:13 +03:00
Xupie 3730a53a53 Audio3d: Refactor mix queue logic for advance and flush (#4745)
* move mixing into own method
log errors in ConvertAndEnqueue

* mutex
2026-07-23 12:12:03 +03:00
Vladislav Mikhalin b124e438c4 avplayer: fixes for frame dimensions (#4741)
* avplayer: align frame sizes to 16

* align pitch to 64, calc num audio buffers

* green line rebranding into black line

* extend data to the bottom of the video, sync vdec impl

* fixed build
2026-07-23 11:34:10 +03:00
Stephen Miller dee3a0437d Use IsValidMapping instead of IsValidGpuMapping (#4746)
Was hoping to get away with lower overhead, but we need to have a lower-bounded check too, or Windows with it's somewhat sparse address space will have issues with host mappings going through CopySparseMemory and asserting.

Intentionally not checking size, as the more robust mapping check would be a huge performance loss for a hot code path like this.
2026-07-22 18:14:29 -07:00
Stephen Miller cca6405c3e Use CopySparseMemory for StreamBuffer::Copy on guest addresses (#4744) 2026-07-22 16:25:21 -07:00
Stephen Miller 9f31e643f5 Queue small tiled images for download (#4743)
* Helps with rendering in some UE4 titles, provided you enable readbackLinearImages

* Clang
2026-07-22 16:12:14 -07:00
Arthur Cuesta 5c4b998f40 [Frontend] Polish fullscreen startup behavior (#4539)
Create the window directly in fullscreen when configured, so there is
no visible windowed -> fullscreen transition for the compositor to
animate. Refresh the cached window size after SDL_SyncWindow so the
first swapchain and the splashscreen use the real drawable size, handle
enter/leave fullscreen events like resizes, and fix a dead error check
on the unsigned display id.
2026-07-21 19:13:04 +03:00
MathieuARS 06d4872c55 shader_recompiler: propagate V_ADD_I32 carry-out (#4736) 2026-07-21 16:20:23 +03:00
MathieuARS 4c72de0732 core: initialize NGS2 rack query output (#4735) 2026-07-20 20:49:49 +03:00
Stephen Miller 4757939142 texture_cache: Fix MipOf and SliceOf checks (#4734) 2026-07-19 21:46:08 -07:00
georgemoralis 4c0d869adc Invitation Dialog Fix (#4732)
* fixed accept invitation dialog possible freeze

* Added cancel button if list is empty
2026-07-19 22:14:34 +03:00
squidbus a9e825ed3f ajm: Prevent AT9 data overread crashes (#4733) 2026-07-19 02:45:26 -07:00
kalaposfos13 bfb0122bbe Populate image buffer sizes in sceCameraGetFrameData (#4730) 2026-07-18 00:00:56 -07:00
Kravickas 4c916f7850 shader_recompiler: Always specialize vertex attributes on number class (#4724)
* remove support_legacy_vertex_attributes

* Cleanup legacy_vertex_attributes

* full cleanup legacy_vertex_attributes
2026-07-17 22:23:30 -07:00
Stephen Miller 0da2a58b84 Remove image ids from download_images on TextureCache::DeleteImage calls (#4719)
Also adds synchronization since erasing images will invalidate iterators (and trying to emplace mid-downloads could result in image downloads getting skipped)
2026-07-17 17:25:50 +03:00
junminlee2004 bfc1a588c2 shader_recompiler: Initialize GS vertex offsets from the input primitive type (#4717) 2026-07-16 11:25:26 +03:00
Stephen Miller 25287fb00b fix (#4716) 2026-07-15 20:23:26 +02:00
kalaposfos13 2c9caf6bfb Don't load HLE libraries if they're force-LLEd (#4710)
* Don't load HLE libraries if they're force-LLEd

* remove nonexistent posix lib

* libScePlayGoDialog

* uljobmgr.sprx

* libSceGnmDriverForNeoMode

* this is way too much effort for something that likely won't be relevant by the time LLE gnmdriver starts being feasible

* we format clang here, sir
2026-07-14 13:57:38 -05:00
Stephen Miller c07e757ddb Lib.Kernel: Check to ensure heap_api is valid before running heap mallocs in TlsGetAddr (#4709)
* Check to ensure heap_api is valid before running heap mallocs in TlsGetAddr

* Obligatory clang commit

* Linux
2026-07-14 19:21:38 +03:00
6d37f61a4d Fix shader cache invalidation caused by struct padding memcmp(Fixes #4645) (#4704)
* Fix shader cache invalidation caused by struct padding memcmp

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Harshalj2108 <harshalj.2608@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-14 09:57:46 +03:00
georgemoralis 16b708df85 Openal Fixes (#4686)
* spatial openal support

* sceAudio3dAudioOutOutput is now non-blocking.

* objects now play on their own OpenAL sources

* objects are now actually spatialized, POSITION and SPREAD

* Fixed ConvertS16Std8CH remap

* enable HRTF if available

* Added OrbisAudio3dPassthrough support

* LATE_REVERB_LEVEL through EFX reverb

* reduced logging spam

* added direct soft channels

* tried to fix low sound

* resampling

* more try to fix low q

* improved sound volume control

* improved bed multisampling

* some corrections based on RE

* added output mode to select openal configuration

* accurate downmix

* fixed sdl

* added native surround bed

* implemented speaker arrays,async no-block and spread radius

* fixup

* oh com on

* cleanup
2026-07-14 09:35:18 +03:00
junminlee2004 1f407a41bd shader_recompiler: GCN thread mask accuracy fix (GR2 Grass Fix) (#4675)
* shader_recompiler: Preserve per-lane view of thread masks spilled via v_writelane/v_readlane

* shader_recompiler: Mask V_CMPX EXEC and VCC/SDST writes by prior EXEC

* translate: Collapse the duplicated bodies through the helper

* shader_recompiler: Split mask-lane variable key into VectorReg + lane operands

* Add files via upload

* Update with concise comments

* add asserts in read/writelane inside the if(immediate) that its < 64

* shader_recompiler: Restrict mask-lane shadow to the low half of thread masks
2026-07-14 08:50:11 +03:00
Stephen Miller fe9d12e08f Add SDK check for vdec2 usage (#4707)
With firmware 5.50, the vdec1 decoder (software type) was disabled, and the default changed to the vdec2 decoder (software2 type).
2026-07-14 08:20:34 +03:00
NotAnEnergyDrinkAddict e9f15c36a7 Move asm to unit file (#4706)
`__attribute__((used))` is needed to prevent lto from vanishing `_sceFiberForceQuit` symbol into orbit
2026-07-13 23:59:31 +03:00
squidbus 3d03375a5b video_core: Require robustness2 and remove null buffer/image workarounds (#4701) 2026-07-13 23:23:49 +03:00
squidbus 373cbb3745 texture_cache: Add sampler garbage collection (#4700) 2026-07-13 21:42:40 +03:00
Harshal JoshiandHarshalj2108 ec33490460 Fix logic inversion in save data mount null checks (#4703)
Co-authored-by: Harshalj2108 <harshalj.2608@gmail.com>
2026-07-13 21:29:16 +03:00
Harshal JoshiandHarshalj2108 d2a7f7e288 fix: null dereference in internal__Foprep on file exhaustion (#4702)
Co-authored-by: Harshalj2108 <harshalj.2608@gmail.com>
2026-07-13 14:40:46 +03:00
4e909d3b8e Core: code patches for cmp and xor instructions involving the TCB (#4624)
* handle cmp instructions involving fs:[0]

These are seen in PeacockTV.

* Refactor TCB access code into a new function

Since there's a third operation I need to do this for, split the actual getting TCB values into a separate static function, then call that whenever we need to generate a tcb access.

* handle xor instructions involving fs:[0]

Needed for updated versions of Roblox. Also refactored the array a bit by introducing a static bool so we don't need to repeat the same ifdef mess for every operation that needs this.

* Oops

* Oops2

* Set scratch reg to rbx if rax is in use.

* Update src/core/cpu_patches.cpp

Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com>

* Update src/core/cpu_patches.cpp

Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com>

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com>
2026-07-13 14:24:37 +03:00