test(agc): map GPU memory on fibers with and without a host stack #6993

Merged
thuanquang merged 1 commit from upstream-pr/6993 into main 2026-10-17 03:36:48 +00:00
thuanquang commented 2026-10-17 02:51:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-17T02:51:20Z.


What

agc_driver_gpu_map_on_fiber fails on Windows on current main with a Vulkan device:

AGC graphics: GPU mapping on a fiber started 1 host threads for its import instead of importing on the fiber's host stack

The test runs its fiber on a 64 KiB context. Since #6003 a fiber gets a host stack only when its context is smaller than 64 KiB (size_context < FIBER_GUEST_STACK_MIN), so this fiber now runs on the context itself on Windows too. StackHoldsImport finds less than 256 KiB of stack and the driver imports the mapping on a host thread, which is correct; the Windows-only expectation of no thread came from 81364388a, when every Windows fiber had a host stack.

The test now maps on two fibers:

  • a 16 KiB fiber, which keeps a host stack: on Windows the import runs on it with no thread, as 81364388a checked; elsewhere one thread, as before;
  • the 64 KiB fiber, which runs on its context: one import thread on every platform.

Both still check that the import used at most 8 KiB of the fiber's context, and the mapping on an ordinary thread still starts no thread.

CI does not show the failure: in run 38993324986 (main f643e61d9, after #6003) Windows builds the test as ExecutionTestNotBuilt.cpp and skips it, and Linux, which already expected one thread, passes.

Tested

Windows 11 26200, AMD Radeon RX 6700 XT (driver 32.0.21045.5002), WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, ANYPS5_REQUIRE_VULKAN=1, on main 9bf01db66:

  • main: fails 3/3 with the line above.
  • This change: passes 5/5 (A GPU mapping made on a fiber used 0 bytes of its context with a host stack and 3104 running on the context); fiber passes.
  • This change with #6003's size_context < FIBER_GUEST_STACK_MIN condition removed locally: fails with GPU mapping on a fiber running on its context started 0 host threads for its import instead of one, so the test follows #6003's limit.
  • Full ctest --parallel 4 --timeout 120 on main: 1352 tests, 3 fail: this one, agc_driver_lds_mixed_width_atomics (#5271) and agc_driver_layered_volume_vertex_no_gpl (#4768, fixed by #6436).
  • python tools/check_conventions.py --base origin/main with this title and body passes.
  • Not tested: Linux and macOS.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6700 XT, driver 32.0.21045.5002, Windows 11 26200
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4896658759 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6993). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-17T02:51:20Z. --- ### What `agc_driver_gpu_map_on_fiber` fails on Windows on current `main` with a Vulkan device: ``` AGC graphics: GPU mapping on a fiber started 1 host threads for its import instead of importing on the fiber's host stack ``` The test runs its fiber on a 64 KiB context. Since #6003 a fiber gets a host stack only when its context is smaller than 64 KiB (`size_context < FIBER_GUEST_STACK_MIN`), so this fiber now runs on the context itself on Windows too. `StackHoldsImport` finds less than 256 KiB of stack and the driver imports the mapping on a host thread, which is correct; the Windows-only expectation of no thread came from 81364388a, when every Windows fiber had a host stack. The test now maps on two fibers: - a 16 KiB fiber, which keeps a host stack: on Windows the import runs on it with no thread, as 81364388a checked; elsewhere one thread, as before; - the 64 KiB fiber, which runs on its context: one import thread on every platform. Both still check that the import used at most 8 KiB of the fiber's context, and the mapping on an ordinary thread still starts no thread. CI does not show the failure: in run 38993324986 (`main` `f643e61d9`, after #6003) Windows builds the test as `ExecutionTestNotBuilt.cpp` and skips it, and Linux, which already expected one thread, passes. ### Tested Windows 11 26200, AMD Radeon RX 6700 XT (driver 32.0.21045.5002), WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`, `ANYPS5_REQUIRE_VULKAN=1`, on `main` `9bf01db66`: - `main`: fails 3/3 with the line above. - This change: passes 5/5 (`A GPU mapping made on a fiber used 0 bytes of its context with a host stack and 3104 running on the context`); `fiber` passes. - This change with #6003's `size_context < FIBER_GUEST_STACK_MIN` condition removed locally: fails with `GPU mapping on a fiber running on its context started 0 host threads for its import instead of one`, so the test follows #6003's limit. - Full `ctest --parallel 4 --timeout 120` on `main`: 1352 tests, 3 fail: this one, `agc_driver_lds_mixed_width_atomics` (#5271) and `agc_driver_layered_volume_vertex_no_gpl` (#4768, fixed by #6436). - `python tools/check_conventions.py --base origin/main` with this title and body passes. - Not tested: Linux and macOS. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 6700 XT, driver 32.0.21045.5002, Windows 11 26200 - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
johnmaia commented 2026-10-17 03:23:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-17T03:23:16Z.


Confirmed on NVIDIA and Intel too: i7-13700K, RTX 4080 (617.42) and Intel UHD 770 (101.6129), Windows, WinLibs GCC 15.2.0, Release, ANYPS5_REQUIRE_VULKAN=1.

  • main f643e61d9: agc_driver_gpu_map_on_fiber fails on both GPUs with the same message ("started 1 host threads for its import instead of importing on the fiber's host stack").
  • This PR merged onto that main: passes 3/3 on each GPU.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6228996103 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6993#issuecomment-6228996103). Originally posted by [johnmaia](https://github.com/johnmaia) on 2026-10-17T03:23:16Z. --- Confirmed on NVIDIA and Intel too: i7-13700K, RTX 4080 (617.42) and Intel UHD 770 (101.6129), Windows, WinLibs GCC 15.2.0, Release, `ANYPS5_REQUIRE_VULKAN=1`. - `main` f643e61d9: `agc_driver_gpu_map_on_fiber` fails on both GPUs with the same message ("started 1 host threads for its import instead of importing on the fiber's host stack"). - This PR merged onto that main: passes 3/3 on each GPU. AI-assisted: yes (Claude Code)
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!6993
No description provided.