Skip to content

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

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
thuanquang:fix/gpu-map-on-fiber-thread
Oct 17, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
thuanquang:fix/gpu-map-on-fiber-thread

Conversation

@thuanquang

Copy link
Copy Markdown
Contributor

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 8136438, 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 8136438 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:

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

Since boykopovar#6003 a fiber with a context of 64 KiB or more runs on the
context itself, so the 64 KiB fiber of agc_driver_gpu_map_on_fiber
imports its mapping on a host thread on Windows too, and the test's
Windows-only expectation of no thread failed. The test now also maps
on a 16 KiB fiber, which keeps a host stack and imports on it on
Windows, and expects one import thread for the 64 KiB fiber on every
platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@johnmaia

Copy link
Copy Markdown
Contributor

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 f643e61: 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)

@oneandonlydean
oneandonlydean merged commit 739eb2e into boykopovar:main Oct 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants