The in-place tests can run on the card, and what an RTX 5080 answers them (copy-bridges.md, section 11) #4211

Closed
github-bot wants to merge 17 commits from github-bot/gh-4210 into main AGit
Owner

@⁠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 merging

docs/copy-bridges.md says 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 of inplace and port whose names begin with warp_ 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:

VICTORY_INPLACE_TEST_CARD=1 VICTORY_INPLACE_TEST_MB=256 cargo test -p victory-gpu --release --lib -- --nocapture --test-threads=1 inplace::tests::warp_ port::tests::warp_

What the run found (section 11 of the document; RTX 5080, driver 621.24)

  • The driver takes it. All four tests pass on the card: the probe, a title buffer in place at its offset, a page-pool window placed over our view of its run, and a stretch of a reserved section through a view of ours. Both OpenExistingHeapFromAddress and OpenExistingHeapFromAddress1 are 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.
  • Opening pins every page, touched or not: 43 ms and +256 MB of working set for 256 MB of private memory (0.2 ms a MiB), 11 ms for as much of a committed section. DXGI's "shared with the card" stays 0.
  • The bus: shaders read the PC's memory at 31.6 GB/s and store to it at 2.0, against 933 and 300 for the card's: 30 times and 150 times. A copy refused a device-local side is in the PC's memory already, so placing it changes nothing of that; it is the size of the downgrade section 7 declines to make unmeasured.
  • One thing is not as section 6.4 has it. Letting go of what is in place before the title's VirtualProtect or VirtualFree does 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 by VICTORY_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)

  • The probe's shader is compiled through 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.
  • Section 11.6 holds what gabrielecabrini (RTX 4070 SUPER) and superuser404notfound (RTX 4080, with the title) measured under Proton.
  • Merged with e1251c31.

🤖 Generated with Claude Code

**@⁠banaanpapa** on GitHub · 2026-11-30 17:25 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4210) `banaanpapa:probe/inplace-on-the-card` → `main` · +1111 −858 · 34 files · 17 commits · closed without merging `docs/copy-bridges.md` says 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 of `inplace` and `port` whose names begin with `warp_` 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: ``` VICTORY_INPLACE_TEST_CARD=1 VICTORY_INPLACE_TEST_MB=256 cargo test -p victory-gpu --release --lib -- --nocapture --test-threads=1 inplace::tests::warp_ port::tests::warp_ ``` ## What the run found (section 11 of the document; RTX 5080, driver 621.24) - **The driver takes it.** All four tests pass on the card: the probe, a title buffer in place at its offset, a page-pool window placed over our view of its run, and a stretch of a reserved section through a view of ours. Both `OpenExistingHeapFromAddress` and `OpenExistingHeapFromAddress1` are 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. - **Opening pins every page, touched or not**: 43 ms and +256 MB of working set for 256 MB of private memory (0.2 ms a MiB), 11 ms for as much of a committed section. DXGI's "shared with the card" stays 0. - **The bus**: shaders read the PC's memory at 31.6 GB/s and store to it at 2.0, against 933 and 300 for the card's: 30 times and 150 times. A copy refused a device-local side is in the PC's memory already, so placing it changes nothing of that; it is the size of the downgrade section 7 declines to make unmeasured. - **One thing is not as section 6.4 has it.** Letting go of what is in place before the title's `VirtualProtect` or `VirtualFree` does 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 by `VICTORY_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) - The probe's shader is compiled through `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. - Section 11.6 holds what gabrielecabrini (RTX 4070 SUPER) and superuser404notfound (RTX 4080, with the title) measured under Proton. - Merged with `e1251c31`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
`inplace` and `port` test the placing of title memory on the software
adapter, and the document says what a hardware run must still establish.
With `VICTORY_INPLACE_TEST_CARD=1` the same tests take the first adapter
(named on stderr), and `VICTORY_INPLACE_TEST_MB` sizes the probe's cost
measurement. Without the two nothing changes: the software adapter, 4 MB.

Section 11 records one such run (RTX 5080, driver 621.24): the driver
takes both openings and the placed buffers, and all four tests pass;
opening pins every page (0.2 ms a MiB of private memory, 0.05 of a
section); shaders read the PC's memory 30 times and store to it 150
times slower than the card's; and letting go of what is in place does
not let the title's VirtualProtect through at once, because the heap
outlives the let-go by the bury lag.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:08:44 +00:00
Author
Owner

@⁠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 with cargo xwin from this branch merged onto main e1251c31, then run with Proton's wine and WINEDLLOVERRIDES="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_, with VICTORY_INPLACE_TEST_CARD=1 and VICTORY_INPLACE_TEST_MB=256 or 1024.

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_bytes fails at GPU writes land in private memory. The shader write reports REFUSED 0x80004005. That error comes from D3DCompile in Rig::shade: Wine's builtin d3dcompiler_47 (vkd3d-shader) refuses Load/Store on RWByteAddressBuffer. That's the case hlsl.rs already handles with a DXC fallback. Using it fixes the test here (DXC through VICTORY_DXC), and on Windows it still takes the system compiler first:

-        let mut code: Option<ID3DBlob> = None;
         ...
-            D3DCompile(SOURCE.as_ptr().cast(), SOURCE.len(), s!("inplace"), None, None, s!("main"), s!("cs_5_1"), 0, 0, &mut code, None)?;
-            let code = code.ok_or_else(windows::core::Error::empty)?;
-            let bytes = std::slice::from_raw_parts(code.GetBufferPointer().cast::<u8>(), code.GetBufferSize());
+            let code = crate::hlsl::compile_compute("inplace", SOURCE)?;
+            let bytes = code.as_slice();

It also drops the now unused D3DCompile, ID3DBlob and s imports. Clippy is clean for inplace.rs. With this change: 4 passed; 0 failed.

2. What vkd3d-proton takes (compare 11.1)

  • Device: ID3D12Device3 true, ID3D12Device13 true, heap tier 2, cross-adapter row-major textures false.
  • OpenExistingHeapFromAddress and OpenExistingHeapFromAddress1 are both taken for private, write-watched memory.
  • The card reads the bytes, including those the CPU wrote after with no call in between. The CPU reads what the card wrote, by a copy and by a shader through unordered access. Write watching saw 0 of the copy's 16 pages.
  • A reserved section is refused (0x80070057). A committed one opens and reads and writes through the view, also when the view is read-only or unmapped.
  • Heap flags differ: 0xe1 here (shared, cross-adapter, 0x40 and 0x80, the two "deny textures" flags) against 0x421 on Windows. vkd3d-proton reports no ALLOW_SHADER_ATOMICS.
  • Difference from 11.1 and 11.4: with a heap standing on a part of private memory, the title's own calls inside the part succeed here: 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 against VirtualProtect/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)

Never touched before Opened in Working set The card copies all of it out in
256 MB private 40.0 – 47.6 ms +256 MB 11.5 ms
1,024 MB private 154.6 ms +1,024 MB 44.2 ms
256 MB of a committed section 45.1 – 59.6 ms +0 MB 11.6 ms
1,024 MB of a committed section 179.1 ms +0 MB (also after the card read all of it) 44.3 ms

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.

Where the buffer lies Shaders read Shaders store
The PC's memory (a host copy, pool L0) 14.7 GB/s 2.0 GB/s
The card's memory 486.6 GB/s 133.7 GB/s
Card memory the CPU maps (GPU_UPLOAD) 487.5 GB/s 133.6 GB/s

Ratios 33x for reads and 66x for stores. The CPU copies into GPU_UPLOAD memory 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.

