gpu(native): read big whole probes chunk-parallel on the rayon pool #610

Open
AnastasisKon wants to merge 1 commit from upstream-pr/610 into main
AnastasisKon commented 2026-11-28 12:29:40 +00:00 (Migrated from github.com)

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T12:29:40Z.


Refs #179

What

A whole probe of a big texture — the periodic whole reads the probe round does of hot textures — copied its bytes chunk by chunk on the calling thread. The chunks are independent, so probe_read now reads buffers over 1 MiB with par_chunks_mut(1 MiB) on the rayon pool and hands the bytes to the hasher in one seen call. Hashing the whole equals hashing the chunks in order (BLAKE3 is sequential over the input), which a test verifies against blake3::hash for buffers straddling the cutoff (1 MiB+1, 3 MiB+7). Smaller buffers keep the existing scratch loop.

Adds rayon as a workspace dependency of victory-gpu.

Testing

  • cargo test -p victory-hle -p victory -p victory-gpu -p xtask (host arm64) — all pass, incl. probe_hash_whole_matches_blake3_for_big_buffers
  • cargo test --target x86_64-apple-darwin -p victory-gpu --lib textures:: — 19 pass, 0 fail
  • cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings — clean
  • cargo xtask policy — 404 files ok

Checklist

  • One change, one PR
  • Branch vibe/probe-par-1705ac from upstream/main, pushed to my fork only
  • No game/GDK files, no dumps/logs in the repo
  • No AI attribution in the diff
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:5540128968 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/610). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T12:29:40Z. --- Refs #179 ## What A whole probe of a big texture — the periodic whole reads the probe round does of hot textures — copied its bytes chunk by chunk on the calling thread. The chunks are independent, so `probe_read` now reads buffers over 1 MiB with `par_chunks_mut(1 MiB)` on the rayon pool and hands the bytes to the hasher in one `seen` call. Hashing the whole equals hashing the chunks in order (BLAKE3 is sequential over the input), which a test verifies against `blake3::hash` for buffers straddling the cutoff (1 MiB+1, 3 MiB+7). Smaller buffers keep the existing scratch loop. Adds `rayon` as a workspace dependency of `victory-gpu`. ## Testing - [x] `cargo test -p victory-hle -p victory -p victory-gpu -p xtask` (host arm64) — all pass, incl. `probe_hash_whole_matches_blake3_for_big_buffers` - [x] `cargo test --target x86_64-apple-darwin -p victory-gpu --lib textures::` — 19 pass, 0 fail - [x] `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings` — clean - [x] `cargo xtask policy` — 404 files ok ## Checklist - [x] One change, one PR - [x] Branch `vibe/probe-par-1705ac` from `upstream/main`, pushed to my fork only - [x] No game/GDK files, no dumps/logs in the repo - [x] No AI attribution in the diff
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/610:upstream-pr/610'
git switch 'upstream-pr/610'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/610'
git switch 'upstream-pr/610'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/610'
git switch 'upstream-pr/610'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/610'
git switch 'main'
git merge --squash 'upstream-pr/610'
git switch 'main'
git merge --ff-only 'upstream-pr/610'
git switch 'main'
git merge 'upstream-pr/610'
git push origin 'main'
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
LakshanSivakumar/Native-Victory-macOS!610
No description provided.