[PR #2043] Use UTF-8 for shader library module filenames (SHADER-LIBRARY-UTF8-MODULE-PATHS) #2049

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

📋 Pull Request Information

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

Base: main ← Head: codex/shader-library-utf8-module-paths


📝 Commits (1)

  • 6198879 Use UTF-8 for shader library module filenames

📊 Changes

2 files changed (+48 additions, -16 deletions)

View changed files

📝 runtime/src/shader_library.h (+18 -16)
📝 runtime/test/shader_library_test.cpp (+30 -0)

📄 Description

Claimed in the coordination issue as: SHADER-LIBRARY-UTF8-MODULE-PATHS

What and why

Index strings are decoded as UTF-8. spirv_bytes() and spirv() append those strings as narrow paths, which on Windows can use the system code page. A shader indexed as cs_\u00e9 can therefore be found in the metadata but missed on disk.

Use one path builder that appends the filename as UTF-8 for both the generated filename and the explicit spv fallback. A filename the host cannot decode is treated as unavailable, so a working fallback can still be used.

Tested

  • The synthetic Unicode module regression fails on 9f9a7c5f3 in spirv_bytes(). With the fix, the CMake shader_library test passes in RelWithDebInfo on Windows 11 using MSVC 19.51. It checks size and word reads through both filename forms and a malformed default name with a valid fallback.
  • git diff --check and the source-only check passed.

GPUs tested: n/a (CPU-only synthetic shader files)

AI-assisted: yes (Codex)

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys or decryption.

🔄 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/2043 **Author:** [@alexandersato0830](https://github.com/alexandersato0830) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/shader-library-utf8-module-paths` --- ### 📝 Commits (1) - [`6198879`](https://github.com/ubiquitarianism/leonida/commit/6198879899ab2dbaca759d57fe944e4fc5b5173c) Use UTF-8 for shader library module filenames ### 📊 Changes **2 files changed** (+48 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `runtime/src/shader_library.h` (+18 -16) 📝 `runtime/test/shader_library_test.cpp` (+30 -0) </details> ### 📄 Description Claimed in the coordination issue as: [SHADER-LIBRARY-UTF8-MODULE-PATHS](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7171516110) ### What and why Index strings are decoded as UTF-8. `spirv_bytes()` and `spirv()` append those strings as narrow paths, which on Windows can use the system code page. A shader indexed as `cs_\u00e9` can therefore be found in the metadata but missed on disk. Use one path builder that appends the filename as UTF-8 for both the generated filename and the explicit `spv` fallback. A filename the host cannot decode is treated as unavailable, so a working fallback can still be used. ### Tested - The synthetic Unicode module regression fails on `9f9a7c5f3` in `spirv_bytes()`. With the fix, the CMake `shader_library` test passes in RelWithDebInfo on Windows 11 using MSVC 19.51. It checks size and word reads through both filename forms and a malformed default name with a valid fallback. - `git diff --check` and the source-only check passed. GPUs tested: n/a (CPU-only synthetic shader files) AI-assisted: yes (Codex) ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys or decryption. --- <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#2049
No description provided.