diff options
| author | Sam Estep <sam@samestep.com> | 2025-08-12 11:50:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-12 15:50:15 +0000 |
| commit | 719ecf3bf6ce50a8f1d02c6f96ae65e6f492321a (patch) | |
| tree | 931acb33d3f719b2def760045733084cfe21dda8 /examples | |
| parent | 5b64150cdf0dfd6e068cdf27c5ea857c2d967d15 (diff) | |
Allow `flake.nix` users to run Vulkan tests (#8152)
This PR puts the [Khronos official Vulkan
Loader](https://github.com/NixOS/nixpkgs/blob/6027c30c8e9810896b92429f0092f624f7b1aace/pkgs/by-name/vu/vulkan-loader/package.nix#L22-L27)
in `LD_LIBRARY_PATH` for the `flake.nix` dev shell, allowing Vulkan
tests to run.
For example, before this PR:
```
$ build/Debug/bin/slang-test tests/compute/array-param.slang
Supported backends: glslang spirv-dis clang gcc genericcpp llvm spirv-opt
found test: 'tests/compute/array-param.slang'
Check vk,vulkan: Not Supported
Check cuda: Not Supported
ignored test: 'tests/compute/array-param.slang (cuda)'
passed test: 'tests/compute/array-param.slang.1 (cpu)'
ignored test: 'tests/compute/array-param.slang.2 (dx11)'
ignored test: 'tests/compute/array-param.slang.3 (dx12)'
ignored test: 'tests/compute/array-param.slang.4 (vk)'
===
100% of tests passed (1/1), 4 tests ignored
===
```
In contrast, after this PR (on an Ubuntu machine with an NVIDIA GPU):
```
$ nixGLNvidia build/Debug/bin/slang-test tests/compute/array-param.slang
Supported backends: glslang spirv-dis clang gcc genericcpp llvm spirv-opt
found test: 'tests/compute/array-param.slang'
Check vk,vulkan: Supported
Check cuda: Not Supported
ignored test: 'tests/compute/array-param.slang (cuda)'
passed test: 'tests/compute/array-param.slang.1 (cpu)'
ignored test: 'tests/compute/array-param.slang.2 (dx11)'
ignored test: 'tests/compute/array-param.slang.3 (dx12)'
passed test: 'tests/compute/array-param.slang.4 (vk)'
===
100% of tests passed (2/2), 3 tests ignored
===
```
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions
