The in-place tests can run on the card, and what an RTX 5080 answers them (copy-bridges.md, section 11) #4211
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4211
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4210"
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?
@banaanpapa on GitHub · 2026-11-30 17:25 UTC · original
banaanpapa:probe/inplace-on-the-card→main· +1111 −858 · 34 files · 17 commits · closed without mergingdocs/copy-bridges.mdsays what a hardware run must establish before any of the in-place switches becomes a default, and that its own verification was on the software adapter ("WARP is not equivalent hardware"). This is one such run for the part that needs no title, and the two test switches that make it repeatable on any card. No title was run.What changes in the code (tests only)
VICTORY_INPLACE_TEST_CARD=1: the tests ofinplaceandportwhose names begin withwarp_take the first adapter, named on stderr, where they take the software adapter today.VICTORY_INPLACE_TEST_MB=<n>: the size of the probe's cost measurement in its test (4 without).Without the two nothing changes. To repeat it on another card:
What the run found (section 11 of the document; RTX 5080, driver 621.24)
OpenExistingHeapFromAddressandOpenExistingHeapFromAddress1are taken for private write-watched memory; the card and the CPU see each other's writes with no call in between; write watching sees none of the card's writes.VirtualProtectorVirtualFreedoes not let that call through at once: the heap outlives the let-go until the last list and slot holding it are dropped, 64 submissions on byVICTORY_BURY_LAG, and until then the pages are pinned and the call fails with error 87. The probe's own line says the call must fail while the heap stands;host::placement(#3401) shows it still refused straight after the let-go. It does not arise for a section opened through our view. It does for private memory (VICTORY_INPLACE=3) wherever the title frees, decommits or guards memory a draw used within the last two frames.Limits
One card, one driver, memory of the tests' own. The title's allocations, the ordering under a live relay, residency under WDDM and device loss on these paths all still need the title (11.5 says so).
The crate's tests compile only with #4115; these were run with it applied and not committed here.
From the review (2026-11-30)
crate::hlsl, which falls back to DXC where Wine's compiler refuses it (gabrielecabrini). On Windows the system's compiler still goes first: the four tests pass on the RTX 5080 at 256 and 1,024 MB, and on WARP.e1251c31.🤖 Generated with Claude Code
@gabrielecabrini on GitHub · 2026-11-30 19:06 UTC · original
Ran these on Linux under Proton (vkd3d-proton), with no title, to add a second card and a second D3D12 to section 11. All four pass once the probe's shader is compiled through
crate::hlsl(point 1 below). Two answers differ from the RTX 5080 on Windows (points 2 and 3).Setup: RTX 4070 SUPER 12 GB, NVIDIA 620.73.04 (Linux), i5-14600KF, Arch Linux, Proton Experimental 11.0-20261123b with its vkd3d-proton (
vkd3d-1.1-5776-g30b0eb9bc). The test exe was cross-built withcargo xwinfrom this branch merged onto maine1251c31, then run with Proton'swineandWINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n", so it uses vkd3d-proton, not Wine's builtin d3d12. Same filters as the doc:--nocapture --test-threads=1 inplace::tests::warp_ port::tests::warp_, withVICTORY_INPLACE_TEST_CARD=1andVICTORY_INPLACE_TEST_MB=256or1024.1. Under Wine the probe's shader doesn't compile (test harness, not the driver)
As the PR stands, 3 pass and
warp_probe_opens_title_like_memory_and_the_gpu_sees_its_bytesfails atGPU writes land in private memory. The shader write reportsREFUSED 0x80004005. That error comes fromD3DCompileinRig::shade: Wine's builtind3dcompiler_47(vkd3d-shader) refusesLoad/StoreonRWByteAddressBuffer. That's the casehlsl.rsalready handles with a DXC fallback. Using it fixes the test here (DXC throughVICTORY_DXC), and on Windows it still takes the system compiler first:It also drops the now unused
D3DCompile,ID3DBlobandsimports. Clippy is clean forinplace.rs. With this change:4 passed; 0 failed.2. What vkd3d-proton takes (compare 11.1)
ID3D12Device3 true, ID3D12Device13 true, heap tier 2, cross-adapter row-major textures false.OpenExistingHeapFromAddressandOpenExistingHeapFromAddress1are both taken for private, write-watched memory.0x80070057). A committed one opens and reads and writes through the view, also when the view is read-only or unmapped.0xe1here (shared, cross-adapter, 0x40 and 0x80, the two "deny textures" flags) against0x421on Windows. vkd3d-proton reports noALLOW_SHADER_ATOMICS.read-only inside the part true, decommit inside true, decommit outside true. On Windows they fail with error 87. Under Proton, opening doesn't pin the pages againstVirtualProtect/VirtualFree. The error 87 problem from 11.4 doesn't happen. But nothing stops the title freeing or guarding memory a flight still reads or writes. The probe only checks that the calls return, not what the card does afterwards.3. What opening costs (compare 11.2)
The card copies 1,024 MB out of a shared buffer of today's kind in 44.2 ms, the same as from memory in place. "Shared with the card" stays 0. Private memory costs about what it does on Windows (0.15 – 0.19 ms a MiB). A section is about 4x slower to open than on Windows and doesn't enter the working set at all, so how memory gets pinned differs under Wine. The copy-out times are PCIe 4.0 (about 23 GB/s) against the 5080's PCIe 5.
4. Bus (compare 11.3)
host::bus::shader_reads_and_stores_by_where_a_buffer_lies(ignored test, 256 MiB, 64 bytes a thread, median of 7). Resizable BAR is on.GPU_UPLOAD)Ratios 33x for reads and 66x for stores. The CPU copies into
GPU_UPLOADmemory at 10.6 GB/s and reads it back at 0.03 GB/s. Into and out of the PC's memory: 14.6 and 7.77 GB/s.Not tested: a title (so neither 11.5 nor
VICTORY_INPLACE_PROBE=1),host::placement(#3401), what the card does with pages the title decommits under a standing heap on Proton, and Windows on this card.@superuser404notfound on GitHub · 2026-11-30 19:49 UTC · original
The part this thread lists as not tested:
VICTORY_INPLACE_PROBE=1and the census with the title running, under Proton on NVIDIA. Plus one run with the fallback policy on.Setup: RTX 4080 16 GB, NVIDIA 620.73.04, i7-13700KF, 32 GB, CachyOS (kernel 7.3.6), Proton Experimental 11.0-20261123b with the wineserver view-tree patch, vkd3d-proton master
71cae091besidevictory.exe, DXC 1.9 beside it too. Build: maine1251c31with #2585 and #2034 on top. Series X, DLSS Quality, frame generation 2x,VICTORY_FILL_TITLE=1 VICTORY_GPU_DETILE=1 VICTORY_HEAP_HOOKS=1 VICTORY_SETTLE_UNLOCKED=1 VICTORY_WAIT_SPIN=500. Both runs about 5 minutes in the city after loading a save.1. The probe inside the title
Same answers as the 4070 SUPER above, so the title being loaded changes nothing there: Device3 and Device13 true, heap tier 2, both openings taken for private memory, heap flags
0xe1, a reserved section refused (0x80070057), a committed one opened and read and written through its view (also read-only or unmapped). The private shader write isREFUSED 0x80004005in this build too, so thecrate::hlslchange from point 1 above is still needed. Under the heap the title's own calls inside the part also succeed here (read-only inside true, decommit inside true).Cost with the title running: 64 MB of private memory opened in 14.2 ms (working set +82 MB), 64 MB of a committed section in 14.4 ms (+4 MB, +18 MB after the card read all of it); the card copies 64 MB out in 3.0 ms either way, the same as from a shared buffer of today's kind.
2. The census (after about 5 minutes of play)
Three sections (6,236 MB, 710 MB and 185 MB) are each eligible to be opened as one native heap, but the page pool is made reserved, which the runtime refuses. Port 1 (
VICTORY_PORT_CONSTANTS=1) opened nothing: the title's graphics region (174 MB at0x4c7d0000) is refused as "not one native-import-eligible stretch of a section: Scattered".3. The fallback policy in play (
VICTORY_INPLACE_VIEW=1 VICTORY_INPLACE=3)Inside run-to-run noise. No Xid, no device removal, nothing visibly wrong. The 6 MiB pool windows it was asked for were mostly refused as
HolesorNone(8 in the run), which is the case #2776'sVICTORY_INPLACE_VIEWSis for. So on this PC the fallback neither helps nor hurts, and the frame stays bound by the submitting thread (about 20 ms preparing, of it about 9 ms copies, and about 9 ms copying back).Not tested: #2776, what the card does with pages the title decommits under a standing heap (still the open risk from point 2 above), and Windows on this card.
🤖 Generated with Claude Code
@banaanpapa on GitHub · 2026-11-30 20:00 UTC · original
Thank you both. Taken in
04ad5b6a(the branch is also merged withe1251c31now):crate::hlsl::compile_compute, as gabrielecabrini proposed, and the three imports it made unused are gone. On Windows nothing changes, since the system's compiler still goes first. WithVICTORY_INPLACE_TEST_CARD=1the four tests pass on the RTX 5080 at 256 and 1,024 MB, and on WARP. The probe's shader write is stilltrue (ok).docs/copy-bridges.md, shortened and credited to you. Section 11.5 now says the census has one answer so far, under Proton, and none on Windows. If I misstated anything, tell me and I'll correct it.The difference I'd watch is the one in point 2. Under Proton the title's own protect and decommit inside an opened part succeed, so 11.4's error 87 doesn't arise, but nothing guards what a flight still uses either.
And the last line of superuser404notfound's run matches what I see on Windows: on my RTX 5080 with a 9950X3D, the frame median equals the submitting thread's time (25 ms), and the card waits on it for several ms every frame.
@gabrielecabrini on GitHub · 2026-11-30 20:04 UTC · original
Follow-up:
VICTORY_INPLACE_PROBE=1in game, same PC (Linux, Proton, vkd3d-proton). This is the title part that 11.5 lists as missing. Build: maine1251c31+ #4248, Series S, two runs.1. The runtime's probe has the same Wine problem as the test. In game it logs
VERDICT: private memory in place: reads true, writes falsebecauseD3DCompileinRig::shadefails under Wine. There's no DXC fallback, even withVICTORY_DXCset. Thecrate::hlsl::compile_computechange from my previous comment fixes this too. Otherwise the in-game probe matches the test run.2. Census, at 30 s and 150 s:
Four sections can each be opened as one native heap: 220, 297, 185 and 3,977 MB. The second run looks the same: 3,861 buffers and 87,709 views at 150 s.
By count, most buffers could be opened in place, but they're small (264 of 787 MB). Most of the larger memory can't. The roughly 86,000 single-page views matter on Linux: the stock Wine server walks all of them on every map and unmap (
docs/linux-proton.md, view-tree section).@superuser404notfound on GitHub · 2026-11-30 22:11 UTC · original
Thanks, 11.6 reads right. Two small corrections for my run (the 4080): it used vkd3d-proton master
71cae091besidevictory.exe, not Proton's own, and the build wase1251c31with #2585 and #2034 on top, plus the five switches from #2842 (VICTORY_FILL_TITLE,VICTORY_GPU_DETILE,VICTORY_HEAP_HOOKS,VICTORY_SETTLE_UNLOCKED,VICTORY_WAIT_SPIN=500). Neither changes the numbers' meaning.🤖 Generated with Claude Code
@banaanpapa on GitHub · 2026-11-30 23:10 UTC · original
@superuser404notfound thanks, fixed in
214ea86c: 11.6 now gives each setup on its own (your vkd3d-proton master71cae091besidevictory.exe, the build with #2585 and #2034, and the five switches from #2842), and gabrielecabrini's separately.@trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed