Skip to content

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

Open
NickStallman wants to merge 1 commit into
brcly:mainfrom
NickStallman:fix/cbv-layer-descriptor-heap
Open

NickStallman wants to merge 1 commit into
brcly:mainfrom
NickStallman:fix/cbv-layer-descriptor-heap

Conversation

@NickStallman

Copy link
Copy Markdown
Contributor

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

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 <noreply@anthropic.com>
@NickStallman

Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant