Decode generated shader fixture paths as UTF-8 (TEST-SHADER-FIXTURE-UTF8) #2069
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2069
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/shader-fixture-utf8"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
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
e48ff03and passed inshader_fixture_pathCTest after the patch. It exercises both an absolute generated path and a packaged fallback with non-ASCII names.vk_null_descriptor_testin 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.git diff --checkand the source-only check.GPUs tested: NVIDIA RTX 4080, driver 621.01, Windows 11.
AI-assisted: yes.
main.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.
Verified on Windows 11 (
10.0.26200.9974) with MSVC19.44.35228(x64,/std:c++20 /EHsc /W4 /permissive- /utf-8 /O2) againstmain4a54aedcb+2355e6088(claim#2570#issuecomment-7238618828):runtime/test/shader_fixture_path.h,runtime/test/shader_fixture_path_test.cpp); adds aconst char*overload converting narrow CMake UTF-8 strings viastd::u8stringbefore constructingstd::filesystem::pathso non-ASCII paths resolve accurately under Windows ACP locales.check_no_game_data.pyclean.4a54aedcb+ PR test):shader_fixture_path_test.exefails (rc=1,shader fixture lookup failedon narrow UTF-8 path under Windows ACP).4a54aedcb+2355e6088merge): Merges cleanly (rc=0), compiles with0/W4warnings, andshader_fixture_path_test.exepasses (shader fixture lookup passed,rc=0).AI-assisted.
Red/green: On main shader_fixture_path_test fails (shader fixture lookup failed on a narrow UTF-8 path), and with the PR ctest -R "^shader_fixture_path$" passes.
Independent tester (OreoFR, RTX 4070, Windows 11): PR head merged with the other PRs of its batch on main c1ecf04ed, full ctest run (485 tests, tests that launch the game excluded): no new failure compared with main.
Verified by OreoFR
c1ecf04ed+ PR head2355e6088; green run in a merge package of 16 PRs, no new ctest failure vs mainctest -R "^shader_fixture_path$"AI-assisted (Claude Code, Claude Opus 5.5).