Skip to content

docs/d3d12_vulkan.md: drop stale "not implemented" status for buffer SRVs, streams, mesh PSOs and WriteBufferImmediate (DOC-D3D12-VULKAN-STALE-STATUS) - #2910

Merged
MoonEyes merged 2 commits into
ProjectLeonida:mainfrom
c0pperlane:doc-d3d12-vulkan-stale-status
Dec 1, 2026

Conversation

@c0pperlane

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: DOC-D3D12-VULKAN-STALE-STATUS (#1608 (comment))

What and why

docs/d3d12_vulkan.md still described several implemented paths as missing:

  • The status paragraph said buffer SRVs, CreatePipelineState streams and mesh shaders were not implemented. The device writes buffer SRV V#s (write_buffer_srv, CreateShaderResourceView in d3d12_vulkan_device.cpp), parses streams into compute, graphics and mesh PSOs (D3D-29), and reports MeshShaderTier 1 where the GPU has VK_EXT_mesh_shader. Tessellation, stream output and amplification shaders are still refused, and the paragraph now says that. The unreadable old number tools: add auto fallback to python disassembler in shader_disasm and shader_library #1712 is dropped.
  • The test list and section 4.2 said WriteBufferImmediate was refused "while no buffer has a GPU virtual address". Buffers get their console VA in the arena (binding.va, GetGPUVirtualAddress), and d3d12_vulkan_device_test writes through a placed buffer's VA. The text now says a write is refused (unresolved_resource) only when no buffer holds its 4 bytes. The same stale comment in d3d12_vulkan_device_test.cpp now gives the real reason VA 0x10000 is unresolved: it is below kArenaReserved.
  • Section 3.2 still listed buffer shader-resource views and constant-buffer views as known gaps whose V#s "are not written". write_buffer_srv writes raw, structured and typed buffer SRV V#s for CreateShaderResourceView, and CreateConstantBufferView writes a CBV V# in the console's 16-byte-row form, both checked in d3d12_compute_test.
  • Section 4.6 "Not implemented yet": the single-list replay() bullet contradicted the D3D-399 paragraph above it (replay_query_predication_test case 14), and the mesh-statistics bullet appeared twice. Both are removed.

No lines edited by #381 are touched (git merge-tree against #381 gives the same three doc conflict hunks #381 already has with main, no new one).

Tested

  • python -I tests/test_docs_*.py (all 13 files): OK.
  • python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md runtime/test/d3d12_vulkan_device_test.cpp: clean.
  • The C++ change is a comment only, so the runtime was not rebuilt. Windows 11 Pro, Python 3.12.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

…SRVs, streams, mesh PSOs and WriteBufferImmediate (DOC-D3D12-VULKAN-STALE-STATUS)

The status paragraph said buffer SRVs, CreatePipelineState streams and mesh
shaders were missing; the device writes buffer V#s, parses streams and reports
MeshShaderTier 1 where the GPU has VK_EXT_mesh_shader. WriteBufferImmediate was
described as refused because no buffer had a GPU VA; buffers have VAs and the
device test writes through a placed buffer's. Section 4.6's "Not implemented
yet" contradicted the D3D-399 paragraph above it and listed mesh statistics
twice. The device test's comment on the unresolved write gets the real reason.
…KAN-STALE-STATUS)

Section 3.2 listed buffer shader-resource views and constant-buffer views as
known gaps whose V#s are not written. write_buffer_srv writes raw, structured
and typed buffer SRV V#s for CreateShaderResourceView, and
CreateConstantBufferView writes a CBV V# in the console's 16-byte-row form;
d3d12_compute_test checks both.

@KelboLive KelboLive left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checked all four status fixes against the code and they hold: buffer SRV V#s (write_buffer_srv / buffer CreateShaderResourceView, d3d12_vulkan_device.cpp:14107-14184, :14218; tests at d3d12_compute_test.cpp:886-960), CBVs including the 16-byte-row console form and LEONIDA_CBV_RAW (:14045-14088), CreatePipelineState streams plus mesh PSOs and MeshShaderTier (:7919, :8236, :15646), and WriteBufferImmediate resolving by VA with an unresolved_resource refusal (vulkan_replay.h:3771-3775; tests at 6389-6397, 7265-7283). The hull/domain/stream-output/AS refusals match :8229/:8280, and deleting the 4.6 single-list bullet is right — I reverted the pool guard at vulkan_replay.h:5350 and case 14 fails four assertions, so that bullet was indeed false.

All 13 tests/test_docs_*.py pass, check_no_game_data is clean, and merge-tree with current main is clean despite the doc growing ~1,400 lines since the base.

One contradiction is left: the M4 row (docs/d3d12_vulkan.md:4329) still lists "buffer SRVs and CBVs as V#s" under "Still open for M4", which now contradicts the new §3.2 text. Please drop that clause in this PR.

Minor: #381 is closed, so the "no lines edited by #381" note in the body is stale.

The C++ change is a comment only; the only execution I could do here was the CPU replay_query_predication_test (exit 0), which is what the deleted bullet was about. No other open PR edits these hunks.

@merzleckeier

Copy link
Copy Markdown
Contributor

Independent runtime checks for the Vulkan status updates at b79c86f7 + 27613ab6b. The three documentation suites passed 28 checks on each tree. I also built the Win64 test binaries and ran them under Wine 11.22 on Radeon RADV (Mesa 26.3.1) and GeForce RTX 4070 SUPER (620.73.04).

d3d12_vulkan_device, d3d12_compute and replay_query_predication passed on both. This covers the placed-buffer WriteBufferImmediate readback and unresolved case, raw/structured/typed buffer SRV readback and CBV readback, and the single-list replay cases. The NVIDIA mesh test passed the stream PSO path and matched all 4,096 pixels.

One existing RADV discrepancy surfaced in the mesh suite. The original test fails the same mixed-statistics assertion on main and on this PR. A print-only rerun showed 2 geometry-shader invocations in both the mixed and vertex-only queries, 0 in mesh-only, and 0 geometry primitives in all three. NVIDIA reports 0 geometry invocations in all three. The RADV run passed the preceding indirect mesh pixel comparison and ended at the statistics assertion. The PR changes documentation and a test comment.

MEASURED with synthetic tests. AI-assisted (Codex).

@MoonEyes

MoonEyes commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Merging. Head b79c86f7e merges cleanly with main 1a52f5b63 and does not force a rebase of #2566. Correction of my merge note: I ran the docs suites on main plus the PR earlier (13 docs test files green) and a read-only code review found no blocking issue; a third party (merzleckeier) posted independent runtime checks on this head. I did not rebuild runtime/ or run ctest: the only C++ change is a comment. Merged by MoonEyes.

AI-assisted (Claude Code).

@MoonEyes
MoonEyes merged commit c4ca576 into ProjectLeonida:main Dec 1, 2026
8 checks passed
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.

4 participants