Spider-Man: Miles Morales to gameplay: recompiler, PM4, cache and diagnostics fixes #780
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!780
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-780"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@itsmemac on GitHub · 2026-09-22 21:31 UTC · original
itsmemac:spiderman-running-22-09-2026→main· +690 −174 · 35 files · 13 commits · openSummary
Marvel's Spider-Man: Miles Morales (PPSA01417) boots, loads the world and is playable, and
Astro Bot (PPSA21564) runs with its non-RT patch (distributed separately, not part of this
PR). The work is split into topic commits that each build on their own, so they can be
reviewed and cherry-picked individually. Each commit message explains the problem it fixes
and how it was found.
Changes since the last version of this PR
Rebased on
mainata0268f1d(912 commits since the previous base). Wheremainnow doesthe same job, its version is kept and our topic is dropped; where ours still adds something,
it was re-ported onto the new code.
Dropped, superseded by
main:77a8f307,b2f40c6cread the device clock divided to 100 MHz).downloads GPU-dirty bytes first).
f356fa37, and the early-out in ForEachModifiedRange cover it).use a one-off buffer).
6ff6e755allocateswith AUTO_PREFER_DEVICE within budget).
main).mainnow reports partial inputas unconsumed so the title resends it, and tests that contract; stashing the tail would
decode a resend twice).
The commits the older description listed but that had already left the branch (GLC/SLC
coherence, EOP event 0x14, VrrStatus, agc tracing, the save_data_memory_tests build) are not
listed below either.
Re-ported onto the rewritten code:
skip_dispatch; tessellation pairs the analysis rejects are remembered next tom_tess_layouts. Resource tracking fails inside many nested planning helpers, so innon-fatal mode
Tracker::Failthrows a privateTrackingFailurethat onlyTrackResourcescatches, instead of an early return at every call site.main's heap-reference and eviction-counterhandling.
VK_EXT_device_faultand NV diagnostics config are wired into the new featurechain. The NV checkpoint markers are dropped:
mainremoved the per-command debug info theywere labelled with, and the fault's vendor dump is what names the hung shader.
mainstill lacks.reject(), the presented-frame count sits nextto
main's, and image backing that cannot be read zero-fills throughTryReadSparseBacking.Commits
Shader recompiler
Command processor
Renderer and caches
Vulkan and video out
Libraries
Diagnostics
Testing
ctest: 74 of 79 pass. None of the five failures involves this PR:vdecswdoes notcompile with the VS 2019 STL (
std::aligned_alloc),psmlis not built bykyty_tests,kernel_file_systemdoes not link on Windows (SDL_main), andcommon'sFile.GetTimesReportsExactNanosecondsthrows in this STL'slast_write_time.ngs2_samplerpasses once the ATRAC9 topic is dropped.shader_recompiler_computepasses, including the buffer and texture cache GC tests andthe tessellation interface tests this PR updates.
Known limitations
dispatch.
AI assistance was used
🤖 Generated with Claude Code
@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original · edited 2026-11-05 16:54 UTC
No actionable comments were generated in the recent review.
Walkthrough
The pull request updates graphics diagnostics, dirty tracking, cache collection, rendering, and Vulkan setup. Shader translation gains non-fatal failure reporting and realtime-clock support. AMPR adds guest path decoding, asynchronous command submission, and execution of wait, counter, and mapping commands. Guest APIs change ATRAC9 input buffering, progress-bar dialog status, and legacy save discovery. Host fatal reports can include Windows stack details.
Suggested reviewers:
nmzikChange: Bug fix
Merge Risk:
High · up to
be768The change is not ready to merge: affected games can hang or crash, and memory-mapping and graphics paths still have material correctness risks. Fix the high-impact failures before merging.
Security architecture risk:
Moderate · up to
be768Memory-pressure cleanup can now write tiled images back to guest memory and allocate a staging buffer sized to an image. The first such writeback can exceed the per-frame budget. Existing image and memory checks remain in place; whether a guest can create an image large enough to cause material resource pressure is unresolved.
Retained concerns
Security review details
Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
Pre-merge checks:
4
Full details: Title check
Explanation
The title names a multi-area change (recompiler, PM4, cache and diagnostics fixes). The changeset covers shader recompiler, command processor, renderer and cache, Vulkan, video out, dialog, and diagnostics work. The title is partially related: it reflects real parts of the change but is broad and lists many areas instead of one primary change. It is not vague or off-topic, so it passes.
Full details: Description check
Explanation
The description states the goal (Spider-Man: Miles Morales boots and is playable), lists the topic commits, and describes the shader recompiler, renderer, cache, Vulkan, video out, dialog, and diagnostics work. These match the changeset, so the description is related and passes.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
c1846a4c-b666-4bf2-9a42-6a3f3489fda6📥 Commits
Reviewing files that changed from the base of the PR and between 508adebfaec9dd1ccfcca7a1dff98f00429008fd and be768a7d7a4beb301a85de3f8d44e0df7fab6646.
📒 Files selected for processing (6)
CMakeLists.txtsrc/graphics/host_gpu/renderer/cache/textureCache.cppsrc/graphics/host_gpu/renderer/pipeline/descriptors.cppsrc/graphics/presentation/window/swapchain.cppsrc/graphics/shader/recompiler/backend/spirv/SpirvEmitter.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/graphics/host_gpu/renderer/cache/bufferCache.cppline 116 (outdated):🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Limit each download window by packed staging size.
This loop limits the guest address span to the 32 MiB staging capacity.
DownloadBufferWindowaligns each dirty segment to 64 bytes. If a large GPU-dirty buffer contains many short, separated segments, one window can require more than 32 MiB and fail atMap. Split windows using the accumulated aligned copy size, or use staging that can hold that size.@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/graphics/host_gpu/renderer/cache/textureCache.cppline 2041 (outdated):🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Check the next tiled writeback against the frame budget.
The guard checks only
m_gc_written_back_bytes_frame. If that value is below 256 MiB, a large tiled image proceeds even when its size takes the frame far beyond the limit.DownloadImageMemorycan also allocate a dedicated download buffer for that image during memory pressure. Compare the remaining budget withowner->info.data.sizebefore starting the writeback.@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/graphics/shader/recompiler/backend/spirv/spirvEmitterModule.cppline 626 (outdated):🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Provide a fallback for devices without
shaderDeviceClock.A shader with
S_MEMREALTIMEnow requiresShaderClockKHRandSPV_KHR_shader_clock. The PR objective states that this path has no fallback whenshaderDeviceClockis unavailable. Such devices cannot run pipelines that contain this opcode.Gate this lowering on the enabled device feature. Add an emulation path or reject the shader before pipeline creation with the existing non-fatal translation flow.
@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/graphics/shader/recompiler/ir/passes/ResourceTracking.cppline 182 (outdated):🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win
A non-fatal
Failnow returns into code that assumes it does not return.Every call site of
Failwas written for the old[[noreturn]]contract. In non-fatal mode,Failreturns.ShaderFailureNonFatal()always returns true, so this is the production path. The caller then continues on the state thatFailrejected:GetHandle(Lines 553-558): ifhandle == nullptr,MakeSource(*handle, ...)dereferences null.MakeSource(Lines 266-273): ifNumArgs() != width,handle.Arg(i)reads past the argument list.Collect(Lines 726-732): ifflags.indexis out of range,m_program.memory_info[flags.index]reads out of bounds. IfNumArgs() == 0, laterinst.Arg(0)calls are invalid.ValidateAddressHandle(Lines 574-579): ifhandleis null,handle->NumArgs()dereferences null.Run(Lines 97-102): planning continues after "resources already tracked" and "SRT plan is not ready".Malformed shader IR can therefore crash the emulator. The unsupported-shader path should skip that shader instead.
Return immediately after each
Failwhose following code depends on the rejected condition. For value-returning helpers, return a failure value.Proposed fix (representative sites)
The image and sampler
GetHandlecalls inCollectignore the return value. Addif (m_failed) return;after each of those calls.@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/graphics/shader/recompiler/ir/passes/SrtCompiler.cppline 207 (outdated):🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 31493
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 3125
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 930
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 1281
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 1000
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 4749
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 3153
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 1666
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 2698
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 1616
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 2098
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 2128
The compiled evaluator bakes clean-slot decisions at compile time instead of checking the runtime
clean_flat_slotsspan.The compiled path stores
op.srt_slot_cleanfromm_program.clean_flat_slotsat compile time (SrtCompiler.cpp:205-207). At runtime,SrtExecution::Evaluateuses this baked value (SrtCompiler.cpp:576):The interpreter checks the runtime
clean_flat_slotsspan instead. SrtWalker.cpp:1107-1109 shows:When
WalkSrtorEvaluateDescriptorSourcespasses an emptyclean_flat_slotsspan (SrtWalker.cpp:1330, 1345), the compiled path reads throughread_specialization_memory(if the slot was marked clean at compile time), while the interpreter reads throughread_memory. Ifread_specialization_memoryis null, the compiled path fails; in shadow-validation mode, the mismatch exits the program (SrtWalker.cpp:1269-1280).Store the slot index and check the runtime span during execution, as proposed.
Suggested fix
Pass
clean_flat_slotsintoSrtExecution, then evaluate inEvaluate():@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/graphics/shader/recompiler/ir/passes/SrtCompiler.cppline 248 (outdated):🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Add
SGreaterThanEqual32to the compile switch.SrtExecution::GenerichandlesValueOpcode::SGreaterThanEqual32, andEvaluator::EvaluateInstalso supports it.CompileInsthas no case for it, so it reachesdefaultand becomesAlwaysFails.A plan that uses this opcode always fails the compiled path. Every draw then runs both evaluators. When
KYTY_SRT_SHADOW_VALIDATEis set,interpreted_ok != compiled_okcallsEXIT.Proposed fix
📝 Committable suggestion
@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/graphics/shader/recompiler/ir/passes/SrtCompiler.cppline 563 (outdated):🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
A nested
ReadFirstLaneunder the clean pass can read memory without a check.If
cleanis true, the nested execution usesm_clean_readas its raw reader. Ifread_specialization_memoryis null,m_clean_readis null.RawRead(false, ...)then reachesstd::memcpyat the guest-derived address.The interpreter prevents this case.
CleanRuntimesets an always-false reader, so the clean evaluator and its nestedactiveevaluator fail the read.A
Selectpredicate always uses the clean pass. AReadFirstLaneinside that predicate therefore reaches this path. The result is a mismatch with the interpreter and a direct read that the comment "A missing clean reader must never fall through to the raw-memory path" forbids.Proposed fix
@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/libs/ajm/atrac9_decoder.hline 139 (outdated):🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Retain partial RIFF data.
When
ParseRiffHeaderreturnsAJM_RESULT_PARTIAL_INPUT, this callsfinish(result, 0, false). With no existing pending data,finishclearsm_pendingand reports zero consumed bytes. A split RIFF header is discarded, so the next decode call cannot complete it. Setstash_tailfor the partial-input result.Proposed fix
📝 Committable suggestion
@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/libs/libAmpr.cppline 246 (outdated):🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 2692
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 4956
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 772
Inline paths may cause access violations before the fallback runs.
ResolvePathFromListreads list entries as pointers throughReadPathPointer. For an inline path stored directly in the list (not referenced through a pointer), the first 8 bytes are printable ASCII characters. When interpreted as auint64_tpointer, these bytes form a non-canonical host address.ReadGuestPathTextthen callsReadGuestCString, which dereferences this address without validating that it is canonical or committed. The access violation occurs before the inline-path fallback at line 239 executes.IsValidGuestRange(line 77) checks only for zero and overflow. It does not validate canonical addresses or committed memory.ReadGuestCString(line 154) callsIsValidGuestRangebut then dereferences the address unconditionally at line 168. The loop starting at line 241 has the same issue for each slot.Validate that a candidate pointer address is canonical and committed before dereferencing it. On Windows, call
IsGuestRangeCommittedbefore reading. Alternatively, attempt the inline-text interpretation first, before treating the bytes as a pointer.Suggested fix
Check committed memory status in
ReadPathPointerbefore dereferencing:Alternatively, reorder
ResolvePathFromListto attempt inline interpretation before pointer dereference:@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/libs/libAmpr.cppline 738 (outdated):🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win
Enqueue-failure cleanup blocks forever in
CompleteSubmission.CompleteSubmissionnow waits until the record is erased ordoneis true. WhenEnqueueCommandBufferfails, no worker runs and nothing setsdone. The cleanup call therefore blocks the calling guest thread permanently instead of returning the error.EnqueueCommandBufferreturnsEFAULTwhenTryGetCommandBufferStatefails, so an invalid command-buffer header triggers this path.Add a non-blocking helper that erases the record and call it at all four sites.
🐛 Proposed fix
Also applies to: 776-776, 3166-3166, 3194-3194
@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/libs/libAmpr.cppline 1251 (outdated):🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Clear
counter_commandson reset and include it inHasQueuedCommands.WriteCommandBufferPointersclears every command queue exceptcounter_commands.CommandBufferResetcalls it withwrite_offset = 0. When new records advancewrite_offset, stale counter commands with a smallerrecord_offsetpass the filter inExecuteCommandBufferStateagain. The next submission then replays old counter writes and waits.HasQueuedCommandsat Line 1007-1008 also omitscounter_commands. As a result,ResolveCommandBufferStateLockedcan pick an alias state over a buffer that holds only counter commands.🐛 Proposed fix
@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original
On
src/libs/libAmpr.cppline 1641 (outdated):🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
A partial unmap returns still-mapped direct memory to the pool.
ReleaseAmmAutoDirectMemoryreleases the completemapping.sizefor each mapping that starts inside[va, va + size). Consider an unmap of only the first page of a 64 KiB auto mapping. The code frees all 64 KiB tog_amm_auto_freewhile the remaining 48 KiB are still mapped. A laterAllocateAmmAutoDirectMemorycan then give that range to another VA, and two live VAs alias the same physical memory. Also,lower_bound(va)misses mappings that start beforevaand overlap the range, so those allocations leak.Release only the overlapping portion:
[max(va, start), min(va + size, start + mapping.size)). Keep or split the remaining head and tail entries.@coderabbitai[bot] on GitHub · 2026-09-22 21:50 UTC · original · reviewed
Actionable comments posted: 12
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
33abf9c6-e1be-48d2-9394-4e100a3343d1📥 Commits
Reviewing files that changed from the base of the PR and between
8b095caefeand e2264dd01cca9f02b22a382f8fa71624f61ad4b5.📒 Files selected for processing (71)
CMakeLists.txtsrc/common/CMakeLists.txtsrc/common/assert.cppsrc/common/assert.hsrc/graphics/guest_gpu/command_processor/commandProcessor.hsrc/graphics/guest_gpu/command_processor/pm4Handlers.cppsrc/graphics/guest_gpu/graphicsRun.cppsrc/graphics/host_gpu/diagnosticCheckpoints.cppsrc/graphics/host_gpu/graphicContext.hsrc/graphics/host_gpu/memoryTracker.cppsrc/graphics/host_gpu/memoryTracker.hsrc/graphics/host_gpu/regionManager.hsrc/graphics/host_gpu/renderer/cache/bufferCache.cppsrc/graphics/host_gpu/renderer/cache/bufferCache.hsrc/graphics/host_gpu/renderer/cache/faultManager.cppsrc/graphics/host_gpu/renderer/cache/streamBuffer.cppsrc/graphics/host_gpu/renderer/cache/textureCache.cppsrc/graphics/host_gpu/renderer/cache/textureCache.hsrc/graphics/host_gpu/renderer/commandScheduler.cppsrc/graphics/host_gpu/renderer/commandScheduler.hsrc/graphics/host_gpu/renderer/context.cppsrc/graphics/host_gpu/renderer/image/image.hsrc/graphics/host_gpu/renderer/image/imageInfo.hsrc/graphics/host_gpu/renderer/masterSemaphore.cppsrc/graphics/host_gpu/renderer/pipeline/descriptors.cppsrc/graphics/host_gpu/renderer/pipeline/pipelineCache.cppsrc/graphics/host_gpu/renderer/render.hsrc/graphics/host_gpu/renderer/renderCompute.cppsrc/graphics/host_gpu/renderer/renderContext.cppsrc/graphics/host_gpu/renderer/renderContext.hsrc/graphics/host_gpu/renderer/renderDraw.cppsrc/graphics/host_gpu/vma.cppsrc/graphics/presentation/videoOut.cppsrc/graphics/presentation/window/swapchain.cppsrc/graphics/presentation/window/vulkanWindow.cppsrc/graphics/shader/recompiler/ShaderRecompiler.cppsrc/graphics/shader/recompiler/ShaderRecompiler.hsrc/graphics/shader/recompiler/Tessellation.cppsrc/graphics/shader/recompiler/Tessellation.hsrc/graphics/shader/recompiler/backend/spirv/SpirvEmitter.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterFlow.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterInstructions.hsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterInternal.hsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterMemory.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterMemoryHelpers.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterModule.cppsrc/graphics/shader/recompiler/frontend/cfg/ShaderCFG.cppsrc/graphics/shader/recompiler/frontend/decode/MemoryOps.cppsrc/graphics/shader/recompiler/frontend/decode/ShaderDecoder.hsrc/graphics/shader/recompiler/frontend/translate/Dispatch.cppsrc/graphics/shader/recompiler/frontend/translate/Memory.cppsrc/graphics/shader/recompiler/frontend/translate/Translator.hsrc/graphics/shader/recompiler/ir/Program.cppsrc/graphics/shader/recompiler/ir/ShaderIR.hsrc/graphics/shader/recompiler/ir/opcodes/ValueOpcodes.incsrc/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cppsrc/graphics/shader/recompiler/ir/passes/ResourceTracking.cppsrc/graphics/shader/recompiler/ir/passes/ResourceTracking.hsrc/graphics/shader/recompiler/ir/passes/SrtCompiler.cppsrc/graphics/shader/recompiler/ir/passes/SrtCompiler.hsrc/graphics/shader/recompiler/ir/passes/SrtWalker.cppsrc/graphics/shader/shader.cppsrc/graphics/shader/shader.hsrc/graphics/shader/shaderCompiler.hsrc/graphics/shader/shaderVertexMetadata.cppsrc/libs/agc.cppsrc/libs/ajm.cppsrc/libs/ajm/atrac9_decoder.hsrc/libs/dialog.cppsrc/libs/libAmpr.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@coderabbitai[bot] on GitHub · 2026-09-23 20:34 UTC · original
On
src/graphics/host_gpu/renderer/pipeline/pipelineCache.cppline 395 (outdated):🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 16868
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 17770
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 17770
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 6179
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 12083
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 14247
Reject draws with incomplete tessellation programs.
PrepareDrawRenderStatechecks onlystate.programs.vertex[0]and the pixel program. Ifvertex[1]is valid butvertex[2]is empty,VertexStageCount()returns 3.CreatePipelineInternalthen builds the tessellation stage withprograms.vertex[2].module, which is null. Pipeline creation can fail, and the code exits when Vulkan returns an error.The compute paths already reject an empty compute program before calling
GetComputePipeline.@coderabbitai[bot] on GitHub · 2026-09-23 20:34 UTC · original
On
src/graphics/presentation/window/vulkanWindow.cppline 698 (outdated):🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Enable
diagnosticsConfigwith the diagnostic flags.When
supported_diagnostics.diagnosticsConfigis true, this branch chainsvk::DeviceDiagnosticsConfigCreateInfoNVbut never enablesvk::PhysicalDeviceDiagnosticsConfigFeaturesNV::diagnosticsConfigon the created device. The support query does not enable the feature. Chain the feature withdiagnosticsConfig = VK_TRUEbefore requesting the flags; otherwise the requested diagnostic configuration cannot be relied on. (docs.vulkan.org)@coderabbitai[bot] on GitHub · 2026-09-23 20:34 UTC · original
On
src/libs/ajm/atrac9_decoder.hline 110 (outdated):🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Clear pending input on explicit reinitialization.
If a decode buffers an incomplete superframe, an explicit
Initializecall leavesm_pendingintact. The nextDecodecall prepends old-stream bytes to the new stream. This can corrupt playback or cause a codec error. Clearm_pendinginAjmAt9Decoder::Initializewhen it accepts a new configuration. Do not clear it inInitializeConfig: RIFF parsing also calls that function while reading buffered input. The AJM initialization paths insrc/libs/ajm.cppdo not require a precedingReset. (raw.githubusercontent.com)@coderabbitai[bot] on GitHub · 2026-09-23 20:34 UTC · original · reviewed
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
1b996e99-ea42-4606-b696-fb19fd9a6c43📥 Commits
Reviewing files that changed from the base of the PR and between e2264dd01cca9f02b22a382f8fa71624f61ad4b5 and 652517b99c143732db13cf988738a1c095fadd23.
📒 Files selected for processing (21)
CMakeLists.txtsrc/graphics/guest_gpu/graphicsRun.cppsrc/graphics/host_gpu/renderer/cache/bufferCache.cppsrc/graphics/host_gpu/renderer/cache/bufferCache.hsrc/graphics/host_gpu/renderer/cache/textureCache.cppsrc/graphics/host_gpu/renderer/masterSemaphore.cppsrc/graphics/host_gpu/renderer/pipeline/descriptors.cppsrc/graphics/host_gpu/renderer/pipeline/pipelineCache.cppsrc/graphics/host_gpu/renderer/renderCompute.cppsrc/graphics/presentation/videoOut.cppsrc/graphics/presentation/videoOut.hsrc/graphics/presentation/window/swapchain.cppsrc/graphics/presentation/window/vulkanWindow.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterMemory.cppsrc/graphics/shader/recompiler/ir/ShaderIR.hsrc/graphics/shader/recompiler/ir/passes/ResourceTracking.cppsrc/graphics/shader/shader.cppsrc/graphics/shader/shaderCompiler.hsrc/libs/ajm/atrac9_decoder.hsrc/libs/libAmpr.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@coderabbitai[bot] on GitHub · 2026-09-24 10:50 UTC · original
On
src/graphics/presentation/videoOut.cppline 1685 (outdated):🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 8662
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 9548
Preserve the VRR-status output contract.
The registered symbol and
VideoOutVrrStatusversion are unchanged. A caller using the previous ABI can pass a handle and status pointer, but this function ignores both, returnsOK, and leaves the status unchanged. Restore the previous parameters and validation.Suggested fix
@coderabbitai[bot] on GitHub · 2026-09-24 10:50 UTC · original
On
src/graphics/presentation/window/vulkanWindow.cppline 703 (outdated):🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 43057
Gate NV diagnostics configuration behind a runtime option.
The code enables all three NV diagnostics flags whenever the device exposes
VK_NV_device_diagnostics_config. It also enables the checkpoint extension without a runtime gate. Normal rendering can therefore perform diagnostic work without a crash-diagnostics opt-in.Enable these features and extensions only when a GPU crash-diagnostics option is enabled.
♻️ Suggested gating
Apply the same condition to the diagnostics feature branch.
Config::GpuCrashDiagnosticsEnabledis a suggested name.📝 Committable suggestion
@coderabbitai[bot] on GitHub · 2026-09-24 10:50 UTC · original
On
src/graphics/presentation/window/vulkanWindow.cppline 729 (outdated):🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Turn on
deviceFaultVendorBinaryso the vendor dump inDumpDeviceFaultcan run.This branch turns on only
deviceFault.DumpDeviceFaultinsrc/graphics/host_gpu/diagnosticCheckpoints.cppallocatescounts.vendorBinarySizebytes and writes_device_fault.nv-gpudmp. UnderVK_EXT_device_fault, the implementation returnsvendorBinarySize == 0whendeviceFaultVendorBinaryis not enabled. As a result, the vendor binary dump never runs.If
supported_fault.deviceFaultVendorBinaryis true, set the same feature ondevice_fault.🐛 Proposed fix
📝 Committable suggestion
@coderabbitai[bot] on GitHub · 2026-09-24 10:50 UTC · original
On
src/graphics/shader/recompiler/backend/spirv/spirvEmitterMemory.cppline 1171 (outdated):🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Set the coherent-buffer requirement for scalar-buffer loads.
If a shader uses a GLC/SLC
S_BUFFER_LOAD_*without a coherent vector-buffer access, this branch emits a volatile load, butAnalyzeProgramRequirementsdoes not setcoherent_buffersforResourceKind::ScalarBuffer.DefineDescriptorstherefore omits the buffer descriptor’sCoherentdecoration. Volatile prevents the load from being eliminated or combined; it does not declare the buffer coherent. Include coherent scalar-buffer loads in requirement analysis so polling loads can observe writes from other invocations. (raw.githubusercontent.com)@coderabbitai[bot] on GitHub · 2026-09-24 10:50 UTC · original
On
src/libs/libSaveData.cppline 419 (outdated):🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Initialize metadata when a legacy save is updated.
This fallback lets a guest read parameters from a mounted legacy save, but
SaveDataSetParamcannot update them. Parameter types 1–4 returnSAVE_DATA_ERROR_NOT_FOUNDwhen they read the missingparam.bin. A type-0 update fails becausewrite_save_filecannot create its temporary file inside the missingsce_sysdirectory. Initialize the metadata on the first parameter write so a discovered legacy save remains writable.@coderabbitai[bot] on GitHub · 2026-09-24 10:50 UTC · original
On
src/libs/libSaveData.cppline 609 (outdated):🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Return allocation information for legacy saves.
If a caller requests
result->infos, this search now includes a legacy save, then callsread_save_blocksfor that save at Line 649. A legacy save has nosce_sys/blocks.bin, so the entire search returnsSAVE_DATA_ERROR_BROKEN. Supply a defined allocation value for legacy saves before including them in searches that requestinfos.@coderabbitai[bot] on GitHub · 2026-09-24 10:50 UTC · original · reviewed
Actionable comments posted: 6
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
b0402b32-3da7-4fdb-9e35-a5953a57a25f📥 Commits
Reviewing files that changed from the base of the PR and between 652517b99c143732db13cf988738a1c095fadd23 and 998adaae5d306d26203c5e47a2a58e6b48c39d53.
📒 Files selected for processing (16)
src/graphics/host_gpu/renderer/cache/textureCache.cppsrc/graphics/host_gpu/renderer/pipeline/descriptors.cppsrc/graphics/host_gpu/renderer/pipeline/pipelineCache.cppsrc/graphics/host_gpu/renderer/renderCompute.cppsrc/graphics/host_gpu/renderer/renderDraw.cppsrc/graphics/presentation/videoOut.cppsrc/graphics/presentation/window/swapchain.cppsrc/graphics/presentation/window/vulkanWindow.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterMemory.cppsrc/graphics/shader/recompiler/frontend/decode/MemoryOps.cppsrc/graphics/shader/recompiler/frontend/translate/Memory.cppsrc/graphics/shader/recompiler/ir/passes/ResourceTracking.cppsrc/libs/ajm/atrac9_decoder.hsrc/libs/libSaveData.cpptests/SaveDataMemoryTests.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@coderabbitai[bot] on GitHub · 2026-09-26 21:53 UTC · original · reviewed
🧹 Nitpick comments (1)
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
aea94322-7569-4d67-815d-32a3ed1e3946📥 Commits
Reviewing files that changed from the base of the PR and between 998adaae5d306d26203c5e47a2a58e6b48c39d53 and 508adebfaec9dd1ccfcca7a1dff98f00429008fd.
📒 Files selected for processing (22)
CMakeLists.txtsrc/graphics/host_gpu/graphicContext.hsrc/graphics/host_gpu/renderer/cache/textureCache.cppsrc/graphics/host_gpu/renderer/image/imageInfo.hsrc/graphics/host_gpu/renderer/pipeline/descriptors.cppsrc/graphics/host_gpu/renderer/pipeline/pipelineCache.cppsrc/graphics/host_gpu/renderer/renderCompute.cppsrc/graphics/host_gpu/renderer/renderDraw.cppsrc/graphics/presentation/window/vulkanWindow.cppsrc/graphics/shader/recompiler/ShaderRecompiler.cppsrc/graphics/shader/recompiler/backend/spirv/SpirvEmitter.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterInstructions.hsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterInternal.hsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterModule.cppsrc/graphics/shader/recompiler/frontend/cfg/ShaderCFG.cppsrc/graphics/shader/recompiler/frontend/translate/Dispatch.cppsrc/graphics/shader/recompiler/frontend/translate/Memory.cppsrc/graphics/shader/recompiler/frontend/translate/Translator.hsrc/graphics/shader/recompiler/ir/passes/ResourceTracking.cppsrc/graphics/shader/shader.cppsrc/graphics/shader/shader.htests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@Nmzik on GitHub · 2026-09-29 18:19 UTC · original
@itsmemac Thanks.
Current status: game is now in-game on main.
Only two things left: visual bug with Miles head and very low performance. I'll take a look later at other/perf commits. Readbacks are not needed. Dont close PR
@itsmemac on GitHub · 2026-09-29 18:28 UTC · original
Thank you for taking your time in reviewing this PR.
@overlordxrz-source on GitHub · 2026-10-06 00:47 UTC · original
Data point on the red macOS CI leg (Sept 29 run failed in
PageManagerTests: fixed low mach_vm_allocate failed): I built this PR's head (290da746) locally (x86_64 macOS no-Qt Release, Apple Silicon Mac) andpage_manager_testspasses — all cases green, same as current main on this machine. Main's macOS CI is also green. That points at the CI runner environment (fixed low-addressmach_vm_allocateis host-layout-sensitive) rather than this PR's VM changes — none of which touch page mapping paths anyway (this branch is recompiler/PM4/cache/AMPR/diagnostics). Suggest re-running the macOS job; happy to dig further if it fails the same way twice.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.