renderer: reduce FPS overhead in GPU scheduling and resource caching #506

Open
github-bot wants to merge 1 commit from github-bot/gh-506 into main AGit
Owner

@⁠Techx3 on GitHub · 2026-09-07 21:43 UTC · original
Techx3:techx3/fps-fixes → main · +133 −18 · 13 files · 1 commits · open

Frequent GPU submissions, early texture eviction and repeated descriptor reads add avoidable frame-time overhead. This change reduces that work while preserving ordering and conservative handling of shader writes.

  • Batch up to eight adjacent eligible 32-bit RELEASE_MEM CPU labels; flush at ineligible packets, queued commands and processing boundaries.
  • Keep reusable textures resident until memory pressure; KYTY_TEXTURE_CACHE_EARLY_GC=1 restores the earlier GC trigger.
  • Use execution-only barriers for read-only compute dispatches, retaining memory barriers for possible writes, atomics, DMA and GDS.
  • Read eligible indirect-image descriptors in blocks, retaining bounds checks and the per-word fallback.

Adapted to upstream main (6aa6e39); excludes the unrelated local merge of #500. Contribution by @⁠Techx3.

Validation on this branch (Windows, Clang 22.1.8, Release):

  • Built kyty_emulator, resource_materialization_tests and shader_recompiler_compute_tests successfully.
  • Eight focused CTest cases passed: resource_materialization, command_scheduler_timeline, gpu_command_lane, pm4_context_state, texture_cache_image_views, texture_cache_storage_sampled, compute_meta_clear_classification and buffer_cache_dirty_gc.
  • git diff --check passed.

The full GPU suite and in-game FPS benchmarks have not been run on this isolated branch; no numerical FPS improvement is claimed.

**@⁠Techx3** on GitHub · 2026-09-07 21:43 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/506) `Techx3:techx3/fps-fixes` → `main` · +133 −18 · 13 files · 1 commits · open Frequent GPU submissions, early texture eviction and repeated descriptor reads add avoidable frame-time overhead. This change reduces that work while preserving ordering and conservative handling of shader writes. - Batch up to eight adjacent eligible 32-bit RELEASE_MEM CPU labels; flush at ineligible packets, queued commands and processing boundaries. - Keep reusable textures resident until memory pressure; KYTY_TEXTURE_CACHE_EARLY_GC=1 restores the earlier GC trigger. - Use execution-only barriers for read-only compute dispatches, retaining memory barriers for possible writes, atomics, DMA and GDS. - Read eligible indirect-image descriptors in blocks, retaining bounds checks and the per-word fallback. Adapted to upstream main (6aa6e39); excludes the unrelated local merge of #500. Contribution by @⁠Techx3. Validation on this branch (Windows, Clang 22.1.8, Release): - Built kyty_emulator, resource_materialization_tests and shader_recompiler_compute_tests successfully. - Eight focused CTest cases passed: resource_materialization, command_scheduler_timeline, gpu_command_lane, pm4_context_state, texture_cache_image_views, texture_cache_storage_sampled, compute_meta_clear_classification and buffer_cache_dirty_gc. - git diff --check passed. The full GPU suite and in-game FPS benchmarks have not been run on this isolated branch; no numerical FPS improvement is claimed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:24:14 +00:00
Author
Owner

@⁠Techx3 on GitHub · 2026-09-07 21:56 UTC · original

This enhance just a little the FPS, tested with Demons Souls.
Character creation screen was 5FPS and it go up to 15FPS

**@⁠Techx3** on GitHub · 2026-09-07 21:56 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/506#issuecomment-5575989635) This enhance just a little the FPS, tested with Demons Souls. Character creation screen was 5FPS and it go up to 15FPS
Author
Owner

@⁠Randomuser8219 on GitHub · 2026-09-07 23:00 UTC · original

With this pull request and Squirrel with a Gun (PPSA22102):
Main menu: 11 FPS > 15FPS
In-game (Secret Bunker): 4 FPS > 6 FPS
My hardware is AMD Ryzen 7800X 3D, NVIDIA GeForce RTX 5060 Ti, and 32GB of DDR5 5800Mt/s RAM.

**@⁠Randomuser8219** on GitHub · 2026-09-07 23:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/506#issuecomment-5576448045) With this pull request and Squirrel with a Gun (PPSA22102): Main menu: 11 FPS > **15FPS** In-game (Secret Bunker): 4 FPS > **6 FPS** My hardware is AMD Ryzen 7800X 3D, NVIDIA GeForce RTX 5060 Ti, and 32GB of DDR5 5800Mt/s RAM.
This pull request has changes conflicting with the target branch.
  • src/graphics/guest_gpu/command_processor/commandProcessor.h
  • src/graphics/guest_gpu/command_processor/pm4Handlers.cpp
  • src/graphics/guest_gpu/graphicsRun.cpp
  • src/graphics/guest_gpu/graphicsRun.h
  • src/graphics/host_gpu/renderer/cache/textureCache.h
  • src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp
  • src/graphics/host_gpu/renderer/pipeline/shaderResourceBarrier.cpp
  • src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp
  • src/graphics/shader/recompiler/ir/passes/SrtWalker.h
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/506/head:github-bot/gh-506'
git switch 'github-bot/gh-506'

Merge

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