Support aligned render-XOR water texture readback #1328

Open
cxy0072019-sketch wants to merge 1 commit from upstream-pr/1331 into main
cxy0072019-sketch commented 2026-11-26 15:46:10 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by cxy0072019-sketch on 2026-11-26T15:46:10Z.


Follow-up to #999. The CPU reads a tiled water height texture for buoyancy. A 256 × 256 R32_FLOAT plane in the render-XOR layout needs the console's pipe configuration to put the GPU's bytes back where the CPU expects them.

  • Support the aligned, single-mip SW_64KB_R_X plane on Series S and X. Keep the existing path for other addressable layouts and skip the GPU copy when the layout cannot be addressed.
  • Test both pipe configurations against independently generated digests of a synthetic plane. The test also covers padded rows, individual offsets, and the round trip through tiling and detiling. A GPU-layer regression test covers unsupported layouts and unaligned destinations.

On Windows, the clean branch passed 27 format tests and 218 GPU-layer tests. The staged asset-policy check passed for both files. With the same layout code in a separate native Series S integration build on an RTX 5070 Ti at 1920 × 1080, the first nonzero 262,144-byte plane copied back to guest memory byte for byte. The boat stayed afloat under player control. Small artifacts in water reflections remain.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6630224448 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1331). Originally posted by [cxy0072019-sketch](https://github.com/cxy0072019-sketch) on 2026-11-26T15:46:10Z. --- Follow-up to #999. The CPU reads a tiled water height texture for buoyancy. A 256 × 256 R32_FLOAT plane in the render-XOR layout needs the console's pipe configuration to put the GPU's bytes back where the CPU expects them. - Support the aligned, single-mip `SW_64KB_R_X` plane on Series S and X. Keep the existing path for other addressable layouts and skip the GPU copy when the layout cannot be addressed. - Test both pipe configurations against independently generated digests of a synthetic plane. The test also covers padded rows, individual offsets, and the round trip through tiling and detiling. A GPU-layer regression test covers unsupported layouts and unaligned destinations. On Windows, the clean branch passed 27 format tests and 218 GPU-layer tests. The staged asset-policy check passed for both files. With the same layout code in a separate native Series S integration build on an RTX 5070 Ti at 1920 × 1080, the first nonzero 262,144-byte plane copied back to guest memory byte for byte. The boat stayed afloat under player control. Small artifacts in water reflections remain.
rafaconvaitis commented 2026-11-26 16:57:43 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by rafaconvaitis on 2026-11-26T16:57:43Z.


I reproduced a successful helm transfer with this layout code on an RTX 4070 12 GB, Windows and Series S, starting from a copied post-robbery checkpoint. The Cool Fox integration included the layout and destination changes from this PR, with the existing tiled-layout bounds preserved.

In Gone Fishing, Jason took the helm with Y. RT accelerated the boat and left a visible wake with Cal aboard. The HUD reached Collect the package. The log reported repeated successful 256 KiB texture readbacks and zero unsupported-tiling warnings in the observed boat segment. The two focused layout and destination tests pass on the Cool Fox backport branch. I opened the focused backport there. https://github.com/DoubleGhosty/cool_fox/pull/21

The first 60 s at the helm had a 13.5 FPS median (73.9 ms). This measures the integrated build. Some reflections and missing draws are still visible.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7198314095 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1331#issuecomment-7198314095). Originally posted by [rafaconvaitis](https://github.com/rafaconvaitis) on 2026-11-26T16:57:43Z. --- I reproduced a successful helm transfer with this layout code on an RTX 4070 12 GB, Windows and Series S, starting from a copied post-robbery checkpoint. The Cool Fox integration included the layout and destination changes from this PR, with the existing tiled-layout bounds preserved. In Gone Fishing, Jason took the helm with Y. RT accelerated the boat and left a visible wake with Cal aboard. The HUD reached **Collect the package**. The log reported repeated successful 256 KiB texture readbacks and zero unsupported-tiling warnings in the observed boat segment. The two focused layout and destination tests pass on the Cool Fox backport branch. I opened the focused backport there. https://github.com/DoubleGhosty/cool_fox/pull/21 The first 60 s at the helm had a 13.5 FPS median (73.9 ms). This measures the integrated build. Some reflections and missing draws are still visible.
Filip722 commented 2026-11-27 16:18:09 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-27T16:18:09Z.


I replayed the same offline Series S checkpoint with and without the layout changes from 48d5a967f1cb637a338d74cca101cab15d5ae6ee, ported onto the newer NVIDIA-based renderer. The port retains the current renderer's shared static swizzle tables. Both arms use the same saved state, caches, compiled helper prerequisites and runtime settings on Bazzite 44, RTX 5060 Laptop 8 GB, NVIDIA 615.78.08, GE-Proton11-14 and vkd3d-proton 3.2.0.

The two added synthetic layout/resource tests passed under Windows MSVC release on Proton. In the live replay, both arms showed the on-water objective and then reported that the passenger fell off, before input. Both runs logged landed water texture readbacks. The short pre-failure crops delivered 2.75 FPS on the control and 2.77 FPS with the patch. These runs do not establish whether the height plane actually selected the aligned render-XOR case.

This adds a Proton observation to the existing Windows report. The source and logs were checked locally, with no title data attached.

Assisted by Codex (GPT-6.2-Sol High).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7223098329 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1331#issuecomment-7223098329). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-27T16:18:09Z. --- I replayed the same offline Series S checkpoint with and without the layout changes from `48d5a967f1cb637a338d74cca101cab15d5ae6ee`, ported onto the newer NVIDIA-based renderer. The port retains the current renderer's shared static swizzle tables. Both arms use the same saved state, caches, compiled helper prerequisites and runtime settings on Bazzite 44, RTX 5060 Laptop 8 GB, NVIDIA 615.78.08, GE-Proton11-14 and vkd3d-proton 3.2.0. The two added synthetic layout/resource tests passed under Windows MSVC release on Proton. In the live replay, both arms showed the on-water objective and then reported that the passenger fell off, before input. Both runs logged landed water texture readbacks. The short pre-failure crops delivered 2.75 FPS on the control and 2.77 FPS with the patch. These runs do not establish whether the height plane actually selected the aligned render-XOR case. This adds a Proton observation to the existing Windows report. The source and logs were checked locally, with no title data attached. Assisted by Codex (GPT-6.2-Sol High).
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/1331:upstream-pr/1331'
git switch 'upstream-pr/1331'

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/1331'
git switch 'upstream-pr/1331'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1331'
git switch 'upstream-pr/1331'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1331'
git switch 'main'
git merge --squash 'upstream-pr/1331'
git switch 'main'
git merge --ff-only 'upstream-pr/1331'
git switch 'main'
git merge 'upstream-pr/1331'
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
fxceless/victory-fork!1328
No description provided.