Skip to content

Runtime: support wide Xbox volume textures on Vulkan - #8889

Open
gabrielsteglich wants to merge 2 commits into
ItsNotRexed:mainfrom
gabrielsteglich:feat/xbox-wide-volume-textures
Open

gabrielsteglich wants to merge 2 commits into
ItsNotRexed:mainfrom
gabrielsteglich:feat/xbox-wide-volume-textures

Conversation

@gabrielsteglich

Copy link
Copy Markdown
Contributor

What and why

The boot investigation in #8504 recorded an Xbox allocation request for a 2560×1440×1 B5G5R5A1 render-target and storage volume. The desktop D3D12 3D extent limit rejected that request before the backend could check Vulkan support for the format.

The Xbox Vulkan device now allows U/V up to the 14-bit T# extent of 16384 for ordinary 3D textures. W retains its 2048 limit. The image remains Vulkan 3D, and both allocation and creation use the driver's limits for the requested format and usage. Desktop devices retain the desktop rules. The existing sparse, depth/stencil and multisample restrictions still apply.

Claim in #8683. #7604 covers the separate B5G5R5A1 format fallback.

Validation

Windows 11 build 26300, MSVC 19.44, Windows SDK 10.0.28000, Vulkan SDK 1.4.363.0, RTX 3090 driver 621.01. Vulkan validation enabled. Tested 305fad1 against main 867d922.

AI-assisted implementation and tests with Codex. Validation used synthetic fixtures.

@abnalstlll-byte abnalstlll-byte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on Windows 11.

  • Excellent support for wide Xbox volume textures on the Vulkan device backend:
    • Accepts 3D color textures with unspecified layout (UNKNOWN) and dimensions up to 16384 x 16384 x 2048 when format and usage limits permit.
    • Normalizes Xbox layout token 0x101 to UNKNOWN through slot 76.
    • Gated behind VulkanDeviceMode::xbox so standard desktop callers retain baseline limits.
  • Comprehensive regression coverage in runtime/test/d3d12_placed_dimensions_test.cpp:
    • Verifies allocation agreement across GetResourceAllocationInfo, GetResourceAllocationInfo1, and GetResourceAllocationInfo2.
    • Tests committed 3D creation through slot 76 and validates RTV W-slice clear with untouched texels preserved.
  • Clean-room check and git diff --check pass.

LGTM!

@smowlyy

smowlyy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Verified head 305fad127 merged onto main (867d922f0) on native Windows 11 (10.0.26300.9974, MSVC 19.44, RelWithDebInfo, Vulkan SDK 1.4.363.0) across both GPUs with LEONIDA_VK_VALIDATION=1:

  • python -I scripts/check_no_game_data.py on all 6 changed files: clean (exit 0)
  • cmake --build runtime/build --target d3d12_placed_dimensions_test --parallel: built cleanly
  • LEONIDA_VK_VALIDATION=1 .\runtime\build\d3d12_placed_dimensions_test.exe on NVIDIA GeForce RTX 5060 Ti (driver 610.88, Vulkan 1.4.341): passed, 0 validation errors (82 answers compared, 0 differ against both default adapter and WARP)
  • LEONIDA_VK_VALIDATION=1 LEONIDA_VK_DEVICE=Radeon .\runtime\build\d3d12_placed_dimensions_test.exe on AMD Radeon(TM) Graphics (driver 24.10.24, Vulkan 1.3.280): passed, 0 validation errors (82 answers compared, 0 differ against both default adapter and WARP)

AI-assisted.

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.

3 participants