d3d12: log CheckFeatureSupport answers for boot trace diagnostics #732

Closed
kotekompotek wants to merge 1 commit from upstream-pr/732 into main
kotekompotek commented 2026-11-24 13:02:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-24T13:02:13Z.


Claimed in the coordination issue as: coordination issue #14

What and why

  • Rebased onto current main (resolving pc_opts / kConsoleOptionsSize context conflict in runtime/shims/d3d12_vulkan_device.cpp).
  • Added log_once(...) diagnostics in CheckFeatureSupport (FEATURE_LEVELS, ARCHITECTURE/ARCHITECTURE1, OPTIONS, OPTIONS1, OPTIONS5, OPTIONS7) and synced docs/boot.md.

Tested

  • tests/test_docs_*.py + tests/test_i18n_index.py passed, python -I tests/test_boot_trace.py (32/32 OK), CTest d3d12_com (Passed, 1.61s) and d3d12_d24_support (Passed, 0.42s) passed, and d3d12_vulkan_device_test --filter feature logged the CheckFeatureSupport lines.

GPUs tested: NVIDIA GeForce GTX 1050 (driver 582.28, Windows)

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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5472652058 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/732). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-24T13:02:13Z. --- Claimed in the coordination issue as: coordination issue #14 ### What and why - Rebased onto current `main` (resolving `pc_opts` / `kConsoleOptionsSize` context conflict in `runtime/shims/d3d12_vulkan_device.cpp`). - Added `log_once(...)` diagnostics in `CheckFeatureSupport` (`FEATURE_LEVELS`, `ARCHITECTURE`/`ARCHITECTURE1`, `OPTIONS`, `OPTIONS1`, `OPTIONS5`, `OPTIONS7`) and synced `docs/boot.md`. ### Tested - `tests/test_docs_*.py` + `tests/test_i18n_index.py` passed, `python -I tests/test_boot_trace.py` (`32/32 OK`), CTest `d3d12_com` (`Passed`, 1.61s) and `d3d12_d24_support` (`Passed`, 0.42s) passed, and `d3d12_vulkan_device_test --filter feature` logged the `CheckFeatureSupport` lines. GPUs tested: NVIDIA GeForce GTX 1050 (driver 582.28, Windows) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] 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.
abnalstlll-byte commented 2026-11-24 13:14:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T13:14:41Z.

Review: APPROVED


LGTM. Adds useful log_once diagnostics for CheckFeatureSupport query answers (FEATURE_LEVELS, ARCHITECTURE, OPTIONS, OPTIONS1, OPTIONS5, OPTIONS7) and syncs docs/boot.md.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6039828592 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/732#pullrequestreview-6039828592). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T13:14:41Z. **Review:** APPROVED --- LGTM. Adds useful log_once diagnostics for CheckFeatureSupport query answers (FEATURE_LEVELS, ARCHITECTURE, OPTIONS, OPTIONS1, OPTIONS5, OPTIONS7) and syncs docs/boot.md.
kotekompotek commented 2026-11-25 09:17:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T09:17:58Z.


Rebased on current ubi/main (3f81d46ac), no conflicts. Verified on the rebased head: python -m pytest tests/test_boot_trace.py (34 passed), d3d12_com + d3d12_d24_support (2/2 Passed, Windows/GTX 1050 host + WARP).

AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7158142926 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/732#issuecomment-7158142926). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T09:17:58Z. --- Rebased on current ubi/main (3f81d46ac), no conflicts. Verified on the rebased head: `python -m pytest tests/test_boot_trace.py` (34 passed), `d3d12_com` + `d3d12_d24_support` (2/2 Passed, Windows/GTX 1050 host + WARP). AI-assisted: yes
kotekompotek commented 2026-11-25 17:01:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T17:01:08Z.


