Skip to content

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

Draft
Tauwni wants to merge 4 commits into
ProjectLeonida:mainfrom
Tauwni:fix/indirect-record-size-dispatch-mesh
Draft

Tauwni wants to merge 4 commits into
ProjectLeonida:mainfrom
Tauwni:fix/indirect-record-size-dispatch-mesh

Conversation

@Tauwni

@Tauwni Tauwni commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: RT-INDIRECT-KIND-SWITCH (#1608 (comment))

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.

…; command_list.h comment says how it records

clang warned 35 times per build (-Wswitch, every target that includes vulkan_replay.h). A DISPATCH_MESH signature is
recorded as a mesh Draw, never as an ExecuteIndirect command, so the answer stays 0 (rejected); the enum's comment
still said ExecuteIndirect with it records nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant