Decode generated shader fixture paths as UTF-8 (TEST-SHADER-FIXTURE-UTF8) #2069

Open
github-bot wants to merge 1 commit from github-bot/gh-2069 into main AGit
Owner

@⁠alexandersato0830 on GitHub · 2026-11-25 19:29 UTC · original
alexandersato0830:codex/shader-fixture-utf8 → main · +21 −0 · 2 files · 1 commits · open

Claimed in the coordination issue as: TEST-SHADER-FIXTURE-UTF8

What and why

CMake passes the absolute generated shader paths to GPU tests as narrow UTF-8 strings. The implicit filesystem path conversion uses the Windows native narrow encoding, which can make tests miss a shader under a non-ASCII build directory. Convert these strings as UTF-8 before checking the original file and the packaged fallback. Callers that already have a filesystem path use the existing overload. C++ filesystem encoding rules

Tested

  • Native Windows 11, MSVC 19.51. The regression failed on main e48ff03 and passed in shader_fixture_path CTest after the patch. It exercises both an absolute generated path and a packaged fallback with non-ASCII names.
  • Built vk_null_descriptor_test in a non-ASCII CMake build directory and ran it successfully on the RTX 4080 from a working directory without a fixture fallback. The standalone compiler crashed when asked to emit directly into that build directory. For the reader test, I staged the synthetic SPIR-V generated from byte-identical GLSL in an ASCII build directory.
  • Verified git diff --check and the source-only check.

GPUs tested: NVIDIA RTX 4080, driver 621.01, Windows 11.

AI-assisted: yes.

  • Based on current main.
  • One topic.
  • Uses source and synthetic fixtures.
**@⁠alexandersato0830** on GitHub · 2026-11-25 19:29 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2069) `alexandersato0830:codex/shader-fixture-utf8` → `main` · +21 −0 · 2 files · 1 commits · open Claimed in the coordination issue as: [TEST-SHADER-FIXTURE-UTF8](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why CMake passes the absolute generated shader paths to GPU tests as narrow UTF-8 strings. The implicit filesystem path conversion uses the Windows native narrow encoding, which can make tests miss a shader under a non-ASCII build directory. Convert these strings as UTF-8 before checking the original file and the packaged fallback. Callers that already have a filesystem path use the existing overload. [C++ filesystem encoding rules](https://eel.is/c++draft/fs.path.type.cvt) ### Tested - Native Windows 11, MSVC 19.51. The regression failed on main `e48ff03` and passed in `shader_fixture_path` CTest after the patch. It exercises both an absolute generated path and a packaged fallback with non-ASCII names. - Built `vk_null_descriptor_test` in a non-ASCII CMake build directory and ran it successfully on the RTX 4080 from a working directory without a fixture fallback. The standalone compiler crashed when asked to emit directly into that build directory. For the reader test, I staged the synthetic SPIR-V generated from byte-identical GLSL in an ASCII build directory. - Verified `git diff --check` and the source-only check. GPUs tested: NVIDIA RTX 4080, driver 621.01, Windows 11. AI-assisted: yes. - [x] Based on current `main`. - [x] One topic. - [x] Uses source and synthetic fixtures.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:16:45 +00:00
Author
Owner

@⁠MSedgeMC on GitHub · 2026-11-25 19:32 UTC · original · approved these changes

Verified on the PR branch by compiling the standalone test directly: g++ -std=c++20 -O0 -o shader_fixture_path_test runtime/test/shader_fixture_path_test.cpp && ./shader_fixture_path_test -> 'shader fixture lookup passed', exit 0. The new char* overload correctly decodes CMake's narrow UTF-8 fixture paths via u8string before filesystem lookup, and the added Tokyo/Unicode cases pass along with the existing packaged/local/missing cases. Advisory: branch carries ~60 older commits not on current main; rebase before merge for clean history.

**@⁠MSedgeMC** on GitHub · 2026-11-25 19:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2069#pullrequestreview-6063773870) · **approved these changes** Verified on the PR branch by compiling the standalone test directly: g++ -std=c++20 -O0 -o shader_fixture_path_test runtime/test/shader_fixture_path_test.cpp && ./shader_fixture_path_test -> 'shader fixture lookup passed', exit 0. The new char* overload correctly decodes CMake's narrow UTF-8 fixture paths via u8string before filesystem lookup, and the added Tokyo/Unicode cases pass along with the existing packaged/local/missing cases. Advisory: branch carries ~60 older commits not on current main; rebase before merge for clean history.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2069/head:github-bot/gh-2069'
git switch 'github-bot/gh-2069'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2069'
git switch 'github-bot/gh-2069'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2069'
git switch 'github-bot/gh-2069'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2069'
git switch 'main'
git merge --squash 'github-bot/gh-2069'
git switch 'main'
git merge --ff-only 'github-bot/gh-2069'
git switch 'main'
git merge 'github-bot/gh-2069'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.