Fix #721, #722, #726: copy-back only changed bytes; mark pages current conditionally; NaN-safe v_med3_f32 #1998

Closed
tharun-37 wants to merge 1 commit from upstream-pr/2000 into main
tharun-37 commented 2026-11-25 02:38:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-25T02:38:16Z.


Three small, localized fixes:

  • #721 (shadow): copy_back now writes only the bytes the GPU actually changed, instead of the whole 64 KiB piece, so a title write landing between the read and the write is no longer clobbered.
  • #722 (shadow): a synced page is marked current only if title memory still matches the host copy after the final query; otherwise it stays stale for the next refresh.
  • #726 (shader): v_med3_f32 lowering uses NaN-safe min/max so a NaN operand yields the smaller of the two numbers (matching RDNA2) instead of relying on host intrinsic NaN propagation.

Builds clean; victory-gpu shadow tests and v_med3_f32 nan test pass. Other failures in the suite are pre-existing (hardware/validator dependent, reproduce on unmodified main).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6595916036 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2000). Originally posted by [tharun-37](https://github.com/tharun-37) on 2026-11-25T02:38:16Z. --- Three small, localized fixes: - #721 (shadow): copy_back now writes only the bytes the GPU actually changed, instead of the whole 64 KiB piece, so a title write landing between the read and the write is no longer clobbered. - #722 (shadow): a synced page is marked current only if title memory still matches the host copy after the final query; otherwise it stays stale for the next refresh. - #726 (shader): v_med3_f32 lowering uses NaN-safe min/max so a NaN operand yields the smaller of the two numbers (matching RDNA2) instead of relying on host intrinsic NaN propagation. Builds clean; victory-gpu shadow tests and v_med3_f32 nan test pass. Other failures in the suite are pre-existing (hardware/validator dependent, reproduce on unmodified main).
upstream-sync closed this pull request 2026-11-25 03:03:14 +00:00
catminou4 commented 2026-11-25 03:03:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T02:48:45Z.

Review: COMMENTED


Mixed PR: victory-gpu copy-back path is Windows-only (nothing compiles on macOS); the victory-shader part is covered by the macOS test queue separately.

Copy-back writes only changed bytes + pages marked current conditionally — fixes #721/#722/#726 (dirty-page tracking correctness). Pairs with the #1986/#1998/#2004 cluster; significant memory-traffic win if correct.

<!-- greyfinch-sync:Marvisak/VIctory:review:6051088109 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2000#pullrequestreview-6051088109). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T02:48:45Z. **Review:** COMMENTED --- Mixed PR: victory-gpu copy-back path is Windows-only (nothing compiles on macOS); the victory-shader part is covered by the macOS test queue separately. Copy-back writes only changed bytes + pages marked current conditionally — fixes #721/#722/#726 (dirty-page tracking correctness). Pairs with the #1986/#1998/#2004 cluster; significant memory-traffic win if correct.
DesertGamer commented 2026-11-25 03:03:37 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-25T02:40:25Z.


VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7151028623 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2000#issuecomment-7151028623). Originally posted by [DesertGamer](https://github.com/DesertGamer) on 2026-11-25T02:40:25Z. --- ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
tharun-37 commented 2026-11-25 03:03:39 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-25T02:52:00Z.


Split into #2009 (gpu) and #2010 (shader) per review feedback.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7151288625 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2000#issuecomment-7151288625). Originally posted by [tharun-37](https://github.com/tharun-37) on 2026-11-25T02:52:00Z. --- Split into #2009 (gpu) and #2010 (shader) per review feedback.
upipibi commented 2026-11-25 03:03:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T03:00:19Z.


Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at 6f4a0fd. victory-shader: 244 passed, 3 failed, 3 ignored. The 3 are #1744's NVIDIA failures on main (the two stride_tests heap-buffer reads and gathers_at_a_level_match_the_hardware). victory-gpu: 141 passed, 2 failed, with only the two NVIDIA heap-cap failures main also has (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views). Same as main on this hardware. Not run: a title.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7151491500 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2000#issuecomment-7151491500). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-25T03:00:19Z. --- Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at `6f4a0fd`. `victory-shader`: 244 passed, 3 failed, 3 ignored. The 3 are #1744's NVIDIA failures on `main` (the two `stride_tests` heap-buffer reads and `gathers_at_a_level_match_the_hardware`). `victory-gpu`: 141 passed, 2 failed, with only the two NVIDIA heap-cap failures `main` also has (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`). Same as `main` on this hardware. Not run: a title. AI-assisted (Claude Code).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1998
No description provided.