Re engine bringup #1495
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!1495
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1495"
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?
@shadowbeat070 on GitHub · 2026-10-13 23:16 UTC · original
shadowbeat070:re-engine-bringup→main· +48541 −2912 · 190 files · 138 commits · openMany fixes, implementations and refactors to make all re engine games get in game and some are playable from beginning to end. Also fixed some miscellaneous bugs and performance issues.
Rebased onto the latest main (
6aaa53329). Changes that main now covers were dropped, and the RE Engine descriptor heaps now go through main's image heap instead of our own bindless arrays.Summary
Shader recompiler: decoding and opcode coverage
Shader recompiler: memory, coherence and BDA
Shader recompiler: descriptors, srt walk and bindless
Shader recompiler: stages and features
Shader recompiler: stability and speed optimizations
Renderer: images and texture cache
Renderer memory, BDA and guest faults
Renderer: draws, dispatches and pipelines
Renderer and graphics: performance and synchronization changes
Kernel
Loader
common
Audio
Saves and system
Games that this PR targets: RE/2/3/4/7/8/9, PRAGMATA, Onimusha, and a few small graphical fixes for Silent Hill 2/f
RE2/3/7 are confirmed playable from beginning to end with consistent 30-60 fps depending on the game.
All others get in game and run stably with no noticable graphical issues.
After the rebase, RE2 (ray tracing on), RE8, RE9, Onimusha, Dead Space, Silent Hill 2 and Silent Hill Townfall were re-tested on the final build.
All games were tested with Intel/NVIDIA Hardware.
PR follows contribution guidelines and the Windows build is verified.
RE3's look-back scan publishes its {flag, value} pair with a plain glc DWORDX2 store and has no 64-bit atomic, so split dword stores tore it and its BVH walkers hung the GPU at boot.@shadowbeat070 on GitHub · 2026-10-13 23:26 UTC · original
@shadowbeat070 on GitHub · 2026-10-13 23:28 UTC · original · edited 2026-10-13 23:41 UTC
@shadowbeat070 on GitHub · 2026-10-13 23:30 UTC · original
@shadowbeat070 on GitHub · 2026-10-13 23:30 UTC · original · edited 2026-10-13 23:40 UTC
@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original · edited 2026-10-23 21:59 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
d7c86352-f4e7-4300-bf9c-41d95d16c056📥 Commits
Reviewing files that changed from the base of the PR and between 7e2caa6202d78976564e11fc463e95fc8ae28155 and 8335a6014e7391483b53e149cc3d0b81575ca0cd.
📒 Files selected for processing: 4
src/graphics/shader/recompiler/ir/ShaderIR.hsrc/graphics/shader/recompiler/ir/passes/SrtWalker.cppsrc/graphics/shader/recompiler/ir/passes/SrtWalker.htests/ResourceMaterializationTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
The pull request updates GPU rendering and memory management, shader decoding and compilation, guest runtime services, audio output, and save-data dialogs. It adds GPU indirect draws, bindless image handling, stencil export, memory synchronization, image allocation and readback, and shader analysis and caching. It also adds UMTX operations, guest-memory and loader changes, platform library handlers, and related tests. The build configuration adds shader generation and test targets. The release workflow permits pushes from an additional repository.
Suggested reviewers:
nmzikPriority: ➖ Normal
Merge Risk: 🟡 Moderate · up to
8335aPreviously identified rendering and scheduler failures remain unresolved on the supplied evidence. Confirm or fix the material paths before merging.
Pre-merge checks:
4 ·
1
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
Comment
@coderabbitai helpto get the list of available commands.@ -439,3 +439,3 @@always() &&github.event_name == 'push' &&github.repository == 'KytyPS5/KytyPS5' &&(github.repository == 'KytyPS5/KytyPS5' || github.repository == 'shadowbeat070/KytyPS5-re-engine') &&@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Remove the fork-specific repository from the upstream release condition.
The release condition now also accepts
shadowbeat070/KytyPS5-re-engine. That is a personal fork. In the upstream repository this clause never matches, so it is dead configuration. It also gives a third-party repository a supportedcontents: writerelease path in the upstream workflow. Keep the fork setting in the fork's own branch.🔧 Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.30.1)
[warning] 1-532: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
@ -444,6 +505,7 @@ void GuestGpu::ThreadRun(void* data) {}continue;}blocked_since = {};@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win
Reset
blocked_sinceonly after a submission makes progress. Otherwise the 2 ms budget never runs out.The loop works as follows when every queue front stays blocked:
WaitBlockedBrieflysetssince = now, spins for 50 µs, and returnstrue.blocked_since = {}.Processreturns incomplete, and the submission is blocked again.Because of step 3,
now - sincenever reachesBudget. The thread never falls back tom_work_available.WaitFor(..., 100). While a guest wait lasts (WAIT_REG_MEM, CE/DE counters, flip waits), the GPU thread re-runs every blocked submission about every 50 µs, without limit. One host core stays busy for the whole wait, and that core is not available to guest threads. The old code polled at most every 100 ms.Reset the timer only when a submission completes or makes progress.
Proposed fix
📝 Committable suggestion
@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
On
src/graphics/guest_gpu/graphicsRun.cppline 1083 (outdated):🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 5883
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 25712
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 41967
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 41961
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 33850
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 9453
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 34744
Refuse GPU indirect draws when they require patched offset registers.
DrawIndirectMultireturns afterDrawIndirectOnGpureportsDrawn, beforePatchIndirectDrawOffsetsruns. The GPU path records a Vulkan indirect draw, but it does not receiveIndirectDrawRegistersor update the packet-selected SGPRs. A vertex shader that consumesvertex_offset_sgprorinstance_offset_sgprcan therefore read stale values instead of the current indirect record.Pass the register destinations into the GPU-path classification, or refuse that path when an active stage consumes either register. Use the existing CPU fallback so it patches the registers for each record.
@ -310,0 +373,4 @@vk::FenceCreateInfo fence_info {};EXIT_NOT_IMPLEMENTED(device.createFence(&fence_info, nullptr, &m_detached_fence) !=vk::Result::eSuccess);}@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Initialize the detached command buffer and fence independently of the shared pool.
RunDetachedcreatesm_detached_bufferandm_detached_fenceonly whenm_detached_pool == nullptr.SubmitDetached(Lines 444-451) also createsm_detached_pool, but it does not createm_detached_bufferorm_detached_fence.A guest fault takes the async path first by default:
ReadMemoryAttempt→BeginGuestDownload→SubmitDetached. After that, the pool exists and the buffer and fence are still null. A laterRunDetachedcall skips initialization. That call can come fromTryDownloadDetachedon a GPU-thread read or fromBufferCache::MakePageTableResident. It then callsm_detached_buffer.begin(...)on a null handle and submits with a null fence. The result is a crash or a Vulkan error.🐛 Proposed fix
📝 Committable suggestion
@ -347,0 +567,4 @@m_in_before_submit = true;m_before_submit();m_in_before_submit = false;}@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 11100
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 24219
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 5647
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 1868
Guard
RecordHotWriteBacksduring scheduler shutdown.When
CommandScheduler::Shutdown()entersDraining, it callsSubmit(). Ifm_hot_writtenis non-empty,RecordHotWriteBacks()callsDeferOperation(). That call waits forClosed, butShutdown()setsClosedonly afterSubmit()returns. This can deadlock whenRenderContext::ShutdownGpu()skipsFinish()becausem_video_outis null.Suggested fix
@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
On
src/graphics/shader/recompiler/backend/spirv/spirvEmitterAlu.cppline 210 (outdated):🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 9620
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 23179
Restrict the saturated-conversion fold to the
Convert.cppproducer.ConvertSourceSaturatedtreats everySelectF32producer as finite and in range.SelectF32is a generic IR helper, so this check does not prove that the value came from the saturation sequence inConvert.cpp.If another
SelectF32reachesConvertU32F32orConvertS32F32, the emitter uses bareOpConvertFToUorOpConvertFToS. This bypassesEmitF32ToU32, which explicitly handles NaN and out-of-range values. The result can therefore differ from the required clamped conversion.Require provenance from the saturation sequence, or add an IR flag in
Convert.cppand test that flag here.@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
On
src/graphics/shader/recompiler/backend/spirv/spirvEmitterImage.cppline 1291 (outdated):🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Bindless sampling ignores the finite sampler key.
Lines 1229-1239 compute
sampler_indexfrom the finite sampler table. Line 1240 loadssampler_idwith that index. The bindless arm does not usesampler_id. It callsMakeBindlessSampledImage(state, arm.array, loaded_image, mem.sampler), which callsLoadSamplerDescriptor(state, sampler)with no array index. That loads the base sampler slot. A bindless sample whose sampler comes from an indirect sampler table therefore uses the wrong sampler state, such as the wrong filtering, wrapping, or compare settings.Pass the already loaded sampler into the helper. The bindless gather path at line 1135 can keep its current behavior, or it can use the same signature with a sampler loaded once.
Proposed fix
Then change
MakeBindlessSampledImageinspirvEmitterAnalysis.cppto take a sampler id. AddNonUniformwhen the index is dynamic:Update the gather call site to pass
LoadSamplerDescriptor(state, mem.sampler).@ -491,0 +1032,4 @@stub_all();return;}bool failed = false;@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Bail out of call-target preparation when the CFG build is rejected.
BuildGraphno longer terminates on a guest-program rejection. Instead,BuildFailurereturns a graph withunsupported = true, an emptyblockslist, andentry_block = UINT32_MAX.PrepareCallTargetdoes not check this result.Registerthen callsCFG::FindScalarDefinition(source.decoded, graph, ...), which runsEXIT_IF(found == graph.blocks.end())on the empty block list.Trigger: a compute shader has exactly one
S_SWAPPC_B64with valid SGPR pairing and also contains anUNSUPPORTEDinstruction or an invalid branch target. In that case the process still terminates inPrepareShaderSource.TranslateProgramwould have reported the shader asBuildRejected, and the caller would have dropped the draw. This defeats the PR's goal of making CFG rejections non-fatal.When the graph is unsupported, clear the call so that the translator keeps the any-hit stub and the later CFG step reports the rejection:
🛡️ Proposed fix
@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
On
src/graphics/shader/recompiler/ShaderRecompiler.cppline 1344 (outdated):🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 26679
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 19542
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 20591
Clear stale linked state when falling back to the stub.
When
ShaderSourcehas a previous link,RefreshShaderSourcereturnssource.decodedfor failed target evaluation, zero targets, and unlinked leaves. It leavessource.linkedandsource.revisionunchanged.ProgramCache::RefreshCallSourcethen reports no change, so the cache can reuse the previous linked permutation instead of the stub.🐛 Suggested fix
@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
On
src/graphics/shader/shader.cppline 838 (outdated):🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 40521
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 19836
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 7897
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 35179
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 38129
Reject empty vertex parameters before shader compilation.
PrepareProgramlogs the GS assembly failure and returns empty parameters.ProgramCache::Getthen passes the empty code toPrepareShaderSource, which rejects it beforePrepareDrawShaderscan drop the draw.Suggested fix
@ -0,0 +25,4 @@}if (regs.gs_out_prim_type != 2u) {return "unsupported GS output primitive";}@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 15917
Confirm whether native NGG draws should skip the GS output-primitive check.
The native NGG path does not use the GS output registers. The current check can reject native NGG point and line draws because
VGT_GS_OUT_PRIM_TYPEis derived from the draw primitive, while the lowering uses the input primitive to calculate native NGG workgroup counts.🔧 Suggested fix
📝 Committable suggestion
@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original
On
tests/MemoryTrackerTests.cppline 1317 (outdated):🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Allocate the BDA test worlds with the existing fixed-address retry helper.
TestBdaSyncSetMatchesFullWalkasksVirtualAllocfor the exact addresseskBdaBaseFull(0x210000000) andkBdaBaseIncremental(0x220000000). There is no retry. If the host already uses either address, theCheckfails and the test aborts. The other tests in this file useAllocateFixedGuestRange, and its comment states the reason: a fixed address "can be occupied by the host process (notably by the macOS runner's ASLR layout)".The two bases do not have to be fixed constants. The test only needs two separate ranges in one tracker. Allocate both ranges with
AllocateFixedGuestRange, then use the returned addresses asfull.baseandincremental.base. Use those bases in thetaken.ForEachInRangefilters and in the diagnostics in place of the constants.Proposed fix
📝 Committable suggestion
@coderabbitai[bot] on GitHub · 2026-10-13 23:32 UTC · original · reviewed
Actionable comments posted: 12
ℹ️ Review info
⚙️ Run configuration
22ca055a-2cd0-424c-b6d8-398d35eff4f0📥 Commits
Reviewing files that changed from the base of the PR and between
9e41d8320aand d4cd928e991f7c0771bc648e0982c2fb2a8afeaf.📒 Files selected for processing: 213
.github/workflows/build.ymlCMakeLists.txtsrc/common/assert.cppsrc/common/emulatorConfig.cppsrc/common/emulatorConfig.hsrc/common/profiler.cppsrc/common/profiler.hsrc/common/subsystems.cppsrc/common/threads.cppsrc/common/threads.hsrc/graphics/guest_gpu/command_processor/commandProcessor.hsrc/graphics/guest_gpu/command_processor/pm4Handlers.cppsrc/graphics/guest_gpu/graphicsRun.cppsrc/graphics/guest_gpu/graphicsRun.hsrc/graphics/guest_gpu/hardwareContext.hsrc/graphics/guest_gpu/pm4.hsrc/graphics/guest_gpu/tile.cppsrc/graphics/host_gpu/bdaSyncSet.hsrc/graphics/host_gpu/graphicContext.hsrc/graphics/host_gpu/memoryHeadroom.hsrc/graphics/host_gpu/memoryTracker.cppsrc/graphics/host_gpu/memoryTracker.hsrc/graphics/host_gpu/pageManager.cppsrc/graphics/host_gpu/pageManager.hsrc/graphics/host_gpu/renderer/bindingEpoch.hsrc/graphics/host_gpu/renderer/cache/bindlessTranslation.cppsrc/graphics/host_gpu/renderer/cache/bindlessTranslation.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/faultManager.hsrc/graphics/host_gpu/renderer/cache/indirectKeyFeedback.cppsrc/graphics/host_gpu/renderer/cache/indirectKeyFeedback.hsrc/graphics/host_gpu/renderer/cache/pageDiff.cppsrc/graphics/host_gpu/renderer/cache/pageDiff.hsrc/graphics/host_gpu/renderer/cache/streamBuffer.cppsrc/graphics/host_gpu/renderer/cache/streamBuffer.hsrc/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/debug.cppsrc/graphics/host_gpu/renderer/depthRenderTarget.cppsrc/graphics/host_gpu/renderer/depthRenderTarget.hsrc/graphics/host_gpu/renderer/dispatchGuard.hsrc/graphics/host_gpu/renderer/dispatchHazard.hsrc/graphics/host_gpu/renderer/image/blitHelper.cppsrc/graphics/host_gpu/renderer/image/colorClearHelper.cppsrc/graphics/host_gpu/renderer/image/colorClearHelper.hsrc/graphics/host_gpu/renderer/image/image.cppsrc/graphics/host_gpu/renderer/image/image.hsrc/graphics/host_gpu/renderer/image/imageInfo.cppsrc/graphics/host_gpu/renderer/image/imageInfo.hsrc/graphics/host_gpu/renderer/image/imageView.cppsrc/graphics/host_gpu/renderer/image/imageView.hsrc/graphics/host_gpu/renderer/image/textureCommon.cppsrc/graphics/host_gpu/renderer/image/textureCommon.hsrc/graphics/host_gpu/renderer/image/tiler.cppsrc/graphics/host_gpu/renderer/image/tiler.hsrc/graphics/host_gpu/renderer/masterSemaphore.cppsrc/graphics/host_gpu/renderer/pipeline/bindlessImageHeap.cppsrc/graphics/host_gpu/renderer/pipeline/bindlessImageHeap.hsrc/graphics/host_gpu/renderer/pipeline/descriptorHeap.cppsrc/graphics/host_gpu/renderer/pipeline/descriptors.cppsrc/graphics/host_gpu/renderer/pipeline/descriptors.hsrc/graphics/host_gpu/renderer/pipeline/pipelineCache.cppsrc/graphics/host_gpu/renderer/pipeline/pipelineCache.hsrc/graphics/host_gpu/renderer/pipeline/shaderReadCache.hsrc/graphics/host_gpu/renderer/pipeline/shaderResourceBarrier.cppsrc/graphics/host_gpu/renderer/pipeline/shaderResourceBarrier.hsrc/graphics/host_gpu/renderer/pipeline/shaders.cppsrc/graphics/host_gpu/renderer/pipeline/unfoldableSet.hsrc/graphics/host_gpu/renderer/refusalReport.hsrc/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/renderer/renderTarget.hsrc/graphics/host_gpu/renderer/threadDispatch.cppsrc/graphics/host_gpu/renderer/threadDispatch.hsrc/graphics/host_gpu/shaders/fault_buffer_process.compsrc/graphics/host_gpu/shaders/gpu_color_clear.fragsrc/graphics/host_gpu/shaders/gpu_color_clear_classify.compsrc/graphics/host_gpu/shaders/gpu_color_clear_sint.fragsrc/graphics/host_gpu/shaders/gpu_color_clear_uint.fragsrc/graphics/host_gpu/shaders/gpu_dispatch_threads.compsrc/graphics/host_gpu/shaders/gpu_page_diff.compsrc/graphics/host_gpu/vma.cppsrc/graphics/presentation/renderDoc.cppsrc/graphics/presentation/systemOverlay.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/SpirvDriverSimplify.cppsrc/graphics/shader/recompiler/backend/spirv/SpirvDriverSimplify.hsrc/graphics/shader/recompiler/backend/spirv/SpirvEmitter.cppsrc/graphics/shader/recompiler/backend/spirv/SpirvEmitter.hsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterAlu.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterAluHelpers.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterAnalysis.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterFlow.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterImage.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/spirvEmitterMesh.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterModule.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterProgram.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterTessellation.cppsrc/graphics/shader/recompiler/frontend/cfg/ShaderCFG.cppsrc/graphics/shader/recompiler/frontend/cfg/ShaderCFG.hsrc/graphics/shader/recompiler/frontend/decode/ImageOps.cppsrc/graphics/shader/recompiler/frontend/decode/ImageOps.hsrc/graphics/shader/recompiler/frontend/decode/MemoryOps.cppsrc/graphics/shader/recompiler/frontend/decode/ScalarAluOps.cppsrc/graphics/shader/recompiler/frontend/decode/ShaderDecoder.cppsrc/graphics/shader/recompiler/frontend/decode/ShaderDecoder.hsrc/graphics/shader/recompiler/frontend/decode/VectorAluOps.cppsrc/graphics/shader/recompiler/frontend/translate/Control.cppsrc/graphics/shader/recompiler/frontend/translate/Integer.cppsrc/graphics/shader/recompiler/frontend/translate/Memory.cppsrc/graphics/shader/recompiler/frontend/translate/Scalar.cppsrc/graphics/shader/recompiler/frontend/translate/Translate.cppsrc/graphics/shader/recompiler/frontend/translate/Translate.hsrc/graphics/shader/recompiler/frontend/translate/Translator.hsrc/graphics/shader/recompiler/ir/Program.cppsrc/graphics/shader/recompiler/ir/ResourceSnapshot.hsrc/graphics/shader/recompiler/ir/ShaderIR.hsrc/graphics/shader/recompiler/ir/Value.cppsrc/graphics/shader/recompiler/ir/Value.hsrc/graphics/shader/recompiler/ir/opcodes/ValueOpcodes.cppsrc/graphics/shader/recompiler/ir/opcodes/ValueOpcodes.incsrc/graphics/shader/recompiler/ir/passes/ConstantPropagation.cppsrc/graphics/shader/recompiler/ir/passes/DeadLaneMasks.cppsrc/graphics/shader/recompiler/ir/passes/DeadLaneMasks.hsrc/graphics/shader/recompiler/ir/passes/IndexRangeFold.cppsrc/graphics/shader/recompiler/ir/passes/IndexRangeFold.hsrc/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cppsrc/graphics/shader/recompiler/ir/passes/ResourceMaterialization.hsrc/graphics/shader/recompiler/ir/passes/ResourceMaterializationMemo.cppsrc/graphics/shader/recompiler/ir/passes/ResourceMaterializationMemo.hsrc/graphics/shader/recompiler/ir/passes/ResourceTracking.cppsrc/graphics/shader/recompiler/ir/passes/ResourceTracking.hsrc/graphics/shader/recompiler/ir/passes/ShaderInfoCollection.cppsrc/graphics/shader/recompiler/ir/passes/SrtWalker.cppsrc/graphics/shader/recompiler/ir/passes/SrtWalker.hsrc/graphics/shader/rectListShader.cppsrc/graphics/shader/shader.cppsrc/graphics/shader/shader.hsrc/graphics/shader/shaderGsAssembly.cppsrc/graphics/shader/shaderGsAssembly.hsrc/graphics/shader/shaderPixelParameter.cppsrc/kernel/eventFlag.cppsrc/kernel/eventQueue.cppsrc/kernel/fileSystem.cppsrc/kernel/memory.cppsrc/kernel/memory.hsrc/kernel/memoryAddressSpace.incsrc/kernel/pthread.cppsrc/kernel/semaphore.cppsrc/kernel/umtx.cppsrc/kernel/umtx.hsrc/libs/agc.cppsrc/libs/ajm.cppsrc/libs/ajm/atrac9_decoder.hsrc/libs/audio.cppsrc/libs/audio.hsrc/libs/audio_internal.hsrc/libs/dialog.cppsrc/libs/dialog.hsrc/libs/dualSenseHaptics.hsrc/libs/libAmpr.cppsrc/libs/libAudio.cppsrc/libs/libAudio2.cppsrc/libs/libConvertKeycode.cppsrc/libs/libDebug.cppsrc/libs/libKernel.cppsrc/libs/libNet.cppsrc/libs/libSaveData.cppsrc/libs/libVideoOut.cppsrc/loader/guestInstructionPatcher.cppsrc/loader/guestInstructionPatcher.hsrc/loader/runtimeLinker.cppsrc/main.cpptests/AjmInstanceTests.cpptests/AudioOut2PortTests.cpptests/AudioOutTimingTests.cpptests/KernelFileSystemTests.cpptests/MemoryTrackerTests.cpptests/Ngs2SamplerTests.cpptests/PageManagerTests.cpptests/ResourceMaterializationTests.cpptests/ResourceTrackingTests.cpptests/SaveDataDialogTests.cpptests/SaveDataMemoryTests.cpptests/ScalarProvenanceTests.cpptests/ShaderRayTracingGpuTests.inctests/ShaderRayTracingTests.inctests/ShaderRecompilerComputeTests.cpptests/ShaderVertexMetadataTests.cpptests/UmtxTests.cpptests/UnfoldableRebuildTests.cpptests/UnresolvedImportRegistrationTests.cpptests/VirtualMemoryAllocationTests.cpptests/VramHeadroomTests.cpptests/shaderCfgTests.cpp💤 Files with no reviewable changes: 1
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
@shadowbeat070 on GitHub · 2026-10-13 23:32 UTC · original
@shadowbeat070 on GitHub · 2026-10-13 23:36 UTC · original
@shadowbeat070 on GitHub · 2026-10-13 23:40 UTC · original
@shadowbeat070 on GitHub · 2026-10-13 23:42 UTC · original
@shadowbeat070 on GitHub · 2026-10-13 23:42 UTC · original
@JurreBrandsenInfoSupport on GitHub · 2026-10-14 14:00 UTC · original · approved these changes
@fozter on GitHub · 2026-10-14 16:35 UTC · original · edited 2026-10-15 13:15 UTC
Seem to have worked for #1101 aswell
Before/after:
Edit:
github.com/KytyPS5/KytyPS5@0643f0754dis what solves it@gandalfthewhite19890404 on GitHub · 2026-10-14 16:36 UTC · original
RE2 PPSA04228 1.000.003 does not booting for me:
using !1495 (commit
d4cd928e99)@shadowbeat070 on GitHub · 2026-10-14 18:58 UTC · original
What hardware are you using?
@gandalfthewhite19890404 on GitHub · 2026-10-14 19:05 UTC · original
Intel 10400, NVIDIA 2070
@shadowbeat070 on GitHub · 2026-10-14 19:27 UTC · original
what are your driver versions?
@gandalfthewhite19890404 on GitHub · 2026-10-14 19:41 UTC · original
580.88
@shadowbeat070 on GitHub · 2026-10-14 19:48 UTC · original
Is it possible for you to install the latest game ready drivers and then try again?
@gandalfthewhite19890404 on GitHub · 2026-10-15 02:29 UTC · original
Thank you very much! Fixed now
@shadowbeat070 on GitHub · 2026-10-17 02:12 UTC · original
With the 10 follow up commits we now reach in silent hill townfall and dead space in game






