mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:00:52 +01:00
[PR #2283] d3d12: support standard sparse tiles for typed 2D color textures #2288
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2288
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2283
Author: @timbot103
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:d3d-sparse-2d-color-formats📝 Commits (1)
c11de71d3d12: support standard sparse tiles for typed 2D color textures📊 Changes
12 files changed (+887 additions, -31 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+17 -10)📝
runtime/CMakeLists.txt(+9 -0)📝
runtime/shims/d3d12_com.cpp(+9 -7)📝
runtime/shims/d3d12_com.h(+1 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+34 -10)📝
runtime/src/command_list.h(+1 -1)📝
runtime/src/vulkan_backend.h(+7 -1)📝
runtime/src/vulkan_replay.h(+7 -2)➕
runtime/test/d3d12_sparse_formats_fixture.h(+29 -0)➕
runtime/test/d3d12_sparse_formats_mapping.cpp(+183 -0)➕
runtime/test/d3d12_sparse_formats_test.cpp(+429 -0)➕
runtime/test/d3d12_sparse_formats_transfer.cpp(+161 -0)📄 Description
Claimed in the coordination issue as: D3D-SPARSE-2D-COLOR-FORMATS
What and why
Eligible reserved 2D textures can now map heap pages on 49 additional typed, uncompressed color formats. Previously only
R8G8B8A8_UNORMcould use real sparse backing. The runtime checks each Vulkan image for the D3D12 64 KiB tile shape, compatible device-local memory and a single tail-free color aspect. The scope is one mip, one array layer and one sample.The resource records its tile shape and texel size after verifying that their product describes exactly one 64 KiB tile.
CopyTilesuses the full tile row pitch at clipped edges and stages linear offsets that Vulkan cannot copy directly. Tile mapping copies use each image’s grid. The original RGBA8 behavior for small images is preserved.Tested
d3d12_sparse_formats_testobtained real sparse backing in all 100 cases on each GPU (50 formats at exact and clipped dimensions). Native D3D12 WARP matched all 100 tilings and the visible transfer bytes for nine representative formats covering all five texel sizes.d3d12_sparse_formats_test,d3d12_texture_tiles_test,d3d12_buffer_tiles_test,d3d12_vulkan_device_test,vk_command_replay_test,resource_tiling_testandreplay_copy_offset_testin all four GPU and validation configurations. All 28 invocations passed with zero Vulkan validation diagnostics. Validation-on GPU runs enabled Khronos synchronization validation. The two CPU tests were repeated in each configuration.GPUs tested: NVIDIA GeForce RTX 5080, driver 616.64, and AMD Radeon(TM) Graphics, driver 25.10.30.02, on Windows 11 Pro. Native D3D12 reference: Microsoft Basic Render Driver selected with
EnumWarpAdapter.AI-assisted: yes (Gemini, Codex, Claude)
Checklist
main(a73a57e13).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.