Skip to content

docs: bring the D3D12 -> Vulkan layer status up to date - #3500

Merged
ItsNotRexed merged 4 commits into
ItsNotRexed:mainfrom
iurysf:leonida/d3d12-status-docs
Nov 23, 2026
Merged

ItsNotRexed merged 4 commits into
ItsNotRexed:mainfrom
iurysf:leonida/d3d12-status-docs

Conversation

@iurysf

@iurysf iurysf commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Claimed in #3232 (#3232 (comment)).

docs/d3d12_vulkan.md and docs/design.md still described the D3D12 layer as mostly unwritten. This updates the statements that contradict main, and only those:

  • Status paragraph (docs/d3d12_vulkan.md): root signatures (packed into the 32 user-data dwords), graphics and compute PSOs, draws, dispatches, ExecuteIndirect, and presentation through PresentX or a DXGI swapchain are implemented and have GPU tests (d3d12_draw, d3d12_compute, d3d12_indirect_rt, d3d12_m4_compute, xbox_present, dxgi_swapchain); M1 and M1.5 are met (d3d12_draw_test, d3d12_translated_draw_test). Still not implemented: buffer SRVs (d3d12_vulkan_device.cpp:5021), CreatePipelineState/pipeline-state streams, tessellation and stream-output. Mesh shaders are reported as not supported; RaytracingTier is reported as NOT_SUPPORTED, while BuildRaytracingAccelerationStructure builds XDXR BVH4 structures (section 4.8). Which present path the game uses stays open (question 6).
  • §3.2: the VulkanPresenter is what the PresentX front end uses (not "every" front end).
  • §3.6: the graphics and compute descs are supported; D3D12_PIPELINE_STATE_STREAM_DESC (CreatePipelineState) is not yet.
  • §4.5 "What exists": the DXGI shim's Present has its own leonida::VulkanSwapchain (dxgi_com.cpp:452, dxgi_swapchain.h:107) and its GetBuffer(i) returns the swapchain images, with offscreen images and a blit only when size or format differ (dxgi_swapchain.h:538-541); PresentX goes through VulkanPresenter and takes ordinary textures.
  • docs/design.md:22 (Graphics row): "The D3D12 layer is still to do" → it replays on Vulkan and is in progress, with the layer's folders and a link to d3d12_vulkan.md.

Every new statement was checked against the code at f847748c; the file:line references are in the commit messages. Not changed (left as a possible finding:): the comment at runtime/shims/d3d12_vulkan_device.cpp:2474-2476. None of the open PRs that edit docs/d3d12_vulkan.md touch these lines; a trial merge with main is clean.

Docs only, 2 files.

Tested on f847748c (Windows 11, Python 3.14): python -I tests/test_docs_design_rows.py, test_docs_links.py, test_docs_list_items.py, test_docs_repo_paths.py, test_i18n_index.py, test_text_write_line_endings.py: all pass; git diff --check clean.

AI-assisted: written and checked with Claude (via OpenBot), with an independent AI review against the code before submitting.

iurysf and others added 3 commits November 22, 2026 17:27
docs/d3d12_vulkan.md said root signatures, PSOs, draws and the game's own
present entry point were not implemented, and docs/design.md said the D3D12
layer was still to do. The shims already have all of these:

- root signatures: CreateRootSignature parses RTS0 and packs it into the 32
  user-data dwords (d3d12_vulkan_device.cpp);
- graphics and compute PSOs: CreateGraphicsPipelineState and
  CreateComputePipelineState;
- draws, dispatches and ExecuteIndirect: d3d12_com.cpp, replayed in
  vulkan_replay.h;
- present: PresentX (xbox_present.cpp) and a DXGI swapchain (dxgi_com.cpp),
  with ctest tests d3d12_draw, d3d12_translated_draw, d3d12_present,
  xbox_present and dxgi_swapchain.

Still not done, and now said so: shader-resource views of buffers (refused),
CreatePipelineState (pipeline-state streams, a generated stub), hull/domain
and stream-output pipelines (E_NOTIMPL); mesh shaders and ray tracing are
reported as not supported. Which present path the game uses stays open.

Claimed in ItsNotRexed#3232. Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_{design_rows,links,list_items,repo_paths}.py,
tests/test_i18n_index.py and tests/test_text_write_line_endings.py pass;
git diff --check is clean (Windows 11, docs only; no GPU involved).

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
Follow-up to the status update, after review:

- Status: ray tracing was lumped with mesh shaders as "not supported". The
  device does report RaytracingTier NOT_SUPPORTED, but
  BuildRaytracingAccelerationStructure (d3d12_com.cpp) builds XDXR BVH4
  structures on the GPU through runtime/src/xdxr_build.h, with a test
  (d3d12_xdxr_rt_test), as section 4.8 already says. Mesh shaders stay
  "reported as not supported". M1 and M1.5 are named next to M0, as the
  file already calls d3d12_draw_test M1 and d3d12_translated_draw_test M1.5.
