* logging
* WIP
* handle register/unregister
* remove debugging
* i hope clang is ok now
* clang >:(
* function changed name
* clang complain
* clang complain
* sceGnmComputeWaitSemaphore
Needed for HITMAN 3
* Rename WriteTrailingNop to WriteNop
It's handy for more than just trailing nops, so might as well rename it to something more accurate.
* sceGnmRequestFlipAndSubmitDone
Used by H1Z1: Battle Royal. This, paired with a hack to get around some weird stack overflows this thing is doing, gets the game running.
* sceGnmDrawIndirectCountMulti
Still need to implement the PM4 opcode though
* Oops
* some other fixups
* Implement IT_DRAW_INDIRECT_COUNT_MULTI
* Remove indirect buffer wrapping
We don't need it
- Implement posix_pthread_mutex_setname_np, posix_pthread_rwlock_setname_np, posix_pthread_cond_setname_np, and posix_sem_setname according to libkernel decompilation.
- Implement posix_pthread_get_user_context_np, posix_pthread_set_user_context_np, posix_pthread_suspend_user_context_np, posix_pthread_resume_user_context_np.
- Implement thread suspension and context capture on macOS (Mach thread API), Windows (GetThreadContext), and Linux (SIGSLEEP).
- Implement posix_mkdir, posix_rmdir, posix_chdir, posix_lstat, and posix_flock.
- Implement sceKernelStopUnloadModule, sceKernelSetProcessProperty, and sceKernelGetOpenPsId.
* http: Redact credential headers in logs
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* http: Skip logging credential headers instead of redacting them
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Calling mmap(MAP_FIXED) over an expanded coalesced range and mutating *size causes issues:
- Calling mmap over already-free PROT_NONE memory adds redundant kernel overhead and risks Mach VM submap collisions on macOS.
- Mutating *size passes inflated ranges to callers like the GPU rasterizer.
Unmap strictly the requested [virtual_addr, virtual_addr + *size) range on the host, preserve *size, and remove unused m_free_regions from the POSIX implementation.
* renderer_vulkan: Bind a zero index buffer instead of requiring maintenance6
* renderer_vulkan: Make maintenance6 optional and bind a null handle when supported
* gnmdriver: Implement sceGnmSetGsRingSizes
- Match Sony libSceGnmDriver 1 MB alignment and [4 MB, 8 MB] range validation
- Return 0x08000000 on invalid size parameter
- Program Liverpool VGT_ESGS_RING_SIZE and VGT_GSVS_RING_SIZE registers
* gnmdriver: Implement sceGnmSetupMipStatsReport
- Match Sony libSceGnmDriver 64-byte alignment and 48-bit address validation (0x80000001)
- Validate report buffer size >= 0x1040 and (size & 0x7FF) == 0x40 (0x80000002)
- Zero output buffer and write 64-byte header size
- Lexically normalize guest paths to resolve redundant slashes (//) and directory traversal (..)
- Prevent duplicate mount entries when registering overlays in MntPoints::Mount
- Sanitize paths before mount matching to prevent false matches against read-only mounts
- Validate and sanitize paths in sys_open
- Handle root directory ("/") queries in VFS and reachability checks
* kernel: Implement POSIX/Orbis filesystem APIs (truncate, chmod, fchmod, utimes, futimes)
* kernel: Use MntPoints filesystem abstractions for truncate, chmod, utimes
- Validate existence and directory type using MntPoints::Exists and IsDirectory
- Enforce EROFS for read-only mounts before calling host filesystem APIs
- Check mount and descriptor read-only status in posix_fchmod and posix_futimes
* kernel: Implement posix_fdatasync, sceKernelFdatasync, posix_sync, and sceKernelSync
* image_info: Size the stencil plane like the depth plane
* texture_cache: Move stencil plane association into AssociateStencil
* vk_rasterizer: Link the stencil plane of DepthStencilCopy destinations
* Speed up game ID resolution by skipping looking through game folders for other game dumps
* Run a fast check through each install folder with a depth of zero before running the expensive recursive search
* +
* shader_recompiler: Add subgroup barriers for shared memory dependencies
On GCN, the 64 invocations inside a wavefront execute in lockstep, so games can
use LDS/shared memory to exchange data between invocations of the same wave
without adding explicit barriers. SPIR-V does not guarantee this same behavior,
and the host compiler can reorder a shared memory load before a store from
another invocation.
For the cases where the existing LDS barrier path is not used, insert subgroup
scoped memory barriers between dependent shared memory writes and reads inside
the same basic block. I also bumped ShaderBinaryVersion to force old cached
shaders to be rebuilt.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Remove comment from EmitSubgroupBarrier
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* 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.