renderer: clamp render area to attachment mip views #375

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

@⁠Techx3 on GitHub · 2026-08-28 23:09 UTC · original
Techx3:techx3/render-area-clamp-attachment-mips → main · +23 −6 · 3 files · 1 commits · open

Summary

  • derive the physical width and height of each attachment from its selected base mip
  • intersect guest target dimensions with the concrete color/depth view extent
  • share one helper between color and depth attachment handling
  • add a regression proving an 8x8 backing at mip 1 exposes a 4x4 attachment area

Why

Render-target aliases can share pitch/backing while exposing a smaller mip or a target that differs by one texel. Using only guest dimensions can make VkRenderingInfo::renderArea exceed an attachment view.

This isolates the render-area part of #266; it does not include image-copy, storage-format, GC, GE, or sampled-depth changes.

Game / PPSA context

  • Scars Above — PPSA08597
  • Demon's Souls — PPSA01342

Validation

  • built: kyty_emulator, shader_recompiler_compute_tests
  • passed: texture_cache_image_views
  • passed: shader_recompiler_compute
  • git diff --check
**@⁠Techx3** on GitHub · 2026-08-28 23:09 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/375) `Techx3:techx3/render-area-clamp-attachment-mips` → `main` · +23 −6 · 3 files · 1 commits · open ## Summary - derive the physical width and height of each attachment from its selected base mip - intersect guest target dimensions with the concrete color/depth view extent - share one helper between color and depth attachment handling - add a regression proving an 8x8 backing at mip 1 exposes a 4x4 attachment area ## Why Render-target aliases can share pitch/backing while exposing a smaller mip or a target that differs by one texel. Using only guest dimensions can make VkRenderingInfo::renderArea exceed an attachment view. This isolates the render-area part of #266; it does not include image-copy, storage-format, GC, GE, or sampled-depth changes. ## Game / PPSA context - Scars Above — PPSA08597 - Demon's Souls — PPSA01342 ## Validation - built: kyty_emulator, shader_recompiler_compute_tests - passed: texture_cache_image_views - passed: shader_recompiler_compute - git diff --check
Derive each attachment's physical extent from the selected base mip and intersect it with the guest target dimensions. This keeps dynamic rendering inside every color and depth image view.

Co-authored-by: shadowbeat070 <[email protected]>

Co-authored-by: SueryRD <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:18:18 +00:00
This pull request has changes conflicting with the target branch.
  • src/graphics/host_gpu/renderer/render.h
  • src/graphics/host_gpu/renderer/renderDraw.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/375/head:github-bot/gh-375'
git switch 'github-bot/gh-375'

Merge

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