Fixes for The Last of Us Part I #1899

Open
github-bot wants to merge 48 commits from github-bot/gh-1899 into main AGit
Owner

@⁠claxten10 on GitHub · 2026-10-25 16:51 UTC · original
claxten10:tlou-p1 → main · +7564 −1010 · 78 files · 48 commits · open

Summary

With this PR, many changes and fixes have been added, and now 'The Last of Us Part I' (PPSA03396 / PPSA07642) successfully boots and reaches the main menu.

Status

  • The Last of Us Part I (PPSA03396 / PPSA07642):
    • Boots and renders the main menu.
    • Runs at ~2 fps nearly always, the only exception is during the Sony intro, which runs at 60fps (tested on RX 7600 + i3-14100F).
    • Known issues: Starting a new game progresses far, but cannot enter gameplay yet.

Additional info

  • Only tested on Linux (Fedora 45, 7.2.8-300.fc45.x86_64), other platforms should work fine too.
  • The following games have been tested for regressions, and none have been spotted:
    • Resident Evil 2 Remake
    • Resident Evil 8 MAIDEN Demo
    • Visage
    • Kena Bridge of Spirits

Screenshots

image image image image image
**@⁠claxten10** on GitHub · 2026-10-25 16:51 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1899) `claxten10:tlou-p1` → `main` · +7564 −1010 · 78 files · 48 commits · open ### Summary With this PR, many changes and fixes have been added, and now 'The Last of Us Part I' (PPSA03396 / PPSA07642) successfully boots and reaches the main menu. ### Status - **The Last of Us Part I (PPSA03396 / PPSA07642)**: - Boots and renders the main menu. - Runs at ~2 fps nearly always, the only exception is during the Sony intro, which runs at 60fps (tested on RX 7600 + i3-14100F). - **Known issues**: Starting a new game progresses far, but cannot enter gameplay yet. ### Additional info - Only tested on Linux (Fedora 45, 7.2.8-300.fc45.x86_64), other platforms should work fine too. - The following games have been tested for regressions, and none have been spotted: * Resident Evil 2 Remake * Resident Evil 8 MAIDEN Demo * Visage * Kena Bridge of Spirits ### Screenshots <img width="1278" height="756" alt="image" src="https://github.com/user-attachments/assets/40c74442-342e-461b-a23b-da1880affb1b" /> <img width="1278" height="756" alt="image" src="https://github.com/user-attachments/assets/e4304339-bcd6-4b20-a266-dc3fd1d146aa" /> <img width="1278" height="756" alt="image" src="https://github.com/user-attachments/assets/b6df05cc-2363-4125-ba1d-548cfad0818e" /> <img width="1270" height="754" alt="image" src="https://github.com/user-attachments/assets/70c70287-71b8-4ffc-84d7-861d2693d7d5" /> <img width="1269" height="747" alt="image" src="https://github.com/user-attachments/assets/326dd12d-55c5-45c6-850c-b2625e1a40a5" />
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Assisted-by: codex:gpt-6-astra
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Prevent TryConsumeComputeMetaClear from swallowing unrelated compute buffer clears when guest memory at a former HTile base address is reused for a larger resource (such as the OIT spinlock image in The Last of Us Part I, where skipping the zero-clear causes an infinite atomic spinlock GPU hang).

Fixes: 2c730e58ea ("revert HTile lifetime changes and opt-in ZMask support")
Fixes: 05d25ef28c ("revert 01ce97388: restore compute metadata clear consumption")
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Assisted-by: antigravity:gemini-4-argon
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
Signed-off-by: Claxten <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:08:24 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-25 17:05 UTC · original

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 83f8bfd3c9 and 2b62488a2f.

