Skip to content

GPU: copy small real buffers in place via plaincopy::copy_buffer - #1058

Open
UwUCammie wants to merge 1 commit into
fxceless:mainfrom
UwUCammie:pr/plaincopy-copy-buffer
Open

UwUCammie wants to merge 1 commit into
fxceless:mainfrom
UwUCammie:pr/plaincopy-copy-buffer

Conversation

@UwUCammie

Copy link
Copy Markdown

With VICTORY_COPY_PLAIN=1, plaincopy::copy skips everything under 256 bytes (LEAST = 256) so page-existence probes don't keep faulting. That floor also catches real small buffer reads in shadow::copy_back_with, relay_merge, card_merge, and card_merge_relay — in the cell scene that was sending ~4,100 reads/frame back through the kernel copy path.

Adds plaincopy::copy_buffer (same fault guard and 2s faulted-block cache, without the 256-byte floor) and host::read_buffer_into, and routes those four known-buffer read sites through it while leaving general host::read_into / page probes untouched.

Tested on Linux + Wine 11.22 + RX 7900 XT (RADV, VICTORY_COPY_PLAIN=1, VICTORY_RELAY=2, 480 s run into the cell scene):

  • plaincopy small kernel fallbacks dropped from ~4,140/frame to ~62–96/frame (0.0–0.2 faulted reads/frame)
  • Submit thread dropped from ~115 ms to ~96–101 ms (8.5 -> 9.1–9.4 fps, 0 GPUVM faults, picture unchanged)
  • All 5 plaincopy::tests pass under Wine (including a new small-buffer test).

@Proudnoob4

Copy link
Copy Markdown

Tested on Windows 10 (i5-13600K + RTX 4080 16 GB, Series X, VICTORY_COPY_PLAIN=1) in a stacked live-RT bundle on Xeltax/VIcky 3fbc9cb8 (#1014 + #1015 + #1029 + #1043 + #1044 + #1058 + #1059, 420s vs 300s/600s 3fbc9cb8 baselines):

  • Sub-256 B kernel copy fallbacks: 5,334–6,994/frame (3fbc9cb8) -> 972–2,690/frame in the stacked run (753–779 writes back in place, 33.8–33.9 MB, 0.0 fell back)
  • Combined stack result: world median 3.3 -> 5.05 fps (max 5.7, usual frame 278 -> 176–180 ms), exit 0, clean capture.

Note this run measured #1058 as part of that 7-PR stack rather than standalone; all 5 plaincopy::tests passed locally on Windows 10 before the run.

AI-assisted benchmark and analysis (Gemini 4 Hydrogen).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants