Repository navigation
docs: bring the D3D12 -> Vulkan layer status up to date - #3500
Conversation
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
left a comment
There was a problem hiding this comment.
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>
|
Thanks @whattheflop, both applied in 9ecffb7: the Status now qualifies M1 (stand-in shaders, AI-assisted (Claude, via OpenBot). |
|
Ran the GPU tests the new Status cites on AI-assisted (Claude, via OpenBot). |
Claimed in #3232 (#3232 (comment)).
docs/d3d12_vulkan.mdanddocs/design.mdstill described the D3D12 layer as mostly unwritten. This updates the statements that contradictmain, and only those:docs/d3d12_vulkan.md): root signatures (packed into the 32 user-data dwords), graphics and compute PSOs, draws, dispatches,ExecuteIndirect, and presentation throughPresentXor 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;RaytracingTieris reported asNOT_SUPPORTED, whileBuildRaytracingAccelerationStructurebuilds XDXR BVH4 structures (section 4.8). Which present path the game uses stays open (question 6).VulkanPresenteris what thePresentXfront end uses (not "every" front end).D3D12_PIPELINE_STATE_STREAM_DESC(CreatePipelineState) is not yet.Presenthas its ownleonida::VulkanSwapchain(dxgi_com.cpp:452,dxgi_swapchain.h:107) and itsGetBuffer(i)returns the swapchain images, with offscreen images and a blit only when size or format differ (dxgi_swapchain.h:538-541);PresentXgoes throughVulkanPresenterand 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 tod3d12_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 possiblefinding:): the comment atruntime/shims/d3d12_vulkan_device.cpp:2474-2476. None of the open PRs that editdocs/d3d12_vulkan.mdtouch these lines; a trial merge withmainis 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 --checkclean.AI-assisted: written and checked with Claude (via OpenBot), with an independent AI review against the code before submitting.