* p2p crypto schema
* adding p2p keyring
* p2p framing and testing
* fixups
* test fix
* missing definations
* implementation of host functions
* tcp/transport of p2p packets
* improvements in binding
* guest_net ,improvements and test cases
* all mighty clang
* fixing macOS tests failures
* misc
* net_rewrite : net_errors , types and translation schemas
* updated fixed chunks transfer on windows
* bye bye old net
* small updates for the new net
* settings and tests
* net lib first draft
* allow more than 1 P2P instances on from same pc
* improved shadnet replies
* possible fix for jojo
* cleanup
* move net files to libaries/net
* fixed macOS tests
* mighty clang
* fixed cmakelists
* don't cosume inviation event on client (test code)
* fix macOS tests
* Large multi-file rework for Signaling and Matching2 network handling / optimization. Consolidates Matching2-signaling and signaling to one process (signaling_handler)
General cleanup and consolidation of matching2 context management > nphandler
Removal of a lot
SIgnaling overall structure cleanup.
Matching2: added get and set roommemberdatainternal and the proper type / shadnet call / request / reply.
Consolidated signaling/matching2 typedefs to np_types2
Utilized Codex as a reviewer and for general cleanup.
* all mighty clang
* fixed member attributes
* fixed MAPPED address for matching signaling
* Fixed sceNpMatching2SignalingGetLocalNetInfo
* fixups on net core/library based on fw
* improved errno
* spilt p2p to net_p2p
* some cleanups
* fix for localinfo
* clang
* fix up
* cleanups
* cleanups
* added KernelFstat
* fixed fstat
* one more fix for fstat...
* cleanup old deprecated code
* cleanup
* General logging cleanup across NP changes. Thanks Stephen!
* cleanup based on stephen's suggestions
* fixup
* fixing tests
* blah
* fixup
* improve memory pools
* cleaunp
* force https disable option
* clang
* @stephen's fixes
* added network field in settings and ported old network ones
---------
Co-authored-by: Metr1k <[email protected]>
* texture_cache: initialize added depth-overlap subresources [skip ci]
AI-assisted extraction and verification by Codex.
Human code/comment review and human-written PR text required before upstream submission.
Source integration: e6cf874a170c528068627bb43f2c6bc2e89e4375.
Original commits: e78385ae.
* tests: remove depth-overlap fixture after review [skip ci]
Remove the standalone depth-growth CMake target and modeled regression fixture as requested in upstream PR #5229. The five-line production initialization fix is unchanged.
Validation: inspected the exact file diff; no new build or test run because only the standalone test files were removed. The prior fixture results and limitations remain in the earlier commit history.
AI-assisted change by Codex.
* liverpool: free the frames of nested indirect buffer tasks
IndirectBuffer (graphics and compute) and IndirectBufferConst run their
target as a nested coroutine and wait for it to finish, but the finished
task stays suspended at final_suspend and its frame is never destroyed.
Every indirect buffer leaked about 600 bytes of host heap.
In inFAMOUS Second Son that is ~440 nested tasks per second, so committed
memory grew by ~15 MB per minute (~0.9 GB per hour) without bound. With
the frames destroyed it stays flat after warm-up.
* liverpool: drop comments on nested task destroy
* region_manager: Add lock free bypass check when no state update is required
The lock takes a non insignificant part of CPU time so attempt to avoid taking it if no update is needed
To make this correct, the state update bits must be performed strictly after page manager updates
so split UpdateStateAndProtection into UpdateState and UpdateProtection and run former after page manager
* region_manager: Use summary bits
For some reason, the inlineFetchShader config option increases how many buffers we need for some games. Thankfully, the removal of userdata regs from PushData means we can store significantly more of these in here than we could before.
* translate: Handle NaN semantics of legacy instruction variants
* translate: Use unordered float compares for v_cmp_n* instructions
The ACO compiler in mesa emits those variants for unordered compares so use those to get correct NaN behavior
* spirv_emit_float_point: Proper NaN semantics for three number compare instructions
Manual mentions DX10 NaN handling for all of them and for V_MED3_F32 specifically if any input is NaN it fallbacks to MIN3 instruction so implement those properly using NMin/NMax
* translate: Honor DX10_CLAMP mode bit
Switch FPSaturate to using NClamp instead of FClamp, to match HLSL saturate which returns 0.f with NaN input. Otherwise use normal FClamp which propagates the NaN instead
* emit_spirv_floating_pont: Dont use amd extension
* buffer_cache: allocate sparse backing with device address support [skip ci]
AI-assisted extraction and verification by Codex.
Human code/comment review and human-written PR text required before upstream submission.
Source integration: e6cf874a170c528068627bb43f2c6bc2e89e4375.
Original commits: 1e6bb5a6.
* buffer_cache: remove allocation comment after review [skip ci]
Remove the two-line comment requested in upstream PR #5233. No executable code changes.
Validation: exact diff review only; no rebuild or tests for comment removal.
AI-assisted edit by Codex.
* texture_cache: scan only the first page in FindImageFromRange
FindImageFromRange only accepts images whose guest address equals the
requested address, and every image is registered in all of its pages, so
the candidates are always found in the first page. Walking every page and
image of a large texel buffer range cost ~35-45 us per call and showed up as
the top per-draw cost in inFamous Second Son.
Also skip the lock in RegionManager::ForEachModifiedRange when no bit of
the requested type is set; the caller would be a no-op in that case.
inFamous Second Son (Salmon Bay dock): 23.2 -> 30.7 FPS.
* texture_cache: add ForEachImageWithAddress, drop region_manager change
Look up only the bucket of the first page and only images with the exact
address, as suggested in review. The lockless early out in
ForEachModifiedRange is removed since ChangeRegionState updates the state
bits before the tracker.
* texture_cache: drop redundant address check and comment
Image addresses are 256-byte aligned, so a matching key already implies the
same address.
AI-assisted extraction and verification by Codex.
Human code/comment review and human-written PR text required before upstream submission.
Source integration: e6cf874a170c528068627bb43f2c6bc2e89e4375.
Original commits: 287e0d09.
* Split the HLE camera library into multiple source files for readability
* copyright 2026
* calibration functions
* Pull out camera config type table to a separate header
* Do not assume the base format is always RGBA8888 for RAW8/RAW16 outputs
If a game registers YUV422 for eye 1 and RAW16 for eye 2, that made the HLE library register YUY2 as the SDL format before, but then tried to use it as RGBA88888, which lead to overidexing and reading from unmapped pages
* Cleanup Turtle's cleanup
* copyright 2024-2026
* the loathsome clang-formatter
* sir clang offnir, the all formatting
* texture_cache: Use common small vector
* texture_cache: Remove unused functions
* texture_cache: Remove tail/head track functions
They can be integrated into main Track with much less code
* texture_cache: Remove samplers mutex
Samplers are only accessed by gpu thread so no need for this
* texture_cache: Move locking to per image
The only functions that run from different threads are InvalidateMemory and UnmapMemory, in both the overlapping images are untracked. Untracking must be an atomic operation, i.e a the gpu thread cannot observe the image as untracked (track_addr/track_addr_end == 0) before the image drops its page references from the page manager. So only these two need to be put under a critical section
Also includes a change to make ForEachImageInRange stateless, otherwise a lock would be required for this as well
* texture_cache: Store image address/size inside bucket entry
This avoids looking up the image data itself and taking a cache miss every time you want to test if image overlaps. We only pay the access cost for an image that will actually participate in overlap resolution
* vk_rasterizer: Dont use piecewise_construct for image bindings
Optimize some overhead out
* image_info: Move image info size and mip layour calculation into a standalone constexpr function
We can now use it to build a constexpr table
* image_info: Precompile common BCn configurations for faster size calculation
* image_info: Optimize construction and intrusive LRU cache
* Move functions like SurfaceFormat and NumBitsPerBlock to headers to allow them to inline here
* Load sharp to a local temporary as the start to avoid the compiler constantly reloading the pointer due to aliasing dangers
This could also be resolved with __restrict but this is more idiomatic c++
* Store props with a single byte store instead of doing individial bit insertions
* Remove redudant zero initializations that added extra instructions at the start
Now UpdateSize is also tail-called. Construction dropped by 0.5% cpu time
LRU cache had overhead on every Touch call, so make it intrusive to the objects themselves to avoid extra storage and deque indexing overhead
* clang format
* fix linux build
* fix linux gcc build
* add recursive scanning - force depth 2 for now, make configurable later
* make setting configurable
* match item widths
* correctly load language as specific, fix profile button naming with multiple same titleid entries
* catch fs errors, while ensuring all other items are scanned
* cpu_patches: Apply CPU patches ahead of time on macOS
* module: Use one static patching flag for Windows and macOS
* cpu_patches: Patch SSE4a instructions between the functions of the EH frame table
* emulator: Log the red zone patching setting on macOS
* Revert "emulator: Log the red zone patching setting on macOS"
* module: Share one static patching block between Windows and macOS
- Fix alignment validation in sceKernelReserveVirtualRange to check both power-of-2 and 16KB page alignment per libkernel.sprx (0x1861e)
- Enforce 2GB maximum alignment bound per libkernel.sprx
- Implement sceKernelClearVirtualRangeName (NID mkgXxsoxWHg)
- Match libkernel 16 KB page alignment and madvise/VirtualAlloc(MEM_RESET) page release semantics
- Return ORBIS_KERNEL_ERROR_EINVAL on failure or invalid parameters
- Add posix_mlock/munlock with parameter checks and wrap sceKernelMlock/munlock
- Register POSIX and SCE NID mappings in libkernel and libScePosix
* vk_rasterizer: Only redirect stencil reads for stencil-compatible formats
The stencil-to-depth association is keyed on the stencil plane address
alone, so it also lands on unrelated surfaces that reuse that memory.
Following it for a non-stencil format builds a view of the depth-stencil
image in another compatibility class with a Depth|Stencil aspect, and
storage writes through that view corrupt the depth buffer. Only redirect
when the request can actually be a stencil view.
Together with readbacks set to Precise this fixes the missing world
geometry in Uncharted: Drake's Fortune Remastered (CUSA03280).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* texture_cache: Only link stencil images with a stencil format
Don't associate a color image with the depth buffer in the first place,
as suggested in review, instead of skipping the redirect in BindTextures.
FindDepthTarget now only links the placeholder or an image with a stencil
compatible format at the stencil address, and doesn't create a
placeholder over a color image. The BindTextures check is reverted.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* texture_cache: Keep dummy stencil associations at reused addresses
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* shader_recompiler: Zero PackedAncillary left over after lowering
LowerPackedAncillary replaces the raw ancillary VGPR value with zero once
it lowers a bitfield extract from it. Since #5116 moved
LowerHardwareIntrinsics after dead code elimination, a dead extract is
already gone at that point, so the raw value is never zeroed and reaches
the SPIR-V emitter, which cannot emit it. God of War III (CUSA01715)
crashes on fs 0xeb50917148e7d775, where the shader reuses VGPR4 and one
path still carries the ancillary value into a Phi.
Zero any GetAttributeU32 PackedAncillary still left after the lowering
loop. The pass order from #5116 is kept, and shaders that compiled
before are unaffected, since the emitter could not handle the raw value.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* shader_recompiler: Lower PackedAncillary from its load
Start from the GetAttributeU32 that loads PackedAncillary, lower the
bitfield extracts that use it and then always replace the load with
zero, as suggested in review. This no longer depends on an extract
surviving DCE, so the separate loop after lowering is removed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>