d3d12: compute pipelines carry their shader's name through VK_EXT_debug_utils (RT-NAME-COMPUTE-PIPELINES) #1909

Closed
HasiKe wants to merge 1 commit from upstream-pr/1909 into main
HasiKe commented 2026-11-25 15:32:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by HasiKe on 2026-11-25T15:32:00Z.


Item: RT-NAME-COMPUTE-PIPELINES (claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7166956386)

What

When the instance enabled VK_EXT_debug_utils (the title device already turns it on for the debug markers whenever the loader has it), build_compute names each compute VkPipeline after its shader (library/lib_cs_NNNNN, ..._Wrapped) through vkSetDebugUtilsObjectNameEXT. Without the extension set_object_name stays null and nothing changes.

Why

On a device loss, VK_LAYER_LUNARG_crash_diagnostic prints the pipeline of the last started dispatch only as a bare handle, so matching it to a shader took a local handle log and a rebuild. With the name, the dump reads handle: 0x...[library/lib_cs_01144] directly. RenderDoc shows the same names.

Tested

  • RTX 2070 SUPER, NVIDIA 616.56, Windows 11, main 71a769d7d plus this change, retail run with LEONIDA_TITLE_WINDOWS_MB=4096 LEONIDA_ARENA_MB=4096 LEONIDA_TITLE_WATCHDOG=0 and the crash-diagnostic layer: the device-loss dump names the dispatch in flight as library/lib_cs_01144 (128x64x1 groups), the "crash B" that #1849 is about.
  • gta6rt builds (RelWithDebInfo, MSVC). No new test: the call has no result to check beyond the layer's dump.