Files selected for processing: 78
  • CMakeLists.txt
  • src/graphics/guest_gpu/command_processor/commandProcessor.h
  • src/graphics/guest_gpu/command_processor/pm4Dispatch.cpp
  • src/graphics/guest_gpu/command_processor/pm4Dispatch.h
  • src/graphics/guest_gpu/command_processor/pm4Handlers.cpp
  • src/graphics/guest_gpu/gpu_defs.h
  • src/graphics/guest_gpu/graphicsRun.cpp
  • src/graphics/host_gpu/pageManager.cpp
  • src/graphics/host_gpu/pageManager.h
  • src/graphics/host_gpu/renderer/cache/bufferCache.cpp
  • src/graphics/host_gpu/renderer/cache/bufferCache.h
  • src/graphics/host_gpu/renderer/cache/textureCache.cpp
  • src/graphics/host_gpu/renderer/cache/textureCache.h
  • src/graphics/host_gpu/renderer/colorRenderTarget.cpp
  • src/graphics/host_gpu/renderer/commandScheduler.cpp
  • src/graphics/host_gpu/renderer/depthRenderTarget.cpp
  • src/graphics/host_gpu/renderer/image/imageInfo.cpp
  • src/graphics/host_gpu/renderer/image/imageInfo.h
  • src/graphics/host_gpu/renderer/image/textureCommon.cpp
  • src/graphics/host_gpu/renderer/image/textureCommon.h
  • src/graphics/host_gpu/renderer/image/tiler.cpp
  • src/graphics/host_gpu/renderer/image/tiler.h
  • src/graphics/host_gpu/renderer/pipeline/descriptorHeap.cpp
  • src/graphics/host_gpu/renderer/pipeline/descriptorHeap.h
  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp
  • src/graphics/host_gpu/renderer/pipeline/imageHeap.cpp
  • src/graphics/host_gpu/renderer/pipeline/imageHeap.h
  • src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp
  • src/graphics/host_gpu/renderer/pipeline/pipelineCache.h
  • src/graphics/host_gpu/renderer/pipeline/shaders.cpp
  • src/graphics/host_gpu/renderer/renderCompute.cpp
  • src/graphics/host_gpu/renderer/renderContext.cpp
  • src/graphics/host_gpu/renderer/renderContext.h
  • src/graphics/host_gpu/shaders/gpu_tiler_common.inc
  • src/graphics/host_gpu/shaders/gpu_tiler_prt.comp
  • src/graphics/host_gpu/shaders/gpu_tiler_prt_3d.comp
  • src/graphics/host_gpu/shaders/gpu_tiler_standard64_3d.inc
  • src/graphics/presentation/videoOut.cpp
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterAnalysis.cpp
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterFlow.cpp
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterImage.cpp
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterInstructions.h
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterMemory.cpp
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterMemoryHelpers.cpp
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterModule.cpp
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterProgram.cpp
  • src/graphics/shader/recompiler/frontend/decode/MemoryOps.cpp
  • src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.cpp
  • src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.h
  • src/graphics/shader/recompiler/frontend/translate/Memory.cpp
  • src/graphics/shader/recompiler/frontend/translate/Translate.cpp
  • src/graphics/shader/recompiler/ir/Program.cpp
  • src/graphics/shader/recompiler/ir/Serialize.h
  • src/graphics/shader/recompiler/ir/ShaderIR.h
  • src/graphics/shader/recompiler/ir/opcodes/ValueOpcodes.cpp
  • src/graphics/shader/recompiler/ir/opcodes/ValueOpcodes.inc
  • src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp
  • src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.h
  • src/graphics/shader/recompiler/ir/passes/ResourceTracking.cpp
  • src/graphics/shader/recompiler/ir/passes/ShaderInfoCollection.cpp
  • src/graphics/shader/recompiler/ir/passes/SrtWalker.cpp
  • src/graphics/shader/recompiler/ir/passes/SrtWalker.h
  • src/graphics/shader/shaderBindings.h
  • src/kernel/memory.cpp
  • src/kernel/memory.h
  • src/libs/agc.cpp
  • src/libs/agc.h
  • src/libs/libAgcDriver.cpp
  • src/libs/libKernel.cpp
  • src/libs/libSystemService.cpp
  • src/libs/libTextToSpeech2.cpp
  • tests/PageManagerTests.cpp
  • tests/ResourceMaterializationTests.cpp
  • tests/ResourceTrackingTests.cpp
  • tests/ScalarProvenanceTests.cpp
  • tests/ShaderRecompilerComputeTests.cpp
  • tests/VirtualMemoryAllocationTests.cpp
  • tests/shaderCfgTests.cpp

Included 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 changes update GPU command processing, memory permissions, buffer downloads, texture handling, descriptor allocation, and shader compilation. They add PM4 memory-semaphore support and end-of-pipe synchronization. They also expand resource analysis and SPIR-V emission, change guest-memory backing and protection handling, and add library functions and tests.

Suggested reviewers: nmzik, senaxx

Priority: Normal

