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

Open
github-bot wants to merge 1 commit from github-bot/gh-610 into main AGit
Owner

@⁠AnastasisKon on GitHub · 2026-11-28 12:29 UTC · original
AnastasisKon:vibe/probe-par-1705ac → main · +77 −0 · 4 files · 1 commits · open

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
**@⁠AnastasisKon** on GitHub · 2026-11-28 12:29 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/610) `AnastasisKon:vibe/probe-par-1705ac` → `main` · +77 −0 · 4 files · 1 commits · open 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
A whole probe of a big texture (the scanner's periodic whole reads 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 on the rayon pool and hands them to the hasher in one go;
hashing the whole equals hashing the chunks in order, which a test checks
against blake3::hash for buffers straddling the cutoff.

Refs #179

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 12:33:19 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/614/head:github-bot/gh-610'
git switch 'github-bot/gh-610'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-610'
git switch 'github-bot/gh-610'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-610'
git switch 'github-bot/gh-610'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-610'
git switch 'main'
git merge --squash 'github-bot/gh-610'
git switch 'main'
git merge --ff-only 'github-bot/gh-610'
git switch 'main'
git merge 'github-bot/gh-610'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.