OLD-9771: d3d12_vulkan_device: answer features 56 and 57 before the CheckFeatureSupport switch (MSVC C4063) #1188

Closed
klikso wants to merge 1 commit from upstream-pr/1188 into main
klikso commented 2026-11-24 19:52:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by klikso on 2026-11-24T19:52:25Z.


Claimed in the coordination issue as: OLD-9771

What and why

Carries forward old-pr/9771 (draft #49) by ThomasSAMP, rebased onto current main with its author kept: one commit, one file, no change of mine.

With Windows SDK 10.0.26100.0 the D3D12_FEATURE enum ends before APPLICATION_SPECIFIC_DRIVER_STATE (56) and BYTECODE_BYPASS_HASH_SUPPORTED (57), which d3d12_feature_compat.h declares by value. Their case labels in the CheckFeatureSupport switch are outside the enum, so every MSVC build of gta6rt_d3d12_com warns twice (C4063). The commit answers the two before the switch, with the same one-BOOL "not supported" payload through write_supported_feature; the answers do not change.

Tested

Windows 11 26200.9974, MSVC 19.44.35211 (toolset 14.44.35207) + Ninja, RelWithDebInfo, Windows SDK 10.0.26100.0, on main 71f99e224.

fix removed this branch
warning C4063 in a build of d3d12_vulkan_device.cpp 2 (case '56' and case '57' "is not a valid value for switch of enum 'D3D12_FEATURE'") 0
ctest -j 6 not rerun 308 registered, 1 failed: d3d12_execute_indirect_validation, the five rows of #504, which fails on main too
d3d12_vulkan_device (compares 56 and 57 with the host in compare_host) not rerun passed

The left column is the same build folder with this commit's hunk reverted and the one file recompiled; restoring it brings the count back to 0.

  • python -I scripts/check_no_game_data.py runtime/shims/d3d12_vulkan_device.cpp: no hits. git diff --check: clean.

GPUs tested: NVIDIA GeForce RTX 3060 Ti (Ampere), driver 621.14, Vulkan 1.4.357, Windows 11 26200 (the runtime tests ran on it; the change itself is compile-time)

AI-assisted: yes (Claude Code; built and measured on the machine above)

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 rule).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5479254441 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1188). Originally posted by [klikso](https://github.com/klikso) on 2026-11-24T19:52:25Z. --- Claimed in the coordination issue as: OLD-9771 ### What and why Carries forward `old-pr/9771` (draft #49) by `ThomasSAMP`, rebased onto current `main` with its author kept: one commit, one file, no change of mine. With Windows SDK 10.0.26100.0 the `D3D12_FEATURE` enum ends before `APPLICATION_SPECIFIC_DRIVER_STATE` (56) and `BYTECODE_BYPASS_HASH_SUPPORTED` (57), which `d3d12_feature_compat.h` declares by value. Their `case` labels in the `CheckFeatureSupport` switch are outside the enum, so every MSVC build of `gta6rt_d3d12_com` warns twice (C4063). The commit answers the two before the switch, with the same one-BOOL "not supported" payload through `write_supported_feature`; the answers do not change. ### Tested Windows 11 26200.9974, MSVC 19.44.35211 (toolset 14.44.35207) + Ninja, `RelWithDebInfo`, Windows SDK 10.0.26100.0, on `main` `71f99e224`. | | fix removed | this branch | |---|---|---| | `warning C4063` in a build of `d3d12_vulkan_device.cpp` | 2 (`case '56'` and `case '57'` "is not a valid value for switch of enum 'D3D12_FEATURE'") | 0 | | `ctest -j 6` | not rerun | 308 registered, 1 failed: `d3d12_execute_indirect_validation`, the five rows of #504, which fails on `main` too | | `d3d12_vulkan_device` (compares 56 and 57 with the host in `compare_host`) | not rerun | passed | The left column is the same build folder with this commit's hunk reverted and the one file recompiled; restoring it brings the count back to 0. - `python -I scripts/check_no_game_data.py runtime/shims/d3d12_vulkan_device.cpp`: no hits. `git diff --check`: clean. GPUs tested: NVIDIA GeForce RTX 3060 Ti (Ampere), driver 621.14, Vulkan 1.4.357, Windows 11 26200 (the runtime tests ran on it; the change itself is compile-time) AI-assisted: yes (Claude Code; built and measured on the machine above) ### 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. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed: n/a (no translator rule). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Deedlyy commented 2026-11-24 20:08:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Deedlyy on 2026-11-24T20:08:54Z.


Recommendation: [MERGE]

Reasoning: Carries #49: answers D3D12 features 56/57 before the CheckFeatureSupport switch, so MSVC with SDK 10.0.26100 stops warning C4063 about case labels outside the enum. Same payload as before. Tiny, warning-only fix. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 1/10

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7143107809 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1188#issuecomment-7143107809). Originally posted by [Deedlyy](https://github.com/Deedlyy) on 2026-11-24T20:08:54Z. --- **Recommendation:** [MERGE] **Reasoning:** Carries #49: answers D3D12 features 56/57 before the `CheckFeatureSupport` switch, so MSVC with SDK 10.0.26100 stops warning C4063 about case labels outside the enum. Same payload as before. Tiny, warning-only fix. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 1/10
zmasi commented 2026-11-28 22:32:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T22:32:31Z.


#1188 | head ddb36227eb (merged cleanly with main c7753ed98a) | cmake --build runtime/build --config RelWithDebInfo --target gta6rt_d3d12_com d3d12_vulkan_device_test + ctest --test-dir runtime/build -C RelWithDebInfo -R "^d3d12_vulkan_device$" --output-on-failure (LEONIDA_VK_VALIDATION=1) | SDK/warning check: gta6rt_d3d12_com compiles with warning C4063 active in MSBuild; on Windows SDK 10.0.26100.0 (D3D12_SDK_VERSION 616), answering features 56 (APPLICATION_SPECIFIC_DRIVER_STATE) and 57 (BYTECODE_BYPASS_HASH_SUPPORTED) before switch (feature) compiles cleanly with 0 D3D12_FEATURE C4063 warnings while avoiding the 2 out-of-enum C4063 warnings emitted on earlier 10.0.26100 (D3D12_SDK_VERSION 612) headers | green on PR+main: d3d12_vulkan_device (including compare_host CheckFeatureSupport parity against the host D3D12 runtime on RTX 3090 for features 56 and 57) passes in 15.66 s with 0 Khronos validation errors; check_no_game_data.py 0 violations | Windows 11, MSVC 19.44 (SDK 10.0.26100.0 / D3D12_SDK_VERSION 616), RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246808127 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1188#issuecomment-7246808127). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T22:32:31Z. --- #1188 | head ddb36227ebcb654e758150b22a459de7100c8c5e (merged cleanly with main c7753ed98a56677f10e34078b37eab0540e190ec) | `cmake --build runtime/build --config RelWithDebInfo --target gta6rt_d3d12_com d3d12_vulkan_device_test` + `ctest --test-dir runtime/build -C RelWithDebInfo -R "^d3d12_vulkan_device$" --output-on-failure` (`LEONIDA_VK_VALIDATION=1`) | SDK/warning check: `gta6rt_d3d12_com` compiles with `warning C4063` active in MSBuild; on Windows SDK `10.0.26100.0` (`D3D12_SDK_VERSION 616`), answering features `56` (`APPLICATION_SPECIFIC_DRIVER_STATE`) and `57` (`BYTECODE_BYPASS_HASH_SUPPORTED`) before `switch (feature)` compiles cleanly with `0` `D3D12_FEATURE` `C4063` warnings while avoiding the `2` out-of-enum `C4063` warnings emitted on earlier `10.0.26100` (`D3D12_SDK_VERSION 612`) headers | green on PR+main: `d3d12_vulkan_device` (including `compare_host` `CheckFeatureSupport` parity against the host D3D12 runtime on RTX 3090 for features `56` and `57`) passes in `15.66 s` with `0` Khronos validation errors; `check_no_game_data.py` `0` violations | Windows 11, MSVC 19.44 (SDK 10.0.26100.0 / D3D12_SDK_VERSION 616), RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yes
enlight3d commented 2026-11-29 09:04:48 +00:00 (Migrated from github.com)

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


RUN of #1188 (green only, red not reproducible on this machine, GPU box, merged build)

Heads: PR head ddb36227ebcb, main 54b2a81e95c4. Tested as main + PR head (git merge --no-ff, local only): merged cleanly, no conflicts.

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_vulkan_device_test gta6rt
ctest -R "^d3d12_vulkan_device$" --output-on-failure -j1

  • Red: not reproducible here, and I am not claiming one. The PR's reason is MSVC C4063 on the two case labels 56 and 57 of the D3D12_FEATURE switch. With Windows SDK 10.0.26100.0 as installed on this machine, d3d12.h already declares D3D12_FEATURE_APPLICATION_SPECIFIC_DRIVER_STATE = 56 and D3D12_FEATURE_BYTECODE_BYPASS_HASH_SUPPORTED = 57, so main compiles d3d12_vulkan_device.cpp without any C4063 for the feature switch. Reverting the PR's file to main's and rebuilding gave the same warnings as the merged build: 3, all about DXGI_FORMAT cases 118 to 120, none about D3D12_FEATURE. (The author's SDK 10.0.26100.0 headers evidently differ from this install's.)
  • Green, merged: build without errors, no C4063 for the feature switch; d3d12_vulkan_device Passed on the RTX 3090 (it compares features 56 and 57 with the host). The same test also passes with the PR's change reverted, as expected for a change that keeps the answers identical.
  • 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:7253522209 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1188#issuecomment-7253522209). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T09:04:48Z. --- RUN of #1188 (green only, red not reproducible on this machine, GPU box, merged build) Heads: PR head `ddb36227ebcb`, main `54b2a81e95c4`. Tested as main + PR head (`git merge --no-ff`, local only): merged cleanly, no conflicts. 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_vulkan_device_test gta6rt` `ctest -R "^d3d12_vulkan_device$" --output-on-failure -j1` - Red: not reproducible here, and I am not claiming one. The PR's reason is MSVC C4063 on the two `case` labels 56 and 57 of the `D3D12_FEATURE` switch. With Windows SDK 10.0.26100.0 as installed on this machine, `d3d12.h` already declares `D3D12_FEATURE_APPLICATION_SPECIFIC_DRIVER_STATE = 56` and `D3D12_FEATURE_BYTECODE_BYPASS_HASH_SUPPORTED = 57`, so main compiles `d3d12_vulkan_device.cpp` without any C4063 for the feature switch. Reverting the PR's file to main's and rebuilding gave the same warnings as the merged build: 3, all about `DXGI_FORMAT` cases 118 to 120, none about `D3D12_FEATURE`. (The author's SDK 10.0.26100.0 headers evidently differ from this install's.) - Green, merged: build without errors, no C4063 for the feature switch; `d3d12_vulkan_device` Passed on the RTX 3090 (it compares features 56 and 57 with the host). The same test also passes with the PR's change reverted, as expected for a change that keeps the answers identical. - 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.
enlight3d commented 2026-11-29 18:23:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T18:23:11Z.


RUN #1188 | head ddb36227eb, merged cleanly with main 4364a4fa61 (local merge, not pushed)

Commands (repository root, temporary worktree):

git fetch origin pull/1188/head:pr-1188
git checkout --detach origin/main && git merge --no-edit --no-ff pr-1188
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
cmake --build runtime/build -j 6 --target gta6rt d3d12_vulkan_device_test
ctest -C RelWithDebInfo -R "^d3d12_vulkan_device$" --output-on-failure -j1

Green (merged): d3d12_vulkan_device passes (1 of 1, not skipped). It queries features 56 and 57 and compares them with the host (APPLICATION_SPECIFIC_DRIVER_STATE, BYTECODE_BYPASS_HASH_SUPPORTED), so the moved answers are covered. Build of d3d12_vulkan_device.cpp with the PR: no C4063 about D3D12_FEATURE.

Red: none. The pull request has no test and does not change behaviour; the warning it removes does not appear on this machine's SDK either (plain main compiles without a C4063 for features 56/57; its only C4063 warnings are about DXGI_FORMAT cases, the same on main and with the PR). So there is nothing to turn red here, and this run only shows the change is neutral on this SDK.

Link: no new imports vs main (gta6rt.exe, 723 DLL!symbol entries on both, dumpbin /imports).

#2566: no conflict with #2566 (merge-tree of the two heads is clean).

Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, Vulkan SDK 1.4.363.1.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7260440740 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1188#issuecomment-7260440740). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T18:23:11Z. --- RUN #1188 | head ddb36227ebcb654e758150b22a459de7100c8c5e, merged cleanly with main 4364a4fa61f6bc42eefc94452c3a565fc530dd34 (local merge, not pushed) Commands (repository root, temporary worktree): ``` git fetch origin pull/1188/head:pr-1188 git checkout --detach origin/main && git merge --no-edit --no-ff pr-1188 cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON cmake --build runtime/build -j 6 --target gta6rt d3d12_vulkan_device_test ctest -C RelWithDebInfo -R "^d3d12_vulkan_device$" --output-on-failure -j1 ``` Green (merged): `d3d12_vulkan_device` passes (1 of 1, not skipped). It queries features 56 and 57 and compares them with the host (`APPLICATION_SPECIFIC_DRIVER_STATE`, `BYTECODE_BYPASS_HASH_SUPPORTED`), so the moved answers are covered. Build of `d3d12_vulkan_device.cpp` with the PR: no C4063 about D3D12_FEATURE. Red: none. The pull request has no test and does not change behaviour; the warning it removes does not appear on this machine's SDK either (plain main compiles without a C4063 for features 56/57; its only C4063 warnings are about DXGI_FORMAT cases, the same on main and with the PR). So there is nothing to turn red here, and this run only shows the change is neutral on this SDK. Link: no new imports vs main (gta6rt.exe, 723 DLL!symbol entries on both, dumpbin /imports). #2566: no conflict with #2566 (merge-tree of the two heads is clean). Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, Vulkan SDK 1.4.363.1.
aslan2142 commented 2026-12-01 16:33:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:33:38Z.


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:7317808163 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1188#issuecomment-7317808163). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:33:38Z. --- 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!1188
No description provided.