Change: Bug fix

Merge Risk: Minimal · up to 2b624

No concrete merge-blocking defect was established in this change. The author's reported limits stand: the game runs at about 2 fps in the main menu and does not yet reach gameplay. Normal testing of the affected rendering and memory paths is still advisable before merge.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 5.85% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 171 functions across 50 files. (26 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title "Fixes for The Last of Us Part I" names the game the PR targets, which matches the PR objectives. It is broad, though. The changeset covers many subsystems (GPU synchronization, shader recom…
Description check Passed The description states that the PR lets The Last of Us Part I (PPSA03396 / PPSA07642) boot and reach the main menu. It reports the current performance (about 2 fps, with a 60 fps Sony intro) and the k…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Fixes for The Last of Us Part I" names the game the PR targets, which matches the PR objectives. It is broad, though. The changeset covers many subsystems (GPU synchronization, shader recompiler, page management, memory allocation, descriptors, kernel stubs), and the title does not name the primary technical change. It is therefore partially related: it refers to a real aspect of the work but does not summarize the main change.

Full details: Description check

Explanation

The description states that the PR lets The Last of Us Part I (PPSA03396 / PPSA07642) boot and reach the main menu. It reports the current performance (about 2 fps, with a 60 fps Sony intro) and the known gameplay issue. It also lists the Linux test environment and regression-tested games. These points relate directly to the changeset's graphics, shader, memory, and kernel work.

Full details: Docstring Coverage

Explanation

