vkback: skip a zero-size push and give a targetless draw its viewport area #19

Manually merged
github merged 2 commits from github-bot/gh-19 into gh-pr/19/base 2026-11-30 23:42:26 +00:00 AGit
Owner

@⁠TheRifai on GitHub · 2026-11-30 21:14 UTC · original
TheRifai:vkback-validation-zero → main · +8 −1 · 2 files · 2 commits · merged 2026-11-30 23:39 UTC

What

Two zero-size calls the console treats as no-ops:

  • A pipeline whose push block is empty called vkCmdPushConstants with size 0 (VUID-vkCmdPushConstants-size-arraylength). A zero-byte push writes nothing, so the tape skips it.
  • A draw with no color or depth target left the render area at 0x0 (VUID-VkRenderingInfo-None-08994). The render area now starts from the first viewport's extent — the area such a draw rasterizes — instead of zero.

The roadmap's "Commands" line loses both entries.

Why this verification is enough (rules 27 and 30)

Validation run on the house scene (about 60 world s, VK_LAYER_KHRONOS_validation 1.4.363, core, thread-safety and shader checks, errors only): both VUIDs are in the main baseline and neither is after the change, with no new VUID. cargo test -p vkback --lib: 146 passed, 3 ignored. cargo test -p vkback --test policy: 6 passed.

**@⁠TheRifai** on GitHub · 2026-11-30 21:14 UTC · [original](https://github.com/vktory6/VKtory/pull/19) `TheRifai:vkback-validation-zero` → `main` · +8 −1 · 2 files · 2 commits · merged 2026-11-30 23:39 UTC ## What Two zero-size calls the console treats as no-ops: - A pipeline whose push block is empty called `vkCmdPushConstants` with size 0 (`VUID-vkCmdPushConstants-size-arraylength`). A zero-byte push writes nothing, so the tape skips it. - A draw with no color or depth target left the render area at 0x0 (`VUID-VkRenderingInfo-None-08994`). The render area now starts from the first viewport's extent — the area such a draw rasterizes — instead of zero. The roadmap's "Commands" line loses both entries. ## Why this verification is enough (rules 27 and 30) Validation run on the house scene (about 60 world s, `VK_LAYER_KHRONOS_validation` 1.4.363, core, thread-safety and shader checks, errors only): both VUIDs are in the `main` baseline and neither is after the change, with no new VUID. `cargo test -p vkback --lib`: 146 passed, 3 ignored. `cargo test -p vkback --test policy`: 6 passed.
A pipeline whose push block is empty called vkCmdPushConstants with size 0
(VUID-vkCmdPushConstants-size-arraylength); a zero-byte push writes nothing,
so the tape skips it. A draw with no color or depth target left the render
area at 0x0 (VUID-VkRenderingInfo-None-08994); it now starts from the first
viewport's extent, the area the draw rasterizes.

Test: the validation run's distinct VUID list loses both lines, no new ones.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 21:18:06 +00:00
github-bot force-pushed github-bot/gh-19 from 5f974e9959 to f9af77923b 2026-11-30 21:45:10 +00:00 Compare
github-bot force-pushed github-bot/gh-19 from f9af77923b to 1a4de5cc60 2026-11-30 22:22:32 +00:00 Compare
github-bot force-pushed github-bot/gh-19 from 1a4de5cc60 to f5d18147d6 2026-11-30 22:27:49 +00:00 Compare
github-bot force-pushed github-bot/gh-19 from f5d18147d6 to 37a6ccfcba 2026-11-30 23:37:05 +00:00 Compare
D3D11.3 spec 3.5.6.4: with no render target the viewport and scissor identify the pixel
dimensions, so the render area must not clip; vkd3d-proton uses maxFramebufferWidth/Height
(command.c:15282). The first viewport's extent ignored its offset.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot changed target branch from main to gh-pr/19/base 2026-11-30 23:42:24 +00:00
github manually merged commit 6b6feaca8e into gh-pr/19/base 2026-11-30 23:42:26 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-11-30 23:40 UTC · original

Merged, thanks. One change on top: a draw without a render target now gets the device's largest framebuffer as its render area instead of the first viewport's size. D3D11.3 functional spec 3.5.6.4 says that with UAV-only rendering "the viewport/scissor identify the pixel dimensions", so the render area must not clip anything, which is what vkd3d-proton does too (maxFramebufferWidth/Height); the viewport's size alone ignores its offset. This fix is a big visual improvement in play: those draws rendered nothing before.

**@⁠vktory6** on GitHub · 2026-11-30 23:40 UTC · [original](https://github.com/vktory6/VKtory/pull/19#issuecomment-7295390488) Merged, thanks. One change on top: a draw without a render target now gets the device's largest framebuffer as its render area instead of the first viewport's size. D3D11.3 functional spec 3.5.6.4 says that with UAV-only rendering "the viewport/scissor identify the pixel dimensions", so the render area must not clip anything, which is what vkd3d-proton does too (maxFramebufferWidth/Height); the viewport's size alone ignores its offset. This fix is a big visual improvement in play: those draws rendered nothing before.
Author
Owner

@⁠TheRifai on GitHub · 2026-12-01 00:10 UTC · original

Rebased onto f85217a (37a6ccf) and revalidated: 15 -> 13 distinct VUIDs on the house scene, VkRenderingInfo-None-08994 and vkCmdPushConstants-size-arraylength gone, no new VUID.

**@⁠TheRifai** on GitHub · 2026-12-01 00:10 UTC · [original](https://github.com/vktory6/VKtory/pull/19#issuecomment-7296024249) Rebased onto `f85217a` (37a6ccf) and revalidated: 15 -> 13 distinct VUIDs on the house scene, `VkRenderingInfo-None-08994` and `vkCmdPushConstants-size-arraylength` gone, no new VUID.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 00:14 UTC · original · edited 2026-12-01 00:20 UTC

Thanks for checking it again! Beyond the validation errors, this was a big visible improvement: draws without a render target used to render nothing, and with your change the picture got significantly better in play. It also fixed the empty character tab in the pause menu for us (issue #32).

**@⁠vktory6** on GitHub · 2026-12-01 00:14 UTC · [original](https://github.com/vktory6/VKtory/pull/19#issuecomment-7296108624) · edited 2026-12-01 00:20 UTC Thanks for checking it again! Beyond the validation errors, this was a big visible improvement: draws without a render target used to render nothing, and with your change the picture got significantly better in play. It also fixed the empty character tab in the pause menu for us (issue #32).
This discussion has been locked. Commenting is limited to contributors.
No description provided.