**@⁠gabrielecabrini** on GitHub · 2026-11-30 19:06 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4210#issuecomment-7288845273) 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 with `cargo xwin` from this branch merged onto main e1251c31, then run with Proton's `wine` and `WINEDLLOVERRIDES="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_`, with `VICTORY_INPLACE_TEST_CARD=1` and `VICTORY_INPLACE_TEST_MB=256` or `1024`. ### 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_bytes` fails at `GPU writes land in private memory`. The shader write reports `REFUSED 0x80004005`. That error comes from `D3DCompile` in `Rig::shade`: Wine's builtin `d3dcompiler_47` (vkd3d-shader) refuses `Load`/`Store` on `RWByteAddressBuffer`. That's the case `hlsl.rs` already handles with a DXC fallback. Using it fixes the test here (DXC through `VICTORY_DXC`), and on Windows it still takes the system compiler first: ```diff - let mut code: Option<ID3DBlob> = None; ... - D3DCompile(SOURCE.as_ptr().cast(), SOURCE.len(), s!("inplace"), None, None, s!("main"), s!("cs_5_1"), 0, 0, &mut code, None)?; - let code = code.ok_or_else(windows::core::Error::empty)?; - let bytes = std::slice::from_raw_parts(code.GetBufferPointer().cast::<u8>(), code.GetBufferSize()); + let code = crate::hlsl::compile_compute("inplace", SOURCE)?; + let bytes = code.as_slice(); ``` It also drops the now unused `D3DCompile`, `ID3DBlob` and `s` imports. Clippy is clean for `inplace.rs`. With this change: `4 passed; 0 failed`. ### 2. What vkd3d-proton takes (compare 11.1) - Device: `ID3D12Device3 true, ID3D12Device13 true`, heap tier 2, cross-adapter row-major textures false. - `OpenExistingHeapFromAddress` and `OpenExistingHeapFromAddress1` are both taken for private, write-watched memory. - The card reads the bytes, including those the CPU wrote after with no call in between. The CPU reads what the card wrote, by a copy and by a shader through unordered access. Write watching saw 0 of the copy's 16 pages. - A reserved section is refused (`0x80070057`). A committed one opens and reads and writes through the view, also when the view is read-only or unmapped. - **Heap flags differ:** `0xe1` here (shared, cross-adapter, 0x40 and 0x80, the two "deny textures" flags) against `0x421` on Windows. vkd3d-proton reports no `ALLOW_SHADER_ATOMICS`. - **Difference from 11.1 and 11.4:** with a heap standing on a part of private memory, the title's own calls inside the part succeed here: `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 against `VirtualProtect`/`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) | Never touched before | Opened in | Working set | The card copies all of it out in | |---|---|---|---| | 256 MB private | 40.0 – 47.6 ms | +256 MB | 11.5 ms | | 1,024 MB private | 154.6 ms | +1,024 MB | 44.2 ms | | 256 MB of a committed section | 45.1 – 59.6 ms | **+0 MB** | 11.6 ms | | 1,024 MB of a committed section | 179.1 ms | **+0 MB** (also after the card read all of it) | 44.3 ms | 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. | Where the buffer lies | Shaders read | Shaders store | |---|---|---| | The PC's memory (a host copy, pool L0) | 14.7 GB/s | 2.0 GB/s | | The card's memory | 486.6 GB/s | 133.7 GB/s | | Card memory the CPU maps (`GPU_UPLOAD`) | 487.5 GB/s | 133.6 GB/s | Ratios 33x for reads and 66x for stores. The CPU copies into `GPU_UPLOAD` memory 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.
Author
Owner

@⁠superuser404notfound on GitHub · 2026-11-30 19:49 UTC · original

The part this thread lists as not tested: VICTORY_INPLACE_PROBE=1 and 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 71cae091 beside victory.exe, DXC 1.9 beside it too. Build: main e1251c31 with #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 is REFUSED 0x80004005 in this build too, so the crate::hlsl change 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)

total openable today
title buffers 1,021 MB 348 MB private, committed whole; 228 MB one run of a section; 444 MB scattered pages
windows outside buffers 4,386 MB 524 MB private, committed whole; 580 MB view memory with unmapped pages; 3,210 MB private but not committed whole, or guarded
the title's views of physical pages 11,186 MB in 76,247 views 76,241 of them a single 64 KiB page, the longest 6,236 MB

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 at 0x4c7d0000) 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)

median fps 10th percentile preparing per frame
without (probe run) 24.5 22.6 20.1 ms
with 24.0 22.0 20.6 ms

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 Holes or None (8 in the run), which is the case #2776's VICTORY_INPLACE_VIEWS is 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