Docstring coverage is 5.85% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 171 functions across 50 files. (26 skipped: 6 unsupported, 20 over the file limit.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Cppcheck (2.22.0)
tests/shaderCfgTests.cpp

Cppcheck timed out; analysis of this file is incomplete

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 help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-25 17:05 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1899#issuecomment-6400568195) <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1899?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3" alt="Review in Change Stack →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. <details> <summary><strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Recent review info</strong></summary> <dl> <dd> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary> <dl> <dd> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/83f8bfd3c9c35fcb135ef6c33dfd88bbfe066ee2/.coderabbit.yaml>) - **Commit**: [83f8bfd](<https://github.com/KytyPS5/KytyPS5/commit/83f8bfd3c9c35fcb135ef6c33dfd88bbfe066ee2>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `077a4139-1487-4b1f-b151-8e3449959294` </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</strong></summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 83f8bfd3c9c35fcb135ef6c33dfd88bbfe066ee2 and 2b62488a2fc17620ceb4a822090ff7f5ebba2c9f. </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 78</strong></summary> <dl> <dd> * `CMakeLists.txt` * `src/graphics/guest_gpu/command_processor/commandProcessor.h` * `src/graphics/guest_gpu/command_processor/pm4Dispatch.cpp` * `src/graphics/guest_gpu/command_processor/pm4Dispatch.h` * `src/graphics/guest_gpu/command_processor/pm4Handlers.cpp` * `src/graphics/guest_gpu/gpu_defs.h` * `src/graphics/guest_gpu/graphicsRun.cpp` * `src/graphics/host_gpu/pageManager.cpp` * `src/graphics/host_gpu/pageManager.h` * `src/graphics/host_gpu/renderer/cache/bufferCache.cpp` * `src/graphics/host_gpu/renderer/cache/bufferCache.h` * `src/graphics/host_gpu/renderer/cache/textureCache.cpp` * `src/graphics/host_gpu/renderer/cache/textureCache.h` * `src/graphics/host_gpu/renderer/colorRenderTarget.cpp` * `src/graphics/host_gpu/renderer/commandScheduler.cpp` * `src/graphics/host_gpu/renderer/depthRenderTarget.cpp` * `src/graphics/host_gpu/renderer/image/imageInfo.cpp` * `src/graphics/host_gpu/renderer/image/imageInfo.h` * `src/graphics/host_gpu/renderer/image/textureCommon.cpp` * `src/graphics/host_gpu/renderer/image/textureCommon.h` * `src/graphics/host_gpu/renderer/image/tiler.cpp` * `src/graphics/host_gpu/renderer/image/tiler.h` * `src/graphics/host_gpu/renderer/pipeline/descriptorHeap.cpp` * `src/graphics/host_gpu/renderer/pipeline/descriptorHeap.h` * `src/graphics/host_gpu/renderer/pipeline/descriptors.cpp` * `src/graphics/host_gpu/renderer/pipeline/imageHeap.cpp` * `src/graphics/host_gpu/renderer/pipeline/imageHeap.h` * `src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp` * `src/graphics/host_gpu/renderer/pipeline/pipelineCache.h` * `src/graphics/host_gpu/renderer/pipeline/shaders.cpp` * `src/graphics/host_gpu/renderer/renderCompute.cpp` * `src/graphics/host_gpu/renderer/renderContext.cpp` * `src/graphics/host_gpu/renderer/renderContext.h` * `src/graphics/host_gpu/shaders/gpu_tiler_common.inc` * `src/graphics/host_gpu/shaders/gpu_tiler_prt.comp` * `src/graphics/host_gpu/shaders/gpu_tiler_prt_3d.comp` * `src/graphics/host_gpu/shaders/gpu_tiler_standard64_3d.inc` * `src/graphics/presentation/videoOut.cpp` * `src/graphics/shader/recompiler/backend/spirv/spirvEmitterAnalysis.cpp` * `src/graphics/shader/recompiler/backend/spirv/spirvEmitterFlow.cpp` * `src/graphics/shader/recompiler/backend/spirv/spirvEmitterImage.cpp` * `src/graphics/shader/recompiler/backend/spirv/spirvEmitterInstructions.h` * `src/graphics/shader/recompiler/backend/spirv/spirvEmitterMemory.cpp` * `src/graphics/shader/recompiler/backend/spirv/spirvEmitterMemoryHelpers.cpp` * `src/graphics/shader/recompiler/backend/spirv/spirvEmitterModule.cpp` * `src/graphics/shader/recompiler/backend/spirv/spirvEmitterProgram.cpp` * `src/graphics/shader/recompiler/frontend/decode/MemoryOps.cpp` * `src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.cpp` * `src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.h` * `src/graphics/shader/recompiler/frontend/translate/Memory.cpp` * `src/graphics/shader/recompiler/frontend/translate/Translate.cpp` * `src/graphics/shader/recompiler/ir/Program.cpp` * `src/graphics/shader/recompiler/ir/Serialize.h` * `src/graphics/shader/recompiler/ir/ShaderIR.h` * `src/graphics/shader/recompiler/ir/opcodes/ValueOpcodes.cpp` * `src/graphics/shader/recompiler/ir/opcodes/ValueOpcodes.inc` * `src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp` * `src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.h` * `src/graphics/shader/recompiler/ir/passes/ResourceTracking.cpp` * `src/graphics/shader/recompiler/ir/passes/ShaderInfoCollection.cpp` * `src/graphics/shader/recompiler/ir/passes/SrtWalker.cpp` * `src/graphics/shader/recompiler/ir/passes/SrtWalker.h` * `src/graphics/shader/shaderBindings.h` * `src/kernel/memory.cpp` * `src/kernel/memory.h` * `src/libs/agc.cpp` * `src/libs/agc.h` * `src/libs/libAgcDriver.cpp` * `src/libs/libKernel.cpp` * `src/libs/libSystemService.cpp` * `src/libs/libTextToSpeech2.cpp` * `tests/PageManagerTests.cpp` * `tests/ResourceMaterializationTests.cpp` * `tests/ResourceTrackingTests.cpp` * `tests/ScalarProvenanceTests.cpp` * `tests/ShaderRecompilerComputeTests.cpp` * `tests/VirtualMemoryAllocationTests.cpp` * `tests/shaderCfgTests.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. </dd> </dl> </details> <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> The changes update GPU command processing, memory permissions, buffer downloads, texture handling, descriptor allocation, and shader compilation. They add PM4 memory-semaphore support and end-of-pipe synchronization. They also expand resource analysis and SPIR-V emission, change guest-memory backing and protection handling, and add library functions and tests. **Suggested reviewers:** `nmzik`, `senaxx` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <strong>Priority: <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/priority-normal-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Normal</strong> <!-- change_assessment_commit:"2b62488a2fc17620ceb4a822090ff7f5ebba2c9f" --> **Change:** Bug fix <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-unassessed-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minimal</strong> · up to <code>2b624</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `2b624` --> <!-- final_review_risk_coverage:{"sourceCommitId":"2b62488a2fc17620ceb4a822090ff7f5ebba2c9f","coveredCommitId":"2b62488a2fc17620ceb4a822090ff7f5ebba2c9f","kind":"reviewed"} --> No concrete merge-blocking defect was established in this change. The author's reported limits stand: the game runs at about 2 fps in the main menu and does not yet reach gameplay. Normal testing of the affected rendering and memory paths is still advisable before merge. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4 · <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-inconclusive-14-v2.svg" width="14" height="14" align="middle" alt="Inconclusive" title="Inconclusive"></picture></sup> 1</strong></summary> <dl> <dd> <strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> Failed checks: 1 inconclusive</strong> | Check name | Status | Explanation | Resolution | | :---------------- | :--------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Inconclusive](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-inconclusive.svg) | Docstring coverage is 5.85% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 171 functions across 50 files. (26 skipped… | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> Passed checks: 4 passed</strong></summary> <dl> <dd> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title "Fixes for The Last of Us Part I" names the game the PR targets, which matches the PR objectives. It is broad, though. The changeset covers many subsystems (GPU synchronization, shader recom… | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description states that the PR lets The Last of Us Part I (PPSA03396 / PPSA07642) boot and reach the main menu. It reports the current performance (about 2 fps, with a 60 fps Sony intro) and the k… | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | <details> <summary><strong>Full details: Title check</strong></summary> <dl> <dd> **Explanation** The title "Fixes for The Last of Us Part I" names the game the PR targets, which matches the PR objectives. It is broad, though. The changeset covers many subsystems (GPU synchronization, shader recompiler, page management, memory allocation, descriptors, kernel stubs), and the title does not name the primary technical change. It is therefore partially related: it refers to a real aspect of the work but does not summarize the main change. </dd> </dl> </details> <details> <summary><strong>Full details: Description check</strong></summary> <dl> <dd> **Explanation** The description states that the PR lets The Last of Us Part I (PPSA03396 / PPSA07642) boot and reach the main menu. It reports the current performance (about 2 fps, with a 60 fps Sony intro) and the known gameplay issue. It also lists the Linux test environment and regression-tested games. These points relate directly to the changeset's graphics, shader, memory, and kernel work. </dd> </dl> </details> </dd> </dl> </details> <details> <summary><strong>Full details: Docstring Coverage</strong></summary> <dl> <dd> **Explanation** Docstring coverage is 5.85% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 171 functions across 50 files. (26 skipped: 6 unsupported, 20 over the file limit.) **Resolution** Write docstrings for the functions missing them to satisfy the coverage threshold. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- This is an auto-generated comment: all tool run failures by coderabbit.ai --> > [!WARNING] > Some tools did not complete. Review the errors below. > > <details> > <summary><strong>🔧 Cppcheck (2.22.0)</strong></summary> > <dl> > <dd> > > <details> > <summary><strong>tests/shaderCfgTests.cpp</strong></summary> > <dl> > <dd> > > Cppcheck timed out; analysis of this file is incomplete > > </dd> > </dl> > </details> > > </dd> > </dl> > </details> <!-- end of auto-generated comment: all tool run failures by coderabbit.ai --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1899)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>❤️ Share</strong></summary> <dl> <dd> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠Ekt0re on GitHub · 2026-10-26 12:42 UTC · original

Hi, these seem like some really interesting changes, and the fact that TLOU Part 1 launches is awesome! It would be interesting to test TLOU Part 2 as well. (Since the two games have a lot in common, and if the first one gets to the menu, the second one probably will too.)

**@⁠Ekt0re** on GitHub · 2026-10-26 12:42 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1899#issuecomment-6416262313) Hi, these seem like some really interesting changes, and the fact that TLOU Part 1 launches is awesome! It would be interesting to test TLOU Part 2 as well. (Since the two games have a lot in common, and if the first one gets to the menu, the second one probably will too.)
Author
Owner

@⁠claxten10 on GitHub · 2026-10-26 12:46 UTC · original

Hi, these seem like some really interesting changes, and the fact that TLOU Part 1 launches is awesome! It would be interesting to test TLOU Part 2 as well. (Since the two games have a lot in common, and if the first one gets to the menu, the second one probably will too.)

I have not tested TLOU Part II, it would probably require a minimal amount of changes or it might even boot OOTB, I am not sure.

**@⁠claxten10** on GitHub · 2026-10-26 12:46 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1899#issuecomment-6416336931) > Hi, these seem like some really interesting changes, and the fact that TLOU Part 1 launches is awesome! It would be interesting to test TLOU Part 2 as well. (Since the two games have a lot in common, and if the first one gets to the menu, the second one probably will too.) I have not tested TLOU Part II, it would probably require a minimal amount of changes or it might even boot OOTB, I am not sure.
Author
Owner

@⁠Ekt0re on GitHub · 2026-10-26 14:21 UTC · original

Hi, these seem like some really interesting changes, and the fact that TLOU Part 1 launches is awesome! It would be interesting to test TLOU Part 2 as well. (Since the two games have a lot in common, and if the first one gets to the menu, the second one probably will too.)

I have not tested TLOU Part II, it would probably require a minimal amount of changes or it might even boot OOTB, I am not sure.

Okay, it would be interesting to test it, just as it would be interesting to test Uncharted: The Legacy of Thieves as well (since they all share the same game engine, they should theoretically be able to load the game menu).

Anyway, you did a great job!

**@⁠Ekt0re** on GitHub · 2026-10-26 14:21 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1899#issuecomment-6418381150) > > Hi, these seem like some really interesting changes, and the fact that TLOU Part 1 launches is awesome! It would be interesting to test TLOU Part 2 as well. (Since the two games have a lot in common, and if the first one gets to the menu, the second one probably will too.) > > I have not tested TLOU Part II, it would probably require a minimal amount of changes or it might even boot OOTB, I am not sure. Okay, it would be interesting to test it, just as it would be interesting to test *Uncharted: The Legacy of Thieves* as well (since they all share the same game engine, they should theoretically be able to load the game menu). Anyway, you did a great job!
Author
Owner

@⁠Ekt0re on GitHub · 2026-10-26 14:44 UTC · original

I was thinking of something (I'm not sure if it'll work, but if you have the time or feel like experimenting), you could combine this fix with this fix for Uncharted.
Maybe combining these two fixes will let you start the game.

**@⁠Ekt0re** on GitHub · 2026-10-26 14:44 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1899#issuecomment-6418897648) I was thinking of something (I'm not sure if it'll work, but if you have the time or feel like experimenting), you could combine this fix with this [fix for Uncharted.](https://git.gtahub.st/github/KytyPS5--KytyPS5/pulls/1430) Maybe combining these two fixes will let you start the game.
Author
Owner

@⁠bozoweed on GitHub · 2026-10-26 15:03 UTC · original

when does it going to be merged ?

**@⁠bozoweed** on GitHub · 2026-10-26 15:03 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1899#issuecomment-6419372703) when does it going to be merged ?
Author
Owner

@⁠Ekt0re on GitHub · 2026-10-26 15:07 UTC · original

when does it going to be merged ?

That's a good question. Basically, we'll all be done soon, but you can't just merge them “at random”—first, the maintainer has to review the code, figure out which parts can be added right away without any issues, and which ones require a more thorough review. Since there are so many files and so many modified functions, I imagine it will take quite a while. Also, because in the meantime, there are more than 20–25 new pull requests every day.

**@⁠Ekt0re** on GitHub · 2026-10-26 15:07 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1899#issuecomment-6419465518) > when does it going to be merged ? That's a good question. Basically, we'll all be done soon, but you can't just merge them “at random”—first, the maintainer has to review the code, figure out which parts can be added right away without any issues, and which ones require a more thorough review. Since there are so many files and so many modified functions, I imagine it will take quite a while. Also, because in the meantime, there are more than 20–25 new pull requests every day.
Author
Owner

@⁠bozoweed on GitHub · 2026-10-26 15:11 UTC · original

nice to ear , so maintainer does real review befor merge ? is not let AI does that for him ? because i did'nt undestud why they have merge pr that have broken linux and macos build. but if they did review it's a good new :)

