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

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

@⁠alexandersato0830 on GitHub · 2026-11-25 18:54 UTC · original
alexandersato0830:codex/shader-library-utf8-module-paths → main · +48 −16 · 2 files · 1 commits · open

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.
**@⁠alexandersato0830** on GitHub · 2026-11-25 18:54 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2043) `alexandersato0830:codex/shader-library-utf8-module-paths` → `main` · +48 −16 · 2 files · 1 commits · open Claimed in the coordination issue as: [SHADER-LIBRARY-UTF8-MODULE-PATHS](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:15:53 +00:00
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/2043/head:github-bot/gh-2043'
git switch 'github-bot/gh-2043'

Merge

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