feat(windows): name presenter and queue worker threads #5862

Merged
MarcZX10 merged 1 commit from upstream-pr/5862 into main 2026-10-14 14:39:03 +00:00
MarcZX10 commented 2026-10-14 14:02:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T14:02:36Z.


What

Name the Windows host thread when the presenter or an AGC queue worker enters PinWorkerThread, using the existing role label. Resolve SetThreadDescription dynamically so Windows versions without that API keep running; report other naming failures. This is the thread-name topic from #3815.

Add a Windows-only test that sets the description and reads it back when the OS provides the API.

Tested

  • MinGW-w64 GCC 12 cross-compiled core/libs/tests/ThreadName.cpp with -std=c++20 -Wall -Wextra -Werror.
  • python3 tools/check_conventions.py --base upstream/main passed.
  • git diff --check passed.
  • No Windows runtime or full project build was available locally.

Checklist

  • Based on current main; no other open PR implements host thread naming
  • One topic per PR
  • No code comments added
  • No unimplemented exports or silent stubs changed
  • No investigation notes or images added
  • No third-party code added
  • Generic thread diagnostic behavior
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Codex); author responsible for the change
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4859093049 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5862). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T14:02:36Z. --- ### What Name the Windows host thread when the presenter or an AGC queue worker enters `PinWorkerThread`, using the existing role label. Resolve `SetThreadDescription` dynamically so Windows versions without that API keep running; report other naming failures. This is the thread-name topic from #3815. Add a Windows-only test that sets the description and reads it back when the OS provides the API. ### Tested - MinGW-w64 GCC 12 cross-compiled `core/libs/tests/ThreadName.cpp` with `-std=c++20 -Wall -Wextra -Werror`. - `python3 tools/check_conventions.py --base upstream/main` passed. - `git diff --check` passed. - No Windows runtime or full project build was available locally. ### Checklist - [x] Based on current `main`; no other open PR implements host thread naming - [x] One topic per PR - [x] No code comments added - [x] No unimplemented exports or silent stubs changed - [x] No investigation notes or images added - [x] No third-party code added - [x] Generic thread diagnostic behavior - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes (Codex); author responsible for the change
adriadam10 commented 2026-10-14 14:14:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T14:14:40Z.


Checked the diff (Windows-only path in PinWorkerThread, dynamic SetThreadDescription resolve, 63-char bound with E_INVALIDARG, read-back test registered under if(WIN32)) and the Linux build/ctest (unaffected). Merging once the full Windows build is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6170430101 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5862#issuecomment-6170430101). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-14T14:14:40Z. --- Checked the diff (Windows-only path in `PinWorkerThread`, dynamic `SetThreadDescription` resolve, 63-char bound with E_INVALIDARG, read-back test registered under `if(WIN32)`) and the Linux build/ctest (unaffected). Merging once the full Windows build is green.
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
boykopovar/AnyPS5!5862
No description provided.