merge overlapping gpu write-back ranges and coalesce watch opens #991

Closed
github-bot wants to merge 5 commits from gh-pr/991/head into gh-pr/991/base
Owner

@⁠matheusfrta on GitHub · 2026-11-24 14:43 UTC · original
matheusfrta:patch-1795531426 → main · +293 −91 · 3 files · 5 commits · closed without merging

It merges overlapping shader write ranges per shadow buffer so each submission diffs and copies back every byte at most once instead of re-scanning overlapping views against the same snapshot, and uses 8-byte chunk fast paths during the merge. It also coalesces contiguous VirtualProtect calls in watch::open, drops a temporary Vec allocation in watch::writes, and ignores zero-length ranges so unaligned zero-byte calls do not unguard a block.

**@⁠matheusfrta** on GitHub · 2026-11-24 14:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/991) `matheusfrta:patch-1795531426` → `main` · +293 −91 · 3 files · 5 commits · closed without merging It merges overlapping shader write ranges per shadow buffer so each submission diffs and copies back every byte at most once instead of re-scanning overlapping views against the same snapshot, and uses 8-byte chunk fast paths during the merge. It also coalesces contiguous VirtualProtect calls in watch::open, drops a temporary Vec allocation in watch::writes, and ignores zero-length ranges so unaligned zero-byte calls do not unguard a block.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:16:12 +00:00
github-bot closed this pull request 2026-11-26 04:16:12 +00:00
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 14:55 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 00c1f57: cargo test -p victory-gpu does not compile:

error[E0425]: cannot find value `DXGI_FORMAT_B8G8B8A8_UNORM` in this scope
  --> crates\victory-gpu\src\host.rs:1444:25
1444 |         87 | 90 | 91 => DXGI_FORMAT_B8G8B8A8_UNORM,

Looks like a typo for DXGI_FORMAT_B8G8R8A8_UNORM (the line is added by this PR). main (ffe310e) builds and passes on the same machine.

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 14:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/991#issuecomment-7135159629) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 00c1f57: `cargo test -p victory-gpu` does not compile: ``` error[E0425]: cannot find value `DXGI_FORMAT_B8G8B8A8_UNORM` in this scope --> crates\victory-gpu\src\host.rs:1444:25 1444 | 87 | 90 | 91 => DXGI_FORMAT_B8G8B8A8_UNORM, ``` Looks like a typo for `DXGI_FORMAT_B8G8R8A8_UNORM` (the line is added by this PR). main (ffe310e) builds and passes on the same machine. _Tested with AI assistance (Claude)._
Author
Owner

@⁠matheusfrta on GitHub · 2026-11-24 15:19 UTC · original

Thanks for catching that! Fixed the typo back to DXGI_FORMAT_B8G8R8A8_UNORM in host.rs.

**@⁠matheusfrta** on GitHub · 2026-11-24 15:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/991#issuecomment-7135830014) Thanks for catching that! Fixed the typo back to DXGI_FORMAT_B8G8R8A8_UNORM in host.rs.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:29 UTC · original

Automated triage for the maintainers. Closing because this change is already in main, or main has since replaced the code it patches.

Superseded by main: whole pieces are compared and copied back once per submission (shadow.rs compared), and the watch.rs functions it tunes (open over ranges, writes) were replaced by per-copy trackers.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/991#issuecomment-7148565627) Automated triage for the maintainers. Closing because this change is already in `main`, or `main` has since replaced the code it patches. Superseded by main: whole pieces are compared and copied back once per submission (shadow.rs `compared`), and the watch.rs functions it tunes (open over ranges, writes) were replaced by per-copy trackers. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

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/Marvisak--VIctory!991
No description provided.