AI-assisted (Claude Code). No game data.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5494350110 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1909). Originally posted by [HasiKe](https://github.com/HasiKe) on 2026-11-25T15:32:00Z. --- Item: RT-NAME-COMPUTE-PIPELINES (claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7166956386) ## What When the instance enabled `VK_EXT_debug_utils` (the title device already turns it on for the debug markers whenever the loader has it), `build_compute` names each compute `VkPipeline` after its shader (`library/lib_cs_NNNNN`, `..._Wrapped`) through `vkSetDebugUtilsObjectNameEXT`. Without the extension `set_object_name` stays null and nothing changes. ## Why On a device loss, `VK_LAYER_LUNARG_crash_diagnostic` prints the pipeline of the last started dispatch only as a bare handle, so matching it to a shader took a local handle log and a rebuild. With the name, the dump reads `handle: 0x...[library/lib_cs_01144]` directly. RenderDoc shows the same names. ## Tested - RTX 2070 SUPER, NVIDIA 616.56, Windows 11, `main` 71a769d7d plus this change, retail run with `LEONIDA_TITLE_WINDOWS_MB=4096 LEONIDA_ARENA_MB=4096 LEONIDA_TITLE_WATCHDOG=0` and the crash-diagnostic layer: the device-loss dump names the dispatch in flight as `library/lib_cs_01144` (128x64x1 groups), the "crash B" that #1849 is about. - `gta6rt` builds (RelWithDebInfo, MSVC). No new test: the call has no result to check beyond the layer's dump. AI-assisted (Claude Code). No game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MoonEyes commented 2026-11-28 18:02:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T18:02:23Z.


Hi @HasiKe, thanks for this pull request. It currently conflicts with main (conflicting file(s): runtime/shims/d3d12_vulkan_device.cpp), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7243481180 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1909#issuecomment-7243481180). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T18:02:23Z. --- Hi @HasiKe, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `runtime/shims/d3d12_vulkan_device.cpp`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
HasiKe commented 2026-11-28 18:12:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by HasiKe on 2026-11-28T18:12:43Z.


Rebased on main (7daa4a4a5). The conflict was only in runtime/shims/d3d12_vulkan_device.cpp: the compute build moved into build_compute_pipeline, so the name is now set there, and only when the pipeline was created. The change is still the same 16 lines. gta6rt builds (RelWithDebInfo, MSVC). I did not run it in the game again after the rebase.

AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7243616236 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1909#issuecomment-7243616236). Originally posted by [HasiKe](https://github.com/HasiKe) on 2026-11-28T18:12:43Z. --- Rebased on main (`7daa4a4a5`). The conflict was only in `runtime/shims/d3d12_vulkan_device.cpp`: the compute build moved into `build_compute_pipeline`, so the name is now set there, and only when the pipeline was created. The change is still the same 16 lines. `gta6rt` builds (RelWithDebInfo, MSVC). I did not run it in the game again after the rebase. AI-assisted (Claude Code, Claude Opus 5.5)
zmasi commented 2026-11-28 21:42:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T21:42:24Z.


#1909 | head b8b866933f (merged cleanly with main aa918e5d9f) | ctest --test-dir runtime/build -C RelWithDebInfo -R "^(d3d12_compute|d3d12_debug_markers)$" --output-on-failure (LEONIDA_VK_VALIDATION=1) + live info.debug_utils = true vkSetDebugUtilsObjectNameEXT pipeline-naming probe | control & probe: with debug_utils == false (set_object_name == nullptr), name_object is a clean no-op; with info.debug_utils = true under VK_LAYER_KHRONOS_validation 1.4.363.1, vkSetDebugUtilsObjectNameEXT resolves from the live Vulkan instance and names all 4 built cs_user_data compute VkPipeline handles with VK_SUCCESS (0) | green on PR+main: d3d12_compute and d3d12_debug_markers pass on RTX 3090 across both debug_utils off and on with 0 Khronos validation errors; check_no_game_data.py 0 violations | Windows 11, MSVC 19.44, RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246212004 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1909#issuecomment-7246212004). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T21:42:24Z. --- #1909 | head b8b866933fb53c4bb72e3d08a00995ef5349569b (merged cleanly with main aa918e5d9f9e2f03e078d8f08854324890b5e176) | `ctest --test-dir runtime/build -C RelWithDebInfo -R "^(d3d12_compute|d3d12_debug_markers)$" --output-on-failure` (`LEONIDA_VK_VALIDATION=1`) + live `info.debug_utils = true` `vkSetDebugUtilsObjectNameEXT` pipeline-naming probe | control & probe: with `debug_utils == false` (`set_object_name == nullptr`), `name_object` is a clean no-op; with `info.debug_utils = true` under `VK_LAYER_KHRONOS_validation` `1.4.363.1`, `vkSetDebugUtilsObjectNameEXT` resolves from the live Vulkan instance and names all 4 built `cs_user_data` compute `VkPipeline` handles with `VK_SUCCESS` (`0`) | green on PR+main: `d3d12_compute` and `d3d12_debug_markers` pass on RTX 3090 across both `debug_utils` off and on with `0` Khronos validation errors; `check_no_game_data.py` `0` violations | Windows 11, MSVC 19.44, RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yes
enlight3d commented 2026-11-29 09:02:49 +00:00 (Migrated from github.com)

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


RUN #1909 | head b8b866933f, merged cleanly with main 54b2a81e95 (local merge, not pushed)

This pull request has no test of its own (its description says so), so there is no red: nothing in the tree checks that a compute pipeline gets its name. What I ran is the tests of the code it touches.

Commands (from the repository root, in a worktree):

git fetch origin pull/1909/head:pr-1909
git checkout --detach origin/main && git merge --no-edit --no-ff pr-1909
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
cmake --build runtime/build -j 8 --target gta6rt d3d12_compute_test d3d12_debug_markers_test
ctest -C RelWithDebInfo -R "^(d3d12_compute|d3d12_debug_markers)$" --output-on-failure -j1
  • Build: gta6rt and both test targets build, no error.
  • Green: d3d12_debug_markers and d3d12_compute pass (2/2). The same two pass again with LEONIDA_VK_VALIDATION=1 set.
  • Red: not applicable (no test for the change, so not invented).
  • Link: no new imports vs main (gta6rt.exe, 723 DLL!symbol entries, same list as the baseline built from main).

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:7253499530 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1909#issuecomment-7253499530). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T09:02:49Z. --- RUN #1909 | head b8b866933fb53c4bb72e3d08a00995ef5349569b, merged cleanly with main 54b2a81e95c470c953ddee6177fd6255cbaf041d (local merge, not pushed) This pull request has no test of its own (its description says so), so there is no red: nothing in the tree checks that a compute pipeline gets its name. What I ran is the tests of the code it touches. Commands (from the repository root, in a worktree): ``` git fetch origin pull/1909/head:pr-1909 git checkout --detach origin/main && git merge --no-edit --no-ff pr-1909 cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON cmake --build runtime/build -j 8 --target gta6rt d3d12_compute_test d3d12_debug_markers_test ctest -C RelWithDebInfo -R "^(d3d12_compute|d3d12_debug_markers)$" --output-on-failure -j1 ``` - Build: gta6rt and both test targets build, no error. - Green: `d3d12_debug_markers` and `d3d12_compute` pass (2/2). The same two pass again with `LEONIDA_VK_VALIDATION=1` set. - Red: not applicable (no test for the change, so not invented). - Link: no new imports vs main (gta6rt.exe, 723 DLL!symbol entries, same list as the baseline built from main). Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, Vulkan SDK 1.4.363.1.
enlight3d commented 2026-11-29 18:12:52 +00:00 (Migrated from github.com)

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


RUN on PR #1909 (head b8b866933) merged with origin/main eedd72e30 (clean merge, local only, not pushed).
No conflict with #2566 (git merge-tree of the two heads is clean).

Commands (VS 2022 Build Tools, Ninja, RelWithDebInfo, -DLEONIDA_REQUIRE_VULKAN=ON, 6 jobs):

  • cmake --build --target gta6rt d3d12_debug_markers_test d3d12_vulkan_device_test d3d12_compute_test d3d12_compute_journal_test d3d12_big_compute_test d3d12_fspx_compute_test d3d12_m4_compute_test d3d12_set0_compute_test
  • ctest -C RelWithDebInfo -R "^(d3d12_debug_markers|d3d12_vulkan_device|d3d12_compute|d3d12_compute_journal|d3d12_big_compute|d3d12_fspx_compute|d3d12_m4_compute|d3d12_set0_compute)$"

Green (main + PR): 8/8 passed on the GPU.
Red: none. The PR adds no test, and the change (naming compute pipelines through vkSetDebugUtilsObjectNameEXT) has no result the existing tests can read back, so I did not invent a red. The existing tests only show that the new code path (debug utils on, compute pipelines created) does not break anything.
Link: gta6rt links on main + PR; dumpbin /imports: no new imports vs main (723 DLL!symbol entries on both; the new entry point is loaded with vkGetInstanceProcAddr/vkGetDeviceProcAddr, not imported).
Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 26300, i9-13900K, 64 GB, MSVC 14.44.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7260303127 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1909#issuecomment-7260303127). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T18:12:52Z. --- RUN on PR #1909 (head b8b866933) merged with origin/main eedd72e30 (clean merge, local only, not pushed). No conflict with #2566 (git merge-tree of the two heads is clean). Commands (VS 2022 Build Tools, Ninja, RelWithDebInfo, -DLEONIDA_REQUIRE_VULKAN=ON, 6 jobs): - cmake --build --target gta6rt d3d12_debug_markers_test d3d12_vulkan_device_test d3d12_compute_test d3d12_compute_journal_test d3d12_big_compute_test d3d12_fspx_compute_test d3d12_m4_compute_test d3d12_set0_compute_test - ctest -C RelWithDebInfo -R "^(d3d12_debug_markers|d3d12_vulkan_device|d3d12_compute|d3d12_compute_journal|d3d12_big_compute|d3d12_fspx_compute|d3d12_m4_compute|d3d12_set0_compute)$" Green (main + PR): 8/8 passed on the GPU. Red: none. The PR adds no test, and the change (naming compute pipelines through vkSetDebugUtilsObjectNameEXT) has no result the existing tests can read back, so I did not invent a red. The existing tests only show that the new code path (debug utils on, compute pipelines created) does not break anything. Link: gta6rt links on main + PR; dumpbin /imports: no new imports vs main (723 DLL!symbol entries on both; the new entry point is loaded with vkGetInstanceProcAddr/vkGetDeviceProcAddr, not imported). Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 26300, i9-13900K, 64 GB, MSVC 14.44.
aslan2142 commented 2026-12-01 16:38:58 +00:00 (Migrated from github.com)

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


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