Linux: renderer port 1 opens no region when a heap on a section's view does not show the card its bytes (#163) #274
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!274
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-274"
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?
@Serph91P on GitHub · 2026-11-26 14:03 UTC · original
Serph91P:linux-port1-refusal→main· +101 −0 · 2 files · 1 commits · openFixes the black world of #163 by not opening a region the card cannot see. One commit, two files, on
c9c932c.What was wrong (details and the standalone reproduction in #163): under Wine with vkd3d-proton on RADV,
OpenExistingHeapFromAddress1on a view of a section is accepted, but the import of the view's pages is refused by the kernel (libdrm asks for anonymous memory only; a section's view has a file behind it) and vkd3d-proton opens the heap on fresh memory of its own without saying so. Buffers placed in it read zeros.What this does
inplace::section_views_seen: once, a 128 KiB section of our own, a view of it, a heap opened on the view, a buffer placed in it, and what the card copies back compared with the view. One log line says what was found (seen=true how="the card read the view's bytes", oraccepted, but the card read zeros, or the refusal's code).port::open_regionasks it under Wine only and returns the existing "refused by the host" count if the card did not read the bytes: title memory is copied as before.on_wine()inport.rs, the same lookupxmemdoes. If #166'scrate::winegoes in first, it can use that instead.Windows is unchanged: the question is not asked there.
Tested (RX 7900 XTX, RADV Mesa 26.3.1, kernel 7.3, vkd3d-proton 71cae091, Proton Experimental 11.0-20261112, with this change on top of other local commits):
With the import made to work (an
LD_PRELOADshim that clearsAMDGPU_GEM_USERPTR_ANONONLY), the line readsseen=true, port 1 opens its region (185 MB, 0 refused by the host) and the world renders.This branch alone builds for
x86_64-pc-windows-msvc(cargo-xwin);cargo xtask policyandcargo test -p xtaskpass; the new lines are rustfmt-clean.This branch alone (
c9c932cplus the commit), stock RADV,VICTORY_PORT_CONSTANTS=1: the line readsseen=false how="accepted, but the card read zeros", both of the title's stretches are refused withwhy="the host does not show the card a view's pages (a heap of its own memory)"(2 by the host, no region opened), title memory is copied as before, and the world renders instead of being black (one observer, one scene, 110 s).Not tested: Windows, NVIDIA under Proton, other AMD generations.
cargo clippy -- -D warningsfails on main itself atwatch.rs:3626(open(&mut title_memory_changed(..))), which this branch does not touch.No game data in the commit.
🤖 Generated with Claude Code
@flamme-demon on GitHub · 2026-11-26 22:05 UTC · original
Tested under Proton. With this PR and
VICTORY_PORT_CONSTANTS=1, port 1 places nothing here (0 regions of the title's graphics memory in place (0 MB), 0 title buffers and windows placed in them, every frame) and the world went on with the usual draw counts. So the switch is safe to leave on under Wine, but it brings nothing on this setup either; we keep it off.Setup: RX 7900 XTX (RDNA 3), Mesa RADV 26.2.4, Proton Experimental 20261112 with its wineserver rebuilt with the view tree, vkd3d-proton master
71cae09, Microsoft'sd3dcompiler_47; mainc9c932c+ #151, #166, #200, #201, #274; diagnostics build, Series S (VICTORY_UPSCALER=6). Linux runs in a KVM guest with the card passed through.Tested by Claude Code (Claude Opus 5.5) on my machine; I only watched the picture. No captures posted (asset policy).
@UwUCammie on GitHub · 2026-11-26 22:50 UTC · original
I backported this to
linux-amd-bestafter seeing the same failure on a 7900 XT under Wine 11.22 and RADV 26.3.1. On both GEcae8353eand upstream71cae091, the synthetic reserved section read back as all zero on the GPU, even with every page filled before import. The GPU could read back its own write, while the two CPU mappings could not. The AMD backport adds a test that the capability check sends that case down the copied-buffer path. Its physical test and waterfront replay are queued. AMD backport@UwUCammie on GitHub · 2026-11-26 23:08 UTC · original
The backport’s hardware test passed on my 7900 XT. In two saved launches the GPU probe rejected the import and opened zero regions, but I still saw five page-layout rearrangements from
XMemMapPhysicalPages. Those launches stopped early with different errors, so I don't know that the rearrangements caused either one. The AMD PR now checks the same capability on the mapper side, before it touches the section layout, and I queued a same-build on/off replay. Mapper change@UwUCammie on GitHub · 2026-11-26 23:17 UTC · original
The shared check finished both waterfront replays on the 7900 XT. They used the same 720p executable, copied save and launch inputs. With
VICTORY_PORT_CONSTANTS=1, the probe ran once, declined the heap, and both the imported-region count and page-rearrangement count stayed at zero. The switch-off run skipped the probe. Both finished the route and showed the player, porch and glass door at the four late checkpoints. The AMD backport is ready for review. Test detailsView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.