Repository navigation
Description
Setup: RX 9070 XT, Mesa/RADV 26.3.1, GE-Proton11-14, kernel 7.3.6 (CachyOS), main at 12e4b06, ProjectScarlett 1.0.2.1 via tuxbox.py run.
1. Start menu at ~1 fps: wineserver-bound VirtualQuery
On main the start menu ran at about 1 fps (11 frames per 10 s, warm translations, nothing compiling). Nothing looked busy:
- GPU 4% busy, busiest game thread 9% CPU, 0 KB/s disk reads.
- Present, frame-event and memory-label waits together took only ~45 ms per 10 s.
wineserver itself, however, was at 90% CPU. A gdb snapshot of all threads showed the busiest game thread blocked on a server reply:
read () from libc.so.6
read_reply_data () from ntdll.so
server_call_unlocked () from ntdll.so
wine_server_call () from ntdll.so
get_committed_size () from ntdll.so
get_basic_memory_info () from ntdll.so
__wine_syscall_dispatcher () from ntdll.so
Sampling /proc/<pid>/task/<tid>/syscall showed that thread in read 90% of the time. On Wine, VirtualQuery on a MEM_MAPPED view of a SEC_RESERVE-style section asks wineserver for the committed size, so each query is a server round trip. XMem backs physical pages with section views, and d3d12_xs validates ranges with VirtualQuery loops in several places (clwb.rs, clzero.rs, device/heap.rs, device/heap/shadow.rs, survey.rs). I couldn't tell which call site is the hot one: gdb doesn't unwind through the PE frames.
With #258 merged on top (XMem backings as MEM_PRIVATE), the same menu runs at 30–60 fps (300–546 frames per 10 s) and wineserver drops to ~21% CPU. #258 is written for #191, so this looks like an unnoticed side effect worth knowing, and possibly a reason to keep VirtualQuery off hot paths in general.
Refusals for comparison (same title and save; the earlier run was on the main from before #278/#281):
| before | 12e4b06 | |
|---|---|---|
Failed to convert function |
1011 | 82 |
Failed to remap sampler |
829 | 6 |
| menu fps | ~1 | ~1 (until #258) |
So on this setup the 1 fps wasn't caused by refused shaders.
2. Story intro: black screen, then GPU page fault at address 0 (AMD side of #232)
With 12e4b06 + #258, starting story mode plays audio but the screen stays black. About 19 min after launch (title crash log: Game State: Game Running, frame 1688, 978 streaming requests) the GPU faults:
amdgpu: [gfxhub] page fault (src_id:0 ring:24 vmid:7) thread vkd3d_queue
in page starting at address 0x0000000000000000 from client 10
GCVM_L2_PROTECTION_FAULT_STATUS:0x00701431
Faulty UTCL2 client ID: SQC (data) (0xa)
PERMISSION_FAULTS: 0x3 MAPPING_ERROR: 0x0 WALKER_ERROR: 0x0
Then VK_ERROR_DEVICE_LOST, PresentX failed planes=1 HRESULT=0x80004005, and the title's breakpoint/crash handler (exit code 3; the crash upload failed offline as intended).
Just before it, the log has 14 skipped compute dispatches and 6 skipped draws. Almost all of them say its root indexes the resource heap directly, with the same guest callers as in #232 (0x248cbc1, 0x2951ba, 0x56bba, 0x4e33f98), plus one descriptor table refresh (0x80070057) at 0x2495f7d. On NVIDIA this point shows as Xid 109 (context-switch timeout). On RADV it is a scalar-data read of address 0, which fits a later pass reading output a skipped dispatch never wrote, or a descriptor left at 0.
I haven't checked whether #258 plays a part in the crash: without it the menu is too slow to reach story mode.
Activity
NickStallman commentedon Nov 27, 2026
A data point from NVIDIA, which suggests the 1 fps menu depends on the host. On an RTX 5090 (driver 620.70.10, GE-Proton11-14, game files on local disk), runs without #258 loaded at full speed from launch through the menu. Frames presented per 10 s, first 40–80 s of each run:
Three other runs did load at exactly 10 frames per 10 s for 7–10 minutes. All three had a local experiment that replaces some of #216's compute programs with no-ops, and the same build without that experiment loaded at full speed, so the slowness came from the experiment, not from #258 or main. (An earlier version of this comment blamed the first launch after moving the game to local disk; a third run ruled that out.) During those slow loads the wineserver ran at about 2,100 switches/s, so it wasn't the
VirtualQuerycase you found.The intro is a different story. The NVIDIA runs that got there all died around
Prestream:I haven't tied that one to a specific skipped dispatch.
Kayotic1337 commentedon Nov 27, 2026
Thanks, that narrows it down: it's the copy path, which only hosts that can't import game memory take. In my two runs on the same build and save, the provider logs:
game memory is copied for the GPU: this host cannot import it directlygame memory is imported through its XMem backing(and… through non-contiguous XMem backings)So on RADV the section-backed game memory couldn't be imported before #258 (the #191 case), the provider copied it for the GPU, and that path is where the
VirtualQuerycalls onMEM_MAPPEDviews piled up in wineserver. An NVIDIA host that imports directly never takes it, which matches your full-speed menus. I'd read the 1 fps as "#191 hosts on the copy path", not as AMD in general.On the intro: on this AMD card the page fault at address 0 went away in 2 of 2 runs once compute roots that have tables and index the heap directly also get the resource index map. Before,
reflected_rootreturnedOriginalfor them, and every dispatch was skipped withits root indexes the resource heap directly. I've got that as a branch with a Lanes scenario that fails without it (bindless-table-compute) and will open a PR. It would be good to know whether your Xid 13 run goes away with it too. After that, both of my runs ended in the #215 label stall (a gfx ring timeout here, which looks like your Xid 109).Kayotic1337 commentedon Nov 27, 2026
Correction to my last comment: the address-0 fault did not go away. In a third run (index-map change + #258 + current main), the intro again ended in a gfx ring timeout, and the amdgpu devcoredump of that hang shows the same fault:
Faulty page starting at address: 0x0, status0x601431(SQC data read, permission fault). The kernel log only showed the ring timeout that time, so my earlier "2 of 2" was based on an incomplete signal. The fault was probably there behind the timeouts as well.The index-map change still fixes a real skip: compute roots with tables that also index the heap directly no longer have every dispatch dropped, and a Lanes scenario fails without it. But it isn't the fix for the intro fault, and some compute dispatches and draws are still skipped there. I'll say so in the PR.