**@⁠bozoweed** on GitHub · 2026-10-26 15:11 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1899#issuecomment-6419550712) nice to ear , so maintainer does real review befor merge ? is not let AI does that for him ? because i did'nt undestud why they have merge pr that have broken linux and macos build. but if they did review it's a good new :)
Author
Owner

@⁠Ekt0re on GitHub · 2026-10-26 15:17 UTC · original

nice to ear , so maintainer does real review befor merge ? is not let AI does that for him ? because i did'nt undestud why they have merge pr that have broken linux and macos build. but if they did review it's a good new :)

Honestly, I don't know how or what they do to review the code. Basically, there are already some automatic verification checks in place:

  1. GitHub Actions, which attempts to run the build even for pull requests
  2. CodeRabbit AI, which performs its own evaluation
  3. A review by the maintainer.

Sometimes an issue arises on a specific platform, such as Mac or Linux. (Windows is usually the most widely supported platform.) Very often, these errors aren’t major issues, but rather minor bugs that cause problems on a single platform. Within a few hours—or at most one day—a working version is restored.
The important thing is that the emulator doesn't get cluttered with Sloap AI code, which, in the long run, makes maintenance impossible and may even cause regressions.

**@⁠Ekt0re** on GitHub · 2026-10-26 15:17 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1899#issuecomment-6419696981) > nice to ear , so maintainer does real review befor merge ? is not let AI does that for him ? because i did'nt undestud why they have merge pr that have broken linux and macos build. but if they did review it's a good new :) Honestly, I don't know how or what they do to review the code. Basically, there are already some automatic verification checks in place: 1) GitHub Actions, which attempts to run the build even for pull requests 2) CodeRabbit AI, which performs its own evaluation 3) A review by the maintainer. Sometimes an issue arises on a specific platform, such as Mac or Linux. (Windows is usually the most widely supported platform.) Very often, these errors aren’t major issues, but rather minor bugs that cause problems on a single platform. Within a few hours—or at most one day—a working version is restored. The important thing is that the emulator doesn't get cluttered with Sloap AI code, which, in the long run, makes maintenance impossible and may even cause regressions.
This pull request has changes conflicting with the target branch.
  • CMakeLists.txt
  • src/graphics/guest_gpu/command_processor/commandProcessor.h
  • src/graphics/guest_gpu/command_processor/pm4Dispatch.cpp
  • src/graphics/guest_gpu/command_processor/pm4Dispatch.h
  • src/graphics/guest_gpu/graphicsRun.cpp
  • src/graphics/host_gpu/pageManager.cpp
  • src/graphics/host_gpu/pageManager.h
  • src/graphics/host_gpu/renderer/cache/bufferCache.cpp
  • src/graphics/host_gpu/renderer/cache/textureCache.cpp
  • src/graphics/host_gpu/renderer/pipeline/descriptorHeap.cpp
  • src/graphics/host_gpu/renderer/pipeline/descriptorHeap.h
  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp
  • src/graphics/host_gpu/renderer/pipeline/imageHeap.cpp
  • src/graphics/host_gpu/renderer/pipeline/imageHeap.h
  • src/graphics/presentation/videoOut.cpp
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterImage.cpp
  • src/graphics/shader/recompiler/backend/spirv/spirvEmitterMemory.cpp
  • src/graphics/shader/recompiler/frontend/decode/MemoryOps.cpp
  • src/graphics/shader/recompiler/ir/Serialize.h
  • src/graphics/shader/recompiler/ir/ShaderIR.h
  • src/graphics/shader/recompiler/ir/opcodes/ValueOpcodes.cpp
  • src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp
  • src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.h
  • src/graphics/shader/recompiler/ir/passes/ResourceTracking.cpp
  • src/graphics/shader/recompiler/ir/passes/ShaderInfoCollection.cpp
  • src/graphics/shader/recompiler/ir/passes/SrtWalker.cpp
  • src/kernel/memory.cpp
  • src/kernel/memory.h
  • src/libs/agc.cpp
  • src/libs/agc.h
  • src/libs/libAgcDriver.cpp
  • src/libs/libKernel.cpp
  • src/libs/libSystemService.cpp
  • src/libs/libTextToSpeech2.cpp
  • tests/ResourceMaterializationTests.cpp
  • tests/ResourceTrackingTests.cpp
  • tests/ScalarProvenanceTests.cpp
  • tests/ShaderRecompilerComputeTests.cpp
  • tests/VirtualMemoryAllocationTests.cpp
  • tests/shaderCfgTests.cpp
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.
git fetch -u origin '+refs/pull/1899/head:github-bot/gh-1899'
git switch 'github-bot/gh-1899'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1899'
git switch 'github-bot/gh-1899'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1899'
git switch 'github-bot/gh-1899'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1899'
git switch 'main'
git merge --squash 'github-bot/gh-1899'
git switch 'main'
git merge --ff-only 'github-bot/gh-1899'
git switch 'main'
git merge 'github-bot/gh-1899'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.