Note on the red jobs at this head: both failures are baseline, not this diff — linux-gpu-tools cs_imgatomic_ext (6/64 sint words, llvmpipe) and windows vk_xdxr_postbuild_readback (prints "skipped" but exits nonzero) fail identically on every PR rebased after ~15:00 UTC, including merged #808's own checks. Reported in #1608. Locally (GTX 1050, MSVC Debug) the tests this change touches pass.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7168877225 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/732#issuecomment-7168877225). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T17:01:08Z. --- Note on the red jobs at this head: both failures are baseline, not this diff — `linux-gpu-tools` `cs_imgatomic_ext` (6/64 sint words, llvmpipe) and `windows` `vk_xdxr_postbuild_readback` (prints "skipped" but exits nonzero) fail identically on every PR rebased after ~15:00 UTC, including merged #808's own checks. Reported in #1608. Locally (GTX 1050, MSVC Debug) the tests this change touches pass.
zmasi commented 2026-11-28 23:58:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:58:07Z.


Windows 11 + RTX 3090 Verification Report (f6c10bb435 merged onto origin/main a9e247cd69)

  • Merge Status: Clean merge onto origin/main (a9e247cd69) and clean combined merge alongside #1369, #1223, #1449, and #2414.
  • Environment: Windows 11 (10.0.26200, x64), MSVC 19.44.35228, NVIDIA GeForce RTX 3090, VK_LAYER_KHRONOS_validation 1.4.363.1 (LEONIDA_VK_VALIDATION=1, VK_VALIDATE_SYNC=1), Python 3.12.10.

Diff Audit (2 files, +8/-2)

  • runtime/shims/d3d12_vulkan_device.cpp: adds log_once(...) lines recording the concrete answers returned for D3D12_FEATURE_FEATURE_LEVELS (max), D3D12_FEATURE_ARCHITECTURE (UMA), D3D12_FEATURE_D3D12_OPTIONS (ResourceBindingTier), D3D12_FEATURE_D3D12_OPTIONS1 (WaveOps), D3D12_FEATURE_D3D12_OPTIONS5 (RaytracingTier), and D3D12_FEATURE_D3D12_OPTIONS7 (MeshShaderTier).
  • docs/boot.md: updates open-questions table rows 11 and 22 to match the new [rt] CheckFeatureSupport answer lines.