- Section 3.6: it said pipeline-state stream subobjects "are both
  supported". CreateGraphicsPipelineState and CreateComputePipelineState
  are; CreatePipelineState (the stream) is not implemented.
- Section 4.5, "What exists": the DXGI shim's Present and PresentX were
  described as something that "would" end in the presenter. Both exist
  (shims/dxgi_com.cpp, shims/xbox_present.cpp). Section 3.2 now says that
  only which of the two the game uses is open (question 6).
- design.md: the Graphics folder cell uses backslashes like `tools\` in it.

Claimed in ItsNotRexed#3232. Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_{design_rows,links,list_items,repo_paths}.py,
tests/test_i18n_index.py and tests/test_text_write_line_endings.py pass;
git diff --check is clean (Windows 11, docs only; no GPU involved).

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
Review follow-up: section 4.5's "What exists" said the DXGI shim's Present
and PresentX are both implemented over leonida::VulkanPresenter and that
on both paths GetBuffer(i) returns ordinary textures blitted at present.
Only PresentX goes through VulkanPresenter (xbox_present.cpp:25-30) and
takes ordinary textures. SwapChain::Present (dxgi_com.cpp:194) presents
through leonida::VulkanSwapchain (dxgi_com.cpp:452, dxgi_swapchain.h:107);
its GetBuffer(i) returns the swapchain images (dxgi_com.cpp:432-436,
dxgi_swapchain.h:218-229) and uses offscreen images plus a blit only when
the size or format differs from the surface's (dxgi_swapchain.h:538-541).
Section 3.2's "the part every present front end needs" now names PresentX.

Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_{design_rows,links,list_items,repo_paths}.py,
tests/test_i18n_index.py and tests/test_text_write_line_endings.py pass
(Windows 11, docs only).

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>

@whattheflop whattheflop 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.

AI-assisted source review at 32d09f2a against main f847748c. I checked the device, swapchain and test registration. The buffer-SRV stub, tier reporting and separate DXGI / PresentX paths match the updated status.

Two details would make the opening status easier to use as a milestone summary:

  • Qualify M1 as using stand-in shaders and M1.5 as using hand-written RDNA2 translated by Leonida, matching the milestone table. The same table records synthetic M2 coverage through D3D12 descriptor heaps, SRVs, sampler and translated textured-quad draw (4,096 exact pixels). That has its own CTest target, d3d12_m2_textured, and is worth mentioning alongside the earlier milestones.
  • The main-branch pipeline-state-stream and mesh support gaps are accurate. A link to open D3D-29 #1712 would give readers the status of that implementation, especially since the document's shader census makes mesh a major world-rendering dependency.

Source inspection only. No GPU runs or game files.

Review follow-up on ItsNotRexed#3500 (@whattheflop): the status paragraph now says
M1 is met with stand-in shaders (d3d12_draw_test), M1.5 with hand-written
RDNA2 run through the translator (d3d12_translated_draw_test), and M2's
synthetic part by d3d12_m2_textured_test (descriptor heaps, SRVs, a
sampler and a translated textured-quad draw, 4,096 exact pixels), as the
milestone table records. The pipeline-state-stream and mesh gap links to
D3D-29 (ItsNotRexed#1712).

Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_{design_rows,links,list_items,repo_paths}.py,
tests/test_i18n_index.py and tests/test_text_write_line_endings.py pass
(Windows 11, docs only).

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
@iurysf

iurysf commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @whattheflop, both applied in 9ecffb7: the Status now qualifies M1 (stand-in shaders, d3d12_draw_test) and M1.5 (hand-written RDNA2 run through the translator, d3d12_translated_draw_test), adds M2's synthetic part (d3d12_m2_textured_test: descriptor heaps, SRVs, a sampler and a translated textured-quad draw, 4,096 exact pixels), matching the milestone table, and points the pipeline-state-stream and mesh gap at D3D-29 (#1712). Docs tests still pass.

AI-assisted (Claude, via OpenBot).

@iurysf

iurysf commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Ran the GPU tests the new Status cites on main f847748c (RTX 4070, NVIDIA 621.01, Windows 11, MSVC 14.44, Windows SDK 26100, Vulkan SDK 1.4.363.1, LLVM_MC 23.1.6, RelWithDebInfo): ctest -C RelWithDebInfo -R "d3d12_draw|d3d12_translated_draw|d3d12_compute|d3d12_indirect_rt|d3d12_m4_compute|xbox_present|dxgi_swapchain|d3d12_xdxr_rt" → 100% passed, 0 failed out of 9 (d3d12_draw, d3d12_translated_draw, d3d12_compute, d3d12_m4_compute, d3d12_indirect_rt, xbox_present, dxgi_swapchain, d3d12_xdxr_rt, d3d12_xdxr_rt_check), none skipped. The "not implemented / not supported" items come from reading the code, not from a run. NVIDIA only.

AI-assisted (Claude, via OpenBot).

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