@coderabbitai[bot] on GitHub · 2026-10-17 02:20 UTC · original
On
src/graphics/host_gpu/renderer/renderCompute.cppline 851 (outdated):🚀 Performance & Scalability | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 10102
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 17104
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 7784
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 13670
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 3081
Preserve the guest workgroup count in the ordered-append path.
dispatchBase(x, y, z, 1, 1, 1)makesNumWorkgroupsequal to1, 1, 1. A shader that uses both GDS and storage-buffer LDS can therefore calculate its LDS base from the wrong grid dimensions.uses_gdsanduses_ldsare tracked independently.Use a mechanism that preserves the original
NumWorkgroupsvalue while retaining ordered launch order. Do not assume thatWorkgroupIdalone is sufficient.The split also records one dispatch and one
ShaderAccessBarrierper workgroup.PlanComputeDispatchchecks only per-axis limits, so an otherwise valid dispatch can still create a very large serialized command sequence. Add a bounded fallback or another implementation that preserves ordering without recording one full dispatch per workgroup.@ -509,0 +614,4 @@break;}targets.push_back(static_cast<uintptr_t>(target));}@coderabbitai[bot] on GitHub · 2026-10-17 02:20 UTC · original
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
ScanJumpTableTargetscan miss real targets and still report them as bounded.DecodeFunctiontreats this result as a complete superset of the table's targets. If the result is not empty, it setsindirect_targets_bounded.RelocateGuestInstructionsthen allows neighbor relocation and short-jump fallback for the function. The current scan does not guarantee a superset in two cases:[function_start, function_end).function_endis the next discovered start, which can be a call target, a code pointer, or a padding start. If that start splits a real function, some case targets land beyondfunction_end. The scan then stops before later entries that land back inside the function. Those later targets are never recorded. A relocation span can then cover one of them, and the guest jumps into the middle of the patchedjmp/nopbytes.MOVSXDdestination istarget_reg.ResolveBoundedJumpTablechecks this. Without the check, an unrelated load can match the pattern and produce a wrong set of "bounded" targets.A larger target set only reduces relocation, so over-approximation is the safe direction. Skip out-of-range entries instead of stopping at them, and add the destination check.
🛠️ Proposed fix
@coderabbitai[bot] on GitHub · 2026-10-17 02:20 UTC · original · reviewed
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
9d3ea41a-1901-4076-9f01-756cee674ece📥 Commits
Reviewing files that changed from the base of the PR and between d4cd928e991f7c0771bc648e0982c2fb2a8afeaf and 3d194c1b5178b6c1d22f09af57c0946175d09d3d.
📒 Files selected for processing: 17
src/graphics/guest_gpu/pm4.hsrc/graphics/host_gpu/renderer/cache/textureCache.cppsrc/graphics/host_gpu/renderer/colorRenderTarget.cppsrc/graphics/host_gpu/renderer/image/imageInfo.hsrc/graphics/host_gpu/renderer/pipeline/descriptors.cppsrc/graphics/host_gpu/renderer/pipeline/shaders.cppsrc/graphics/host_gpu/renderer/renderCompute.cppsrc/graphics/host_gpu/renderer/renderContext.cppsrc/graphics/host_gpu/renderer/renderContext.hsrc/graphics/shader/shaderGsAssembly.cppsrc/kernel/pthread.cppsrc/loader/guestInstructionPatcher.cppsrc/loader/guestInstructionPatcher.htests/ShaderRecompilerComputeTests.cpptests/ShaderVertexMetadataTests.cpptests/VirtualMemoryAllocationTests.cpptests/shaderCfgTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
@ -397,0 +414,4 @@if (m_merge_pending.exchange(false, std::memory_order_acq_rel)) {m_gfx_cp->BufferFlush();}}@coderabbitai[bot] on GitHub · 2026-10-17 21:28 UTC · original
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 12426
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 9887
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 5180
Keep
m_processingtrue until merged flushing finishes.FlushMergedSubmissions()clearsm_merge_pendingbeforeCommandScheduler::Flush()runs. In the first merge path,m_processingcan already be false. A concurrentWaitForIdle()can then observe no pending work and return before the flush completes.Set
m_processingbefore each unlock and clear it only after the flush.Suggested fix
@ -749,0 +943,4 @@} else {// Too many pieces to keep exactly: forget them, which only ever claims less.m_superseded_since_gpu_write.clear();}@coderabbitai[bot] on GitHub · 2026-10-17 21:28 UTC · original
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 7259
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 20916
Stop recording post-GPU-write ranges after overflow.
When
Image::Supersede()clearsm_superseded_since_gpu_writeatMaxRanges, a later call can insert a new range.TextureCache::SupersededAliasCanSync()then accepts the non-empty list, andSyncLayoutAlias()copies only those later ranges. The omitted ranges can remain unmarked, which can allow stale bytes to overwrite newer guest-buffer data.Add an overflow flag. Reset it in
MarkGpuModified(),MarkBufferModified(), andClearSuperseded(). Skip range insertion while the flag is set.Suggested fix
Apply the reset to all three existing clear paths, and add
bool m_superseded_since_gpu_write_overflow = false;beside the range vector.@coderabbitai[bot] on GitHub · 2026-10-17 21:28 UTC · original · reviewed
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
27da1373-19f0-41ef-bb24-a027c9fd55b4📥 Commits
Reviewing files that changed from the base of the PR and between 3d194c1b5178b6c1d22f09af57c0946175d09d3d and 8ab50452e5d0c9ae93e9db7da74738c9449ed231.
📒 Files selected for processing: 19
CMakeLists.txtsrc/graphics/guest_gpu/graphicsRun.cppsrc/graphics/guest_gpu/graphicsRun.hsrc/graphics/host_gpu/renderer/cache/bufferCache.cppsrc/graphics/host_gpu/renderer/cache/bufferCache.hsrc/graphics/host_gpu/renderer/cache/streamBuffer.hsrc/graphics/host_gpu/renderer/cache/textureCache.cppsrc/graphics/host_gpu/renderer/cache/textureCache.hsrc/graphics/host_gpu/renderer/image/image.cppsrc/graphics/host_gpu/renderer/image/image.hsrc/graphics/host_gpu/renderer/image/imageInfo.cppsrc/graphics/host_gpu/renderer/image/imageInfo.hsrc/graphics/host_gpu/renderer/pipeline/descriptors.cppsrc/graphics/shader/recompiler/ir/passes/ResourceMaterializationMemo.cppsrc/graphics/shader/recompiler/ir/passes/ResourceMaterializationMemo.htests/ImageLayoutMemoTests.inctests/RegionQueryMemoTests.inctests/ResourceMaterializationTests.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.
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.