Red -> Green Verification on RTX 3090

  1. Red (origin/main a9e247cd69):
    • d3d12_vulkan_device_test.exe on RTX 3090 emitted 43 [rt] d3d12: CheckFeatureSupport feature <id> lines on stderr with 0 answer lines.
  2. Green (#732 + origin/main):
    • d3d12_vulkan_device_test.exe (/O2 /MD /EHsc /W4 /permissive- /utf-8 /bigobj, 0 new warnings) passed on RTX 3090 (15.94 s, rc=0, 0 VUID- / validation errors) and logged all 7 expected (tag, value) log_once lines across all 6 feature queries:
      • [rt] d3d12: CheckFeatureSupport FEATURE_LEVELS max 49408 (D3D_FEATURE_LEVEL_12_1)
      • [rt] d3d12: CheckFeatureSupport FEATURE_LEVELS max 0 (DXGI_ERROR_UNSUPPORTED case)
      • [rt] d3d12: CheckFeatureSupport ARCHITECTURE UMA 0
      • [rt] d3d12: CheckFeatureSupport OPTIONS ResourceBindingTier 3
      • [rt] d3d12: CheckFeatureSupport OPTIONS5 RaytracingTier 0
      • [rt] d3d12: CheckFeatureSupport OPTIONS7 MeshShaderTier 0
      • [rt] d3d12: CheckFeatureSupport OPTIONS1 WaveOps 1
    • Documentation gates: tests/test_docs_repo_paths.py, tests/test_docs_table_rows.py, and tests/test_docs_encoding.py all passed (OK, rc=0).

Verdict: PASS — ready to merge.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247781960 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/732#issuecomment-7247781960). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T23:58:07Z. --- ### Windows 11 + RTX 3090 Verification Report (`f6c10bb435` merged onto `origin/main` `a9e247cd69`) - **Merge Status**: Clean merge onto `origin/main` (`a9e247cd69`) and clean combined merge alongside `#1369`, `#1223`, `#1449`, and `#2414`. - **Environment**: Windows 11 (`10.0.26200`, x64), MSVC `19.44.35228`, NVIDIA GeForce RTX 3090, `VK_LAYER_KHRONOS_validation` `1.4.363.1` (`LEONIDA_VK_VALIDATION=1`, `VK_VALIDATE_SYNC=1`), Python `3.12.10`. #### Diff Audit (`2` files, `+8/-2`) - `runtime/shims/d3d12_vulkan_device.cpp`: adds `log_once(...)` lines recording the concrete answers returned for `D3D12_FEATURE_FEATURE_LEVELS` (`max`), `D3D12_FEATURE_ARCHITECTURE` (`UMA`), `D3D12_FEATURE_D3D12_OPTIONS` (`ResourceBindingTier`), `D3D12_FEATURE_D3D12_OPTIONS1` (`WaveOps`), `D3D12_FEATURE_D3D12_OPTIONS5` (`RaytracingTier`), and `D3D12_FEATURE_D3D12_OPTIONS7` (`MeshShaderTier`). - `docs/boot.md`: updates open-questions table rows `11` and `22` to match the new `[rt]` `CheckFeatureSupport` answer lines. #### Red -> Green Verification on RTX 3090 1. **Red (`origin/main` `a9e247cd69`)**: - `d3d12_vulkan_device_test.exe` on RTX 3090 emitted `43` `[rt] d3d12: CheckFeatureSupport feature <id>` lines on `stderr` with **`0`** answer lines. 2. **Green (`#732` + `origin/main`)**: - `d3d12_vulkan_device_test.exe` (`/O2 /MD /EHsc /W4 /permissive- /utf-8 /bigobj`, `0` new warnings) passed on RTX 3090 (`15.94 s`, `rc=0`, **`0` `VUID-` / validation errors**) and logged all `7` expected `(tag, value)` `log_once` lines across all `6` feature queries: - `[rt] d3d12: CheckFeatureSupport FEATURE_LEVELS max 49408` (`D3D_FEATURE_LEVEL_12_1`) - `[rt] d3d12: CheckFeatureSupport FEATURE_LEVELS max 0` (`DXGI_ERROR_UNSUPPORTED` case) - `[rt] d3d12: CheckFeatureSupport ARCHITECTURE UMA 0` - `[rt] d3d12: CheckFeatureSupport OPTIONS ResourceBindingTier 3` - `[rt] d3d12: CheckFeatureSupport OPTIONS5 RaytracingTier 0` - `[rt] d3d12: CheckFeatureSupport OPTIONS7 MeshShaderTier 0` - `[rt] d3d12: CheckFeatureSupport OPTIONS1 WaveOps 1` - Documentation gates: `tests/test_docs_repo_paths.py`, `tests/test_docs_table_rows.py`, and `tests/test_docs_encoding.py` all passed (`OK`, `rc=0`). **Verdict**: **PASS** — ready to merge. AI-assisted.
enlight3d commented 2026-11-29 09:05:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T09:05:13Z.


RUN of #732 (before/after output check, GPU box, merged build)

Heads: PR head f6c10bb43562, main 54b2a81e95c4. Tested as main + PR head (git merge --no-ff, local only): merged cleanly, no conflicts. The PR adds log_once diagnostics and a docs edit; it has no test of its own, so there is no test that can go red. I compared the output of the existing GPU test with and without the PR's d3d12_vulkan_device.cpp change.

Commands (VS 2022 x64 environment, from the worktree root):
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
cmake --build runtime/build -j 8 --target d3d12_com_test d3d12_d24_support_test d3d12_vulkan_device_test gta6rt
ctest -R "^(d3d12_com|d3d12_d24_support|d3d12_vulkan_device)$" -V -j1, then python -I tests/<file> for the docs and boot-trace tests.

  • "Red" (d3d12_vulkan_device.cpp reverted to main's, same build): d3d12_vulkan_device Passed, and its output has no CheckFeatureSupport FEATURE_LEVELS max / ARCHITECTURE UMA / OPTIONS ResourceBindingTier / OPTIONS1 WaveOps / OPTIONS5 RaytracingTier / OPTIONS7 MeshShaderTier line (0 lines).
  • Green (merged): d3d12_com, d3d12_d24_support and d3d12_vulkan_device all Passed. The output of d3d12_vulkan_device has all six labels (7 lines: FEATURE_LEVELS max is logged twice, with two different values), so the docs table's claim that those answers are logged holds.
  • Python checks on main + PR: test_boot_trace.py, test_i18n_index.py, test_docs_table_rows.py, test_docs_table_ids.py, test_docs_design_rows.py, test_docs_env_vars.py, test_docs_repo_paths.py OK. test_docs_links.py and test_docs_cli_flags.py fail the same way on plain main (a relative link in d3d12/README.md, a fenced PowerShell command with a flag its script lacks), so they are pre-existing and not caused by this PR.
  • Link: no new imports vs main (dumpbin /imports of gta6rt.exe, DLL!symbol, sorted: 700 entries on main and on main + PR, identical).

Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44 (VS 2022 Build Tools), CMake + Ninja, RelWithDebInfo, -DLEONIDA_REQUIRE_VULKAN=ON, Vulkan SDK 1.4.363.1.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253527072 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/732#issuecomment-7253527072). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T09:05:13Z. --- RUN of #732 (before/after output check, GPU box, merged build) Heads: PR head `f6c10bb43562`, main `54b2a81e95c4`. Tested as main + PR head (`git merge --no-ff`, local only): merged cleanly, no conflicts. The PR adds `log_once` diagnostics and a docs edit; it has no test of its own, so there is no test that can go red. I compared the output of the existing GPU test with and without the PR's `d3d12_vulkan_device.cpp` change. Commands (VS 2022 x64 environment, from the worktree root): `cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON` `cmake --build runtime/build -j 8 --target d3d12_com_test d3d12_d24_support_test d3d12_vulkan_device_test gta6rt` `ctest -R "^(d3d12_com|d3d12_d24_support|d3d12_vulkan_device)$" -V -j1`, then `python -I tests/<file>` for the docs and boot-trace tests. - "Red" (`d3d12_vulkan_device.cpp` reverted to main's, same build): `d3d12_vulkan_device` Passed, and its output has no `CheckFeatureSupport FEATURE_LEVELS max` / `ARCHITECTURE UMA` / `OPTIONS ResourceBindingTier` / `OPTIONS1 WaveOps` / `OPTIONS5 RaytracingTier` / `OPTIONS7 MeshShaderTier` line (0 lines). - Green (merged): `d3d12_com`, `d3d12_d24_support` and `d3d12_vulkan_device` all Passed. The output of `d3d12_vulkan_device` has all six labels (7 lines: `FEATURE_LEVELS max` is logged twice, with two different values), so the docs table's claim that those answers are logged holds. - Python checks on main + PR: `test_boot_trace.py`, `test_i18n_index.py`, `test_docs_table_rows.py`, `test_docs_table_ids.py`, `test_docs_design_rows.py`, `test_docs_env_vars.py`, `test_docs_repo_paths.py` OK. `test_docs_links.py` and `test_docs_cli_flags.py` fail the same way on plain main (a relative link in `d3d12/README.md`, a fenced PowerShell command with a flag its script lacks), so they are pre-existing and not caused by this PR. - Link: no new imports vs main (`dumpbin /imports` of `gta6rt.exe`, DLL!symbol, sorted: 700 entries on main and on main + PR, identical). Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44 (VS 2022 Build Tools), CMake + Ninja, RelWithDebInfo, `-DLEONIDA_REQUIRE_VULKAN=ON`, Vulkan SDK 1.4.363.1.
aslan2142 commented 2026-12-01 17:21:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:21:26Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7319169226 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/732#issuecomment-7319169226). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T17:21:26Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!732
No description provided.