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

Open
opened 2026-11-26 21:19:57 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2069
Author: @alexandersato0830
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: codex/shader-fixture-utf8


📝 Commits (1)

  • 2355e60 Decode generated shader fixture paths as UTF-8

📊 Changes

2 files changed (+21 additions, -0 deletions)

View changed files

📝 runtime/test/shader_fixture_path.h (+8 -0)
📝 runtime/test/shader_fixture_path_test.cpp (+13 -0)

📄 Description

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.

🔄 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/2069 **Author:** [@alexandersato0830](https://github.com/alexandersato0830) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/shader-fixture-utf8` --- ### 📝 Commits (1) - [`2355e60`](https://github.com/ubiquitarianism/leonida/commit/2355e6088564aabffc4d3f1b2855b4940f5392fd) Decode generated shader fixture paths as UTF-8 ### 📊 Changes **2 files changed** (+21 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/shader_fixture_path.h` (+8 -0) 📝 `runtime/test/shader_fixture_path_test.cpp` (+13 -0) </details> ### 📄 Description Claimed in the coordination issue as: [TEST-SHADER-FIXTURE-UTF8](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172241015) ### 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. --- <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#2075
No description provided.