**@⁠superuser404notfound** on GitHub · 2026-11-30 19:49 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4210#issuecomment-7290002016) The part this thread lists as not tested: `VICTORY_INPLACE_PROBE=1` and 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 `71cae091` beside `victory.exe`, DXC 1.9 beside it too. Build: main `e1251c31` with #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 is `REFUSED 0x80004005` in this build too, so the `crate::hlsl` change 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) | | total | openable today | |---|---|---| | title buffers | 1,021 MB | 348 MB private, committed whole; 228 MB one run of a section; 444 MB scattered pages | | windows outside buffers | 4,386 MB | 524 MB private, committed whole; 580 MB view memory with unmapped pages; 3,210 MB private but not committed whole, or guarded | | the title's views of physical pages | 11,186 MB in 76,247 views | 76,241 of them a single 64 KiB page, the longest 6,236 MB | 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 at `0x4c7d0000`) 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`) | | median fps | 10th percentile | preparing per frame | |---|---|---|---| | without (probe run) | 24.5 | 22.6 | 20.1 ms | | with | 24.0 | 22.0 | 20.6 ms | 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 `Holes` or `None` (8 in the run), which is the case #2776's `VICTORY_INPLACE_VIEWS` is 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](https://claude.com/claude-code)
Wine's d3dcompiler_47 refuses loads and stores of a RWByteAddressBuffer, so the
probe's shader write was refused under Proton; crate::hlsl takes the system's
compiler first and DXC where it refuses (suggested in the review of #4210).
Section 11.6 has the numbers gabrielecabrini (RTX 4070 SUPER) and
superuser404notfound (RTX 4080, with the title) measured under Proton.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠banaanpapa on GitHub · 2026-11-30 20:00 UTC · original

Thank you both. Taken in 04ad5b6a (the branch is also merged with e1251c31 now):

  • The probe's shader goes through 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. With VICTORY_INPLACE_TEST_CARD=1 the four tests pass on the RTX 5080 at 256 and 1,024 MB, and on WARP. The probe's shader write is still true (ok).
  • Your measurements are section 11.6 of 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.

**@⁠banaanpapa** on GitHub · 2026-11-30 20:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4210#issuecomment-7290264682) Thank you both. Taken in 04ad5b6a (the branch is also merged with `e1251c31` now): - The probe's shader goes through `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. With `VICTORY_INPLACE_TEST_CARD=1` the four tests pass on the RTX 5080 at 256 and 1,024 MB, and on WARP. The probe's shader write is still `true (ok)`. - Your measurements are section 11.6 of `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.
Author
Owner

@⁠gabrielecabrini on GitHub · 2026-11-30 20:04 UTC · original

Follow-up: VICTORY_INPLACE_PROBE=1 in game, same PC (Linux, Proton, vkd3d-proton). This is the title part that 11.5 lists as missing. Build: main e1251c31 + #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 false because D3DCompile in Rig::shade fails under Wine. There's no DXC fallback, even with VICTORY_DXC set. The crate::hlsl::compile_compute change from my previous comment fixes this too. Otherwise the in-game probe matches the test run.

2. Census, at 30 s and 150 s:

30 s 150 s
Title buffers 3,398 (729 MB) 3,857 (787 MB)
of which private, committed whole (can be opened) 3,269 (211 MB) 3,725 (264 MB)
of which in one run of a section 108 (135 MB) 111 (140 MB)
of which scattered view pages 21 (382 MB) 21 (382 MB)
Windows outside buffers 2 (14 MB) 729 (4,536 MB), mostly private not committed whole or guarded (2,854 MB) or views with unmapped pages (1,194 MB)
Title's views of physical pages 35,980 (6,410 MB) 86,145 (9,545 MB), all but 6 a single 64 KiB page

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).

**@⁠gabrielecabrini** on GitHub · 2026-11-30 20:04 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4210#issuecomment-7290364072) Follow-up: `VICTORY_INPLACE_PROBE=1` in game, same PC (Linux, Proton, vkd3d-proton). This is the title part that 11.5 lists as missing. Build: main e1251c31 + #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 false` because `D3DCompile` in `Rig::shade` fails under Wine. There's no DXC fallback, even with `VICTORY_DXC` set. The `crate::hlsl::compile_compute` change from my previous comment fixes this too. Otherwise the in-game probe matches the test run. **2. Census, at 30 s and 150 s:** | | 30 s | 150 s | |---|---|---| | Title buffers | 3,398 (729 MB) | 3,857 (787 MB) | | of which private, committed whole (can be opened) | 3,269 (211 MB) | 3,725 (264 MB) | | of which in one run of a section | 108 (135 MB) | 111 (140 MB) | | of which scattered view pages | 21 (382 MB) | 21 (382 MB) | | Windows outside buffers | 2 (14 MB) | 729 (4,536 MB), mostly private not committed whole or guarded (2,854 MB) or views with unmapped pages (1,194 MB) | | Title's views of physical pages | 35,980 (6,410 MB) | 86,145 (9,545 MB), all but 6 a single 64 KiB page | 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).
Author
Owner

@⁠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 71cae091 beside victory.exe, not Proton's own, and the build was e1251c31 with #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

**@⁠superuser404notfound** on GitHub · 2026-11-30 22:11 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4210#issuecomment-7293494640) Thanks, 11.6 reads right. Two small corrections for my run (the 4080): it used vkd3d-proton master `71cae091` beside `victory.exe`, not Proton's own, and the build was `e1251c31` with #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](https://claude.com/claude-code)
Author
Owner

@⁠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 master 71cae091 beside victory.exe, the build with #2585 and #2034, and the five switches from #2842), and gabrielecabrini's separately.

**@⁠banaanpapa** on GitHub · 2026-11-30 23:10 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4210#issuecomment-7294801154) @⁠superuser404notfound thanks, fixed in 214ea86c: 11.6 now gives each setup on its own (your vkd3d-proton master `71cae091` beside `victory.exe`, the build with #2585 and #2034, and the five switches from #2842), and gabrielecabrini's separately.
github-bot closed this pull request 2026-12-01 18:50:28 +00:00
Author
Owner

@⁠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.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4210#issuecomment-7321487549) 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4211
No description provided.