host: also hide VK_EXT_descriptor_heap on GPUs that need storage CBVs #212

Manually merged
github merged 1 commit from github-bot/gh-212 into gh-pr/212/base 2026-11-26 08:27:59 +00:00 AGit
Owner

@⁠NickStallman on GitHub · 2026-11-26 04:49 UTC · original
NickStallman:fix/cbv-layer-descriptor-heap → main · +16 −8 · 3 files · 1 commits · merged 2026-11-26 08:27 UTC

GE-Proton11-14, now the pinned default, ships a vkd3d-proton that enables VK_EXT_descriptor_heap. That path binds CBVs as uniform buffers. Xbox titles use 16-byte CBV offsets, and NVIDIA requires 64 (minUniformBufferOffsetAlignment). Vulkan validation reports it:

vkWriteResourceDescriptorsEXT(): pResources[0].data.pAddressRange->address (0xee3ff20) is not aligned to minUniformBufferOffsetAlignment (64)

In ProjectScarlett, the final full-screen copy to the display reads its projection from CB0. In menu frames that CBV sits at an address ≡ 32 (mod 64), so the copy reads shifted rows and its quad lands off-screen. The whole front end then presents black, while the menu itself renders correctly into its off-screen target. Over one traced run, the display was lit exactly while the copy's CBV address was 64-aligned and black while it was 32 mod 64.

The CBV layer already hides VK_EXT_descriptor_buffer on GPUs where needs_storage_cbv() holds (#42), so vkd3d-proton uses its descriptor-set path, which binds CBVs as storage buffers. It now hides VK_EXT_descriptor_heap too, on the same GPUs only. The Proton-feature path disables both. Vulkan headers older than the extension get a string fallback.

Result on RTX 5090: the front end is visible and works with controller input. I went through the account-picker prompt, Navigation Experience, UI Text Size, Subtitles, Brightness, Finish Setup, Legal Notices and the Privacy Policy and Terms of Service acceptance, and the game then loads into the world. Every earlier run on GE-Proton11-14 was black from the first menu on. I verified this with VKD3D_DISABLE_EXTENSIONS=VK_EXT_descriptor_heap, which is the setting this change applies.

Stopgap. This follows the existing descriptor-buffer workaround but is not the final fix:

  • It keeps vkd3d-proton on the older descriptor-set path on NVIDIA. The CPU cost compared with descriptor heaps hasn't been measured yet.
  • It hides extensions by name, so a future vkd3d-proton descriptor path would hit the same problem silently.
  • The permanent fix is for vkd3d-proton's descriptor-heap path to bind 16-byte-aligned CBVs as storage buffers, as cbv_16_byte_alignment does for descriptor sets.

Checks

  • AMD Raphael iGPU (RADV, Mesa 26.0.8), GE-Proton11-14: every group passes except the five guest-present* gates. Those fail on this host because they sample a private rootful Xwayland, and the change doesn't touch them. buffer-remap passed. The layer is a no-op on RADV, where the alignment is 4.
  • NVIDIA RTX 5090, driver 595.99.02, GE-Proton11-14: the full tuxbox.py check will follow in a comment.
  • python -m unittest discover -s tests -q: 368 OK.

🤖 Generated with Claude Code

**@⁠NickStallman** on GitHub · 2026-11-26 04:49 UTC · [original](https://github.com/brcly/TuxBox/pull/212) `NickStallman:fix/cbv-layer-descriptor-heap` → `main` · +16 −8 · 3 files · 1 commits · merged 2026-11-26 08:27 UTC GE-Proton11-14, now the pinned default, ships a vkd3d-proton that enables `VK_EXT_descriptor_heap`. That path binds CBVs as uniform buffers. Xbox titles use 16-byte CBV offsets, and NVIDIA requires 64 (`minUniformBufferOffsetAlignment`). Vulkan validation reports it: ``` vkWriteResourceDescriptorsEXT(): pResources[0].data.pAddressRange->address (0xee3ff20) is not aligned to minUniformBufferOffsetAlignment (64) ``` In ProjectScarlett, the final full-screen copy to the display reads its projection from CB0. In menu frames that CBV sits at an address ≡ 32 (mod 64), so the copy reads shifted rows and its quad lands off-screen. The whole front end then presents black, while the menu itself renders correctly into its off-screen target. Over one traced run, the display was lit exactly while the copy's CBV address was 64-aligned and black while it was 32 mod 64. The CBV layer already hides `VK_EXT_descriptor_buffer` on GPUs where `needs_storage_cbv()` holds (#42), so vkd3d-proton uses its descriptor-set path, which binds CBVs as storage buffers. It now hides `VK_EXT_descriptor_heap` too, on the same GPUs only. The Proton-feature path disables both. Vulkan headers older than the extension get a string fallback. **Result on RTX 5090:** the front end is visible and works with controller input. I went through the account-picker prompt, Navigation Experience, UI Text Size, Subtitles, Brightness, Finish Setup, Legal Notices and the Privacy Policy and Terms of Service acceptance, and the game then loads into the world. Every earlier run on GE-Proton11-14 was black from the first menu on. I verified this with `VKD3D_DISABLE_EXTENSIONS=VK_EXT_descriptor_heap`, which is the setting this change applies. **Stopgap.** This follows the existing descriptor-buffer workaround but is not the final fix: - It keeps vkd3d-proton on the older descriptor-set path on NVIDIA. The CPU cost compared with descriptor heaps hasn't been measured yet. - It hides extensions by name, so a future vkd3d-proton descriptor path would hit the same problem silently. - The permanent fix is for vkd3d-proton's descriptor-heap path to bind 16-byte-aligned CBVs as storage buffers, as `cbv_16_byte_alignment` does for descriptor sets. **Checks** - AMD Raphael iGPU (RADV, Mesa 26.0.8), GE-Proton11-14: every group passes except the five `guest-present*` gates. Those fail on this host because they sample a private rootful Xwayland, and the change doesn't touch them. `buffer-remap` passed. The layer is a no-op on RADV, where the alignment is 4. - NVIDIA RTX 5090, driver 595.99.02, GE-Proton11-14: the full `tuxbox.py check` will follow in a comment. - `python -m unittest discover -s tests -q`: 368 OK. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
vkd3d-proton's descriptor-heap path binds CBVs as uniform buffers, so
16-byte Xbox CBV offsets break where minUniformBufferOffsetAlignment is 64.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:38:36 +00:00
Author
Owner

@⁠NickStallman on GitHub · 2026-11-26 05:26 UTC · original

NVIDIA follow-up, on this branch (fceed40):

  • python tuxbox.py check on the RTX 5090 (10de:2b85), driver 595.99.02, GE-Proton11-14: all groups passed. That includes Lanes and fixtures on the GPU, the D3D12 regression controls and the shader translator on the GPU, with 100 gates passing.
  • In game, through the layer change alone (no VKD3D_DISABLE_EXTENSIONS override): the log no longer reports VK_EXT_descriptor_heap enabled, and the front end renders (Navigation Experience after the intro). Before this change the same screen was black on the same build.

🤖 Generated with Claude Code

**@⁠NickStallman** on GitHub · 2026-11-26 05:26 UTC · [original](https://github.com/brcly/TuxBox/pull/212#issuecomment-7183485272) NVIDIA follow-up, on this branch (fceed40): - `python tuxbox.py check` on the RTX 5090 (10de:2b85), driver 595.99.02, GE-Proton11-14: all groups passed. That includes Lanes and fixtures on the GPU, the D3D12 regression controls and the shader translator on the GPU, with 100 gates passing. - In game, through the layer change alone (no `VKD3D_DISABLE_EXTENSIONS` override): the log no longer reports `VK_EXT_descriptor_heap enabled`, and the front end renders (Navigation Experience after the intro). Before this change the same screen was black on the same build. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot changed target branch from main to gh-pr/212/base 2026-11-26 08:27:55 +00:00
github manually merged commit fceed4009f into gh-pr/212/base 2026-11-26 08:27:59 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.