fix(agc): read capture output directories through the wide environment on Windows #8432
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8432"
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?
Imported from boykopovar/AnyPS5. Originally posted by orezraey on 2026-10-20T12:38:33Z.
What
On Windows, pointing
APS5_DUMP_SUBMITSorAPS5_DUMP_COMPUTE_PIPELINESat a directory with a non-ASCII character, for example underC:\Users\José\AppData\Local\Temp, stops the process as soon as the first capture is written:Both are read with
std::getenv, which returns the ANSI code page, and handed to astd::filesystem::path, which MinGW's libstdc++ decodes as UTF-8.Changes:
SubmissionCapture.cpp:SubmissionCapture::ActivereadsAPS5_DUMP_SUBMITSwith_wgetenvon Windows.VulkanDevice.cpp: aComputePipelineDumpDirectory()helper in the anonymous namespace readsAPS5_DUMP_COMPUTE_PIPELINESwith_wgetenvon Windows; the capture condition uses it.tests/Pm4Replay.cppreadsAPS5_DUMP_SUBMITSthe same way, so it looks in the directory the library writes to.Linux and macOS keep
std::getenv.APS5_TRACE_DIRhas the same problem; #7599 already changes it, so it is left out here.Tested
BUILD_TESTING=ON.agc_driver_pm4_replay_testsrun directly withAPS5_DUMP_SUBMITS=C:\tools\tmp\pm4-ação: withSubmissionCapture.cppfrommain(891d56751) it exits 1 with the error above and writes nothing; with this change it passes and writes 6 captures there.agc_driver_buffer_load_store_testsrun withAPS5_DUMP_COMPUTE_PIPELINES=C:\tools\tmp\cap-açãoandANYPS5_NO_SHADER_CACHE=1: withVulkanDevice.cppfrommainit exits 1 with the same error and writes nothing; with this change it passes and writes 10compute-*/capture.aps5cpcaptures there.ctest -R ^agc_driver_pm4_replay(the test andagc_driver_pm4_replay_tool) passes.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pylists no conflicting lines; the open pull requests it could not compare do not change these lines.agc_pm4_replayitself still takes the capture directory through its narrowargv; that tool is a separate change. Linux and macOS were not run.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)