d3d12: since 9c3cf86f, queue page mappings of section-backed pages return E_NOTIMPL on RADV (Lanes ray-tracing-rehydrate regressed) #656
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 brcly/TuxBox. Originally posted by gtb-sbe on 2026-12-02T17:22:54Z.
What I see
On
main1b4ed472with default settings,tuxbox.py verify --only lanes-selftestfails two scenarios on my RX 9060 XT. Both getE_NOTIMPLfrom the queue's page-mapping call:ray-tracing-rehydratepasses on6d4f1cd7, the parent of9c3cf86f, with the same card, Proton, prefix and settings. It also passed in my gate on9a19c767this morning.queue-page-mappingsis new in9c3cf86f, so I have no earlier result for it.The full check on
1b4ed472also fails one D3D12 regression control the same way,buffer-remap(d3d12-buffer-remap failed: queue page mapping failed: 0x80004001). All controls passed in this morning's gate on9a19c767.Both builds report the same host profile:
Why
9c3cf86fmovedCopyPageMappingsXandCopyPageMappingsBatchXonto the D3D12 tile path. Whendevice/heap/gpu_tiles.rsbuilds the tile for a source page, it refuses a page whose XMem backing is section-mapped on a host that needs a mirror (lines 76-81):needs_mirrorholds forsubstitutedandrefused, which is the RADV case (#191, #200,docs/USAGE.md). Since #464 XMem backs every physical page with its section by default. So on these hosts every queue page mapping of title pages takes this branch. revonateB0T's #653 points at the same lines forqueue-page-mappingson a Radeon 780M.ray-tracing-rehydrateisn't in their failure list, and I can't tell why from the code: I don't see a host-dependent default for private views.I checked that this is the branch:
TUXBOX_HOST_PROFILE=section-import=aliased, both scenarios get past the mapping call. Then they read zeros, as expected when the GPU reads other memory:mapping order sample 0: expected 0xabcd0001, got 0andray 2: expected instance 7 geometry 1 primitive 0 at 6.000, found -1 -1 -1 at 0.000.TUXBOX_XMEM_PRIVATE_VIEWS=1(private backing),ray-tracing-rehydratepasses.queue-page-mappingsgets further and then fails withplace aliased draw target failed: 0x80004001. Before that, the provider logscommand list cannot record cannot order buffer and texture accesses: HRESULT(0x80004001)(handoffs::planrefuses mirrored buffers, from1ce50737) andresource slot 44 failed 0x80004001: dim=3 16x16x1 mips=1 format=28 samples=1 layout=0x105 flags=0x1 align=0x0 initial=0x4. For that run I staged the Windows DXC besidelanes.exe, because the scenario needsdxcompiler.dll.What it may mean for ProjectScarlett (not run yet)
According to 1b4ed472's message, the title fills its streamed GPU address space (
0x900200000, 24 GiB, profile0x3) from a copy queue withCopyPageMappingsBatchX. While those batches failed withE_INVALIDARG, the title ignored the failures: the intro video was green, the loading screen had no characters, and a CBV crashed vkd3d. On a RADV host with default XMem views, I'd expect the same batches to fail now withE_NOTIMPLfrom this branch whenever their source pages are section-backed. That's inferred from the code and the two scenarios; I haven't run the game on1b4ed472. NickStallman's chain on #533 (RTX 5090) ends on the samecannot order buffer and texture accessesrefusal. On this card Lanes only gets that far with private views, because the mapping call is refused first.Question
Is this refusal meant to stay on hosts that mirror, with private views as the way to run on RADV for now? Or is a path for section-backed sources planned there? In either case, the Lanes self-test now fails on RADV with default settings, so AMD contributors will see these two failures in every gate.
Setup: RX 9060 XT (1002:7590, RDNA4), Mesa 26.3.1 RADV, kernel 6.18, GE-Proton11-15, NixOS.
AI use
I worked on this with an AI coding agent (Claude Code, following
AGENTS.md). It ran the Lanes self-test on1b4ed472, ran the two failing scenarios alone with provider logging, with the host-profile override and with private views, built6d4f1cd7as the control, and traced theE_NOTIMPLto the lines above. All results come from my machine.Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-12-02T17:50:02Z.
Confirmed on AMD Radeon RX 6900 XT (
1002:73bf) (Mesa RADV, GE-Proton11-15,section-import=substituted) with default section-backed XMem:lanes-selftest-queue-page-mappings,lanes-selftest-ray-tracing-rehydrate, and thebuffer-remapD3D12 regression control (d3d12-buffer-remap failed: queue page mapping failed: 0x80004001) all fail withE_NOTIMPL(0x80004001) on1b4ed472(observed while runningtuxbox.py checkon PR#653/a6f3e098based on1b4ed472).Live ProjectScarlett check on
1b4ed472Since the issue description noted ProjectScarlett hadn't been run on
1b4ed472yet: on AMD Radeon RX 6900 XT (1002:73bf), a run onmain1b4ed472compiled shaders cleanly, reached 14,076 presented frames (~70–81 FPS, no black screen), and exited after 197.2s withexit code 2(RaiseFailFastException,c0000602) on:With
1b4ed472giving the0x900200000graphics aperture a GPU reservation ID:buffer_at(runtime/d3d12/src/device/views/addressed.rs) returnedE_NOTIMPLon theMEM_RESERVEpage inside that aperture.srv_mirrorfallback (runtime/d3d12/src/device/views/mirrors.rs) calledguard_fixed_resource->fixed_placement(runtime/d3d12/src/commands/page_mapping/buffers.rs), which also returnedE_NOTIMPLbecausestate.reservationsalready had page entries in that range.Note on
origin/mainadvancing toc1139ab2c1139ab2just landedgpu_buffer_for_viewfor GPU-reservation SRVs and relaxedfixed_placement/handoffs::plan, howeverruntime/d3d12/src/device/heap/gpu_tiles.rs:136-141still retains theshadow::contains_mapped_pages(...) && needs_mirror(...)E_NOTIMPLrefusal forCopyPageMappingsBatchXon section-backed XMem pages.Testing
c1139ab2next on AMD Radeon RX 6900 XT (1002:73bf) (both default XMem andTUXBOX_XMEM_PRIVATE_VIEWS=1).AI use: run logs, failure tracing, and this summary were prepared with Antigravity; all runs were executed on my local machine.
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-12-02T21:21:51Z.
Same on an RX 6600 (
1002:73ff, RADV / Mesa 26.3.1, GE-Proton11-15,section-import=substituted), on1b4ed472andc1139ab2:queue-page-mappingsandray-tracing-rehydratefail with0x80004001. WithTUXBOX_HOST_PROFILE=section-import=aliasedforced, both get past the mapping call and then fail on data (the GPU reads zeros). Details are in #533 issuecomment-7354129812, which I posted before I saw this issue.Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-02T23:22:27Z.
Fixed on main in
106120ca. Thanks for the clear report, and to the others who confirmed it on their cards.Cause. As you found: since
9c3cf86fa queue page mapping imports each page as a D3D12 tile heap, and a host whose profile showssection-import=substitutedorrefusedcan't be given a section page that way. Since #464 XMem backs every page with its section, so on those hosts every queue page mapping was refused.Fix. At the first device, after the section probe, the provider asks XMem (new export
TuxBoxPreferPrivateBacking) to back pages mapped from then on with private memory, which these hosts import directly. Hosts that reportaliasedare unchanged.TUXBOX_XMEM_PRIVATE_VIEWSstill decides when you set it, so=0keeps sections. Thebuffer-remapcontrol now loads XMem before creating the device, as a title does; before, XMem wasn't loaded yet when the device was created.Private backing then exposed faults in skipping unchanged texture gathers, on any vendor. They were what
queue-page-mappingshit after the mapping call got through ("texture readback used the wrong GPU page"). Gathers now watch the host pages the GPU actually reads, not the texture's CPU address. They also gather again after an ordered handoff, after the image is written, and while a remap is pending. The scenario's draw step also needed 4 KiB-swizzled render targets in our XG model, now checked against the GDK's XG: 456 whole layouts identical.Tested (Radeon 610M
1002:13c0, RADV; RTX 4070 Ti SUPER10de:2705; GE-Proton11-14):queue-page-mappings,queue-texture-boundary,ray-tracing-rehydrateand thebuffer-remapcontrol pass on the 610M.queue-page-mappingsalso passes on NVIDIA with sections and with private backing.Not tested yet: the game on an AMD card. Pages a title maps before it creates its first D3D12 device keep their sections, so if ProjectScarlett maps some of its streaming pool that early, those pages would still be refused. A run on an RX 6600 / 6900 XT / 9060 XT would tell. If you still see
0x80004001from a page mapping, please post the log.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-03T16:43:14Z.
On our RDNA 2 iGPU these three Lanes self-tests still fail on
106120ca, the commit this was closed against:Setup: a clean build of main
106120ca,python tuxbox.py verify --only lanes-selfteston1002:13c0(RADV, Mesa 26.0.8), GE-Proton11-15. Every other self-test passes. The same three fail in every branch we've checked on this card (#561, #671, #672), and an RTX 5090 passes all three. So 106120ca's change doesn't reach this host. I haven't found why yet. The next thing I'd check is whichsection-importvalue this host reports, and whether the private-backing step runs on it.🤖 Generated with Claude Code