vkback: size the render area to the smallest attachment #54

Manually merged
github merged 2 commits from github-bot/gh-54 into gh-pr/54/base 2026-12-01 08:49:24 +00:00 AGit
Owner

@⁠TheRifai on GitHub · 2026-12-01 08:33 UTC · original
TheRifai:vkback-render-area-min → main · +6 −2 · 1 files · 2 commits · merged 2026-12-01 08:47 UTC

What

In the draw pass, ext (the VkRenderingInfo::renderArea) was assigned from each bound target in turn, so the last target decided it. With a full-resolution attachment beside a half-resolution one, the render area could exceed the smaller view — VUID-VkRenderingInfo-pNext-06079 / -06080 (issue #37).

Now the extent is the minimum width/height across every color and depth attachment (the console clips to the smaller target). Clipping is counted via self.note("render area clipped to the smallest attachment"), not silent. Viewport/scissor use the same extent as before.

Evidence

  • cargo check -p vkback passes.
  • House-scene validation on the reference card: no new VUIDs (and 06079/06080 do not occur in that scene; they were reported on RX 6800 and in a contributor's house run).
  • World screenshot unchanged (no attachment in the house scene triggers a clip, so the fix is inert there).
**@⁠TheRifai** on GitHub · 2026-12-01 08:33 UTC · [original](https://github.com/vktory6/VKtory/pull/54) `TheRifai:vkback-render-area-min` → `main` · +6 −2 · 1 files · 2 commits · merged 2026-12-01 08:47 UTC ## What In the draw pass, `ext` (the `VkRenderingInfo::renderArea`) was assigned from each bound target in turn, so the **last** target decided it. With a full-resolution attachment beside a half-resolution one, the render area could exceed the smaller view — `VUID-VkRenderingInfo-pNext-06079` / `-06080` (issue #37). Now the extent is the minimum width/height across every color and depth attachment (the console clips to the smaller target). Clipping is counted via `self.note("render area clipped to the smallest attachment")`, not silent. Viewport/scissor use the same extent as before. ## Evidence - `cargo check -p vkback` passes. - House-scene validation on the reference card: no new VUIDs (and 06079/06080 do not occur in that scene; they were reported on RX 6800 and in a contributor's house run). - World screenshot unchanged (no attachment in the house scene triggers a clip, so the fix is inert there).
The render area was overwritten by every bound target, so the last target won:
a full-resolution attachment beside a half-resolution one could give a render
area larger than the smaller view (VUID-VkRenderingInfo-pNext-06079/-06080,
issue #37). Take the minimum width and height across all color and depth
attachments, and count it when it clips. The console clips to the smaller
target; the viewport/scissor follow the same extent.

cargo check -p vkback passes; house validation has no new VUIDs and the world
screenshot is unchanged.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 08:38:15 +00:00
github-bot changed target branch from main to gh-pr/54/base 2026-12-01 08:49:22 +00:00
github manually merged commit 0ad45848c3 into gh-pr/54/base 2026-12-01 08:49:24 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 08:47 UTC · original

Merged, thanks! Taking the smallest extent is right, and it's exactly what vkd3d-proton does (command.c:15282-15304: start at the device's largest framebuffer, then the min over every RTV and the DSV). One commit of mine on top (0ad4584) makes it that simple: ext already starts at the device's largest framebuffer, so one min per target is all it takes. The first-target flag and the "clipped" note are gone, because targets of different sizes bound together are legal D3D and nothing to count.

Check on the reference system (RX 9070 XT): tests and policy pass, and the house-scene validation run shows no new error. 06079/06080 are off the validation list. 08910 (the format mismatch from #37) stays.

**@⁠vktory6** on GitHub · 2026-12-01 08:47 UTC · [original](https://github.com/vktory6/VKtory/pull/54#issuecomment-7305788246) Merged, thanks! Taking the smallest extent is right, and it's exactly what vkd3d-proton does (`command.c:15282-15304`: start at the device's largest framebuffer, then the min over every RTV and the DSV). One commit of mine on top (0ad4584) makes it that simple: `ext` already starts at the device's largest framebuffer, so one `min` per target is all it takes. The first-target flag and the "clipped" note are gone, because targets of different sizes bound together are legal D3D and nothing to count. Check on the reference system (RX 9070 XT): tests and policy pass, and the house-scene validation run shows no new error. 06079/06080 are off the validation list. 08910 (the format mismatch from #37) stays.
This discussion has been locked. Commenting is limited to contributors.
No description provided.