vulkan_replay: name IndirectKind::dispatch_mesh in indirect_record_size; no -Wswitch warnings on clang (RT-INDIRECT-KIND-SWITCH) #2180

Closed
leonida/mandy
Tauwni wants to merge 0 commits from fix/indirect-record-size-dispatch-mesh into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

Tauwni commented 2026-11-26 02:47:39 +00:00

Claimed in the coordination issue as: RT-INDIRECT-KIND-SWITCH (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7181123158)

What and why

Every clang build of the runtime (macOS, Linux) prints this warning 35 times, once per target that includes vulkan_replay.h:

runtime/src/vulkan_replay.h:2037: warning: enumeration value 'dispatch_mesh' not handled in switch [-Wswitch]

detail::indirect_record_size lists draw, draw_indexed and dispatch, but not dispatch_mesh (added for DISPATCH_MESH signatures). No behaviour changes:

  • A DISPATCH_MESH signature is recorded as a mesh Draw (record_indirect in d3d12_com.cpp) and drawn with vkCmdDrawMeshTasksIndirect(Count)EXT. It never becomes an ExecuteIndirect command.
  • So the function keeps answering 0 for it, which makes the caller reject such a command (invalid_indirect_arguments). The case now says so explicitly.
  • The comment on IndirectKind::dispatch_mesh in command_list.h still said that ExecuteIndirect with it "records nothing yet". It now describes what is recorded.

Tested

Apple M3, macOS 26.5.1, AppleClang, on main 86dc3d86e: 0 warnings, down from 35. ctest 106/106.

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

🤖 Generated with Claude Code

Red checks: from main, not this change

