[PR #123] cmake: pass LEONIDA_SPIRV_TOOLS to the subgroup shader build #176

Open
opened 2026-11-26 20:17:02 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/123
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: old-pr/9858


📝 Commits (1)

  • 9d4cb91 cmake: pass LEONIDA_SPIRV_TOOLS to the subgroup shader build

📊 Changes

1 file changed (+7 additions, -2 deletions)

View changed files

📝 runtime/CMakeLists.txt (+7 -2)

📄 Description

Carried over from old PR 9858 by Nevrche in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9858, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
Nevrche: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

What

d3d12_subgroup_test translates four shaders through test/shaders/build.py, which runs spirv-as. Every other shader-test block passes LEONIDA_SPIRV_TOOLS, which build.py prepends to PATH; the subgroup block did not. A configure with -DLEONIDA_SPIRV_AS=<path> but without VulkanSDK\Bin on PATH therefore failed at build time with:

spirv-as not found; install SPIRV-Tools (spirv-as, spirv-val) and put it on PATH

Fix

Compute LEONIDA_SPIRV_TOOLS_NATIVE outside the M1.5 guard (whenever spirv-as is found) and pass it in the subgroup custom command.

Tested

Windows 10 Pro 22H2 (19045), MSVC 19.44.35230, VS 2022 generator, RelWithDebInfo, Vulkan SDK 1.4.363.0, llvm-mc 21.1.8, with VulkanSDK\Bin not on PATH:

  • configure + cmake --build runtime/build --target d3d12_subgroup_test succeeds, all four variants translated;
  • ctest -R ^d3d12_subgroup$ passes (1.89 s).

Note on the current main

Tested on 31276208. At the current main (7e39a81ea) this machine cannot build gta6rt_d3d12_com at all, in a clean build directory:

  • d3d12_vulkan_device.cpp(10001): DescriptorHeap has no constructor taking (state, desc, console_address, console_size);
  • (10002): Device::identity is private;
  • d3d12_xs_device.cpp(1606): rt::d3d12::create_console_descriptor_heap is not declared there (the file does not include d3d12_com.h).

That is unrelated to this change (it touches only runtime/CMakeLists.txt), but it is why CI may be red here.

AI-assisted.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/123 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-pr/9858` --- ### 📝 Commits (1) - [`9d4cb91`](https://github.com/ubiquitarianism/leonida/commit/9d4cb9171e79466bfc702621cc9317126bbc02c2) cmake: pass LEONIDA_SPIRV_TOOLS to the subgroup shader build ### 📊 Changes **1 file changed** (+7 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `runtime/CMakeLists.txt` (+7 -2) </details> ### 📄 Description > Carried over from **old PR 9858** by `Nevrche` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9858`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `Nevrche`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): ## What `d3d12_subgroup_test` translates four shaders through `test/shaders/build.py`, which runs `spirv-as`. Every other shader-test block passes `LEONIDA_SPIRV_TOOLS`, which `build.py` prepends to `PATH`; the subgroup block did not. A configure with `-DLEONIDA_SPIRV_AS=<path>` but without `VulkanSDK\Bin` on `PATH` therefore failed at build time with: ``` spirv-as not found; install SPIRV-Tools (spirv-as, spirv-val) and put it on PATH ``` ## Fix Compute `LEONIDA_SPIRV_TOOLS_NATIVE` outside the M1.5 guard (whenever `spirv-as` is found) and pass it in the subgroup custom command. ## Tested Windows 10 Pro 22H2 (19045), MSVC 19.44.35230, VS 2022 generator, RelWithDebInfo, Vulkan SDK 1.4.363.0, llvm-mc 21.1.8, with `VulkanSDK\Bin` **not** on `PATH`: - configure + `cmake --build runtime/build --target d3d12_subgroup_test` succeeds, all four variants translated; - `ctest -R ^d3d12_subgroup$` passes (1.89 s). ## Note on the current `main` Tested on `31276208`. At the current `main` (`7e39a81ea`) this machine cannot build `gta6rt_d3d12_com` at all, in a clean build directory: - `d3d12_vulkan_device.cpp(10001)`: `DescriptorHeap` has no constructor taking `(state, desc, console_address, console_size)`; - `(10002)`: `Device::identity` is private; - `d3d12_xs_device.cpp(1606)`: `rt::d3d12::create_console_descriptor_heap` is not declared there (the file does not include `d3d12_com.h`). That is unrelated to this change (it touches only `runtime/CMakeLists.txt`), but it is why CI may be red here. AI-assisted. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#176
No description provided.