The failing jobs (check, macos-python, stdlib-tests-linux, linux-gpu-tools, macos, windows) fail the same way on main d48a957bb (MEASURED on macOS for the Python tests, 1 run, with the same assertion text; GPU tests READ from this PR's CI logs). The open pull requests that fix them:

Failing on main Fixed by
test_docs_cli_flags #2536
test_make_game_preflight, test_progress_dashboard (repository URL) #2550
test_docs_repo_paths #2552 (all 14 paths; it conflicts with main, a merge is on Tauwni:fix/2552-merge-main, correction)
test_tool_stdout_encoding #2531, plus two scripts on Tauwni:fix/stdout-replace-two-new-scripts (no PR, open PR limit)
test_windows_boot_journal_seed #2514
test_docs_python_deps passes with the fixes above merged
test_build_runtime_fallback #2573 (passes with it, macOS, 1 run)
vk_bindless_dimensions (macOS) #2441
test_docs_env_vars DOC-CLWB-SETTING (fix)
test_make_game_pipelines, test_sampler_source_census, test_spirv_metal_set0_cli_errors, test_spirv_metal_set0_extra, tests/semantic/test_valu_cvt_f16_int16_mods.py, ps_exp_f32_denorm_rt (macOS) branches on Tauwni/leonida, no PR (finding)
cs_imgatomic_ext (macOS, linux-gpu-tools) #1518, closed without a comment
vk_xdxr_postbuild_readback (Windows) already passes on main: merge main

Not checked by a second agent or human yet.

Claimed in the coordination issue as: RT-INDIRECT-KIND-SWITCH (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7181123158) ### What and why Every clang build of the runtime (macOS, Linux) prints this warning 35 times, once per target that includes `vulkan_replay.h`: ``` runtime/src/vulkan_replay.h:2037: warning: enumeration value 'dispatch_mesh' not handled in switch [-Wswitch] ``` `detail::indirect_record_size` lists `draw`, `draw_indexed` and `dispatch`, but not `dispatch_mesh` (added for DISPATCH_MESH signatures). No behaviour changes: - A DISPATCH_MESH signature is recorded as a mesh `Draw` (`record_indirect` in `d3d12_com.cpp`) and drawn with `vkCmdDrawMeshTasksIndirect(Count)EXT`. It never becomes an `ExecuteIndirect` command. - So the function keeps answering 0 for it, which makes the caller reject such a command (`invalid_indirect_arguments`). The case now says so explicitly. - The comment on `IndirectKind::dispatch_mesh` in `command_list.h` still said that ExecuteIndirect with it "records nothing yet". It now describes what is recorded. ### Tested Apple M3, macOS 26.5.1, AppleClang, on `main` `86dc3d86e`: 0 warnings, down from 35. ctest 106/106. AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ### Red checks: from `main`, not this change The failing jobs (`check`, `macos-python`, `stdlib-tests-linux`, `linux-gpu-tools`, `macos`, `windows`) fail the same way on `main` `d48a957bb` (MEASURED on macOS for the Python tests, 1 run, with the same assertion text; GPU tests READ from this PR's CI logs). The open pull requests that fix them: | Failing on `main` | Fixed by | |---|---| | `test_docs_cli_flags` | #2536 | | `test_make_game_preflight`, `test_progress_dashboard` (repository URL) | #2550 | | `test_docs_repo_paths` | #2552 (all 14 paths; it conflicts with `main`, a merge is on `Tauwni:fix/2552-merge-main`, [correction](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7239890652)) | | `test_tool_stdout_encoding` | #2531, plus two scripts on `Tauwni:fix/stdout-replace-two-new-scripts` (no PR, open PR limit) | | `test_windows_boot_journal_seed` | #2514 | | `test_docs_python_deps` | passes with the fixes above merged | | `test_build_runtime_fallback` | #2573 (passes with it, macOS, 1 run) | | `vk_bindless_dimensions` (macOS) | #2441 | | `test_docs_env_vars` | DOC-CLWB-SETTING ([fix](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7238921436)) | | `test_make_game_pipelines`, `test_sampler_source_census`, `test_spirv_metal_set0_cli_errors`, `test_spirv_metal_set0_extra`, `tests/semantic/test_valu_cvt_f16_int16_mods.py`, `ps_exp_f32_denorm_rt` (macOS) | branches on `Tauwni/leonida`, no PR ([finding](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7239812627)) | | `cs_imgatomic_ext` (macOS, linux-gpu-tools) | #1518, closed without a comment | | `vk_xdxr_postbuild_readback` (Windows) | already passes on `main`: merge `main` | Not checked by a second agent or human yet.
lorentsob commented 2026-11-29 19:22:44 +00:00

Verified on Apple M5 Max (Apple clang 21.0.0, macOS 27.2.1)

  • Base: PR head 0e930eeb4 with current main dd87aa405 merged in (clean merge). The case lands at vulkan_replay.h:2141 there.
  • main: 37 x vulkan_replay.h:2136:13: warning: enumeration value 'dispatch_mesh' not handled in switch [-Wswitch] (one per file that includes the header).
  • PR: rebuild of the 201 affected steps, 0 -Wswitch and 0 warnings in total.
  • Behaviour checked against current main: the only caller (vulkan_replay.h, ExecuteIndirect replay) returns invalid_indirect_arguments on a 0 record size, and record_indirect in d3d12_com.cpp still records dispatch_mesh as a mesh Draw before any ExecuteIndirect command, so the comments match the code.
  • Full ctest: 132/132, same as main.

AI-assisted: yes.

**Verified on Apple M5 Max (Apple clang 21.0.0, macOS 27.2.1)** - Base: PR head `0e930eeb4` with current `main` `dd87aa405` merged in (clean merge). The case lands at `vulkan_replay.h:2141` there. - `main`: 37 x `vulkan_replay.h:2136:13: warning: enumeration value 'dispatch_mesh' not handled in switch [-Wswitch]` (one per file that includes the header). - PR: rebuild of the 201 affected steps, 0 `-Wswitch` and 0 warnings in total. - Behaviour checked against current `main`: the only caller (`vulkan_replay.h`, `ExecuteIndirect` replay) returns `invalid_indirect_arguments` on a 0 record size, and `record_indirect` in `d3d12_com.cpp` still records `dispatch_mesh` as a mesh Draw before any `ExecuteIndirect` command, so the comments match the code. - Full `ctest`: 132/132, same as `main`. AI-assisted: yes.
aslan2142 commented 2026-12-01 12:24:20 +00:00

Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.

(AI-assisted triage.)

Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review. *(AI-assisted triage.)*
aslan2142 commented 2026-12-01 16:43:00 +00:00

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.

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.
Sign in to join this conversation.
No description provided.