Copy phone photo render targets back to game memory #3363

Closed
github-bot wants to merge 1 commit from github-bot/gh-3363 into main AGit
Owner

@⁠Kitrae on GitHub · 2026-11-29 22:16 UTC · original
Kitrae:fix/phone-gallery-readback → main · +86 −8 · 5 files · 1 commits · closed without merging

Fixes #1388.

What it changes

The 960×536 linear RGBA8 target used for phone photos stayed on the host GPU after the capture pass. The game wrote two valid JPEGs from zeroed pixels. Register this render target for the existing texture readback when a draw or clear writes it. The command list copies it back and the pixels land in the game's memory when the submission completes. The existing VICTORY_TEXTURE_BACK setting controls whether it is selected.

How it was tested

  • RTX 4090, Windows 11, Series X profile, 3840×1080 ultrawide output, DLSS Performance and 3× frame generation.
  • Before, every decoded RGB channel in the saved 960×536 and 536×536 JPEGs was zero. The trace showed the 960×536 RGBA8 render target bound immediately before the files were written.
  • After, the player confirmed the new photo displayed in the phone gallery. Both saved JPEGs decoded with colour and detail. This run used the ultrawide build with the same readback patch.
  • On upstream main with this patch, a D3D12 regression test cleared a synthetic 960×536 RGBA8 target and checked all 514,560 pixels after the copy back to CPU memory. The existing texture allocation reuse regression test also passed. Both exercised the host GPU.
  • git diff --check and the asset-policy check for all five changed files passed.

Checked for overlap

  • Searched open PRs for #1388, phone gallery, phone photos and the target size. Related: #2412 covers partial readbacks from textures to buffers.

AI-assisted contribution using OpenAI Codex. The in-game result was verified by the player.

**@⁠Kitrae** on GitHub · 2026-11-29 22:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3363) `Kitrae:fix/phone-gallery-readback` → `main` · +86 −8 · 5 files · 1 commits · closed without merging Fixes #1388. ## What it changes The 960×536 linear RGBA8 target used for phone photos stayed on the host GPU after the capture pass. The game wrote two valid JPEGs from zeroed pixels. Register this render target for the existing texture readback when a draw or clear writes it. The command list copies it back and the pixels land in the game's memory when the submission completes. The existing `VICTORY_TEXTURE_BACK` setting controls whether it is selected. ## How it was tested - RTX 4090, Windows 11, Series X profile, 3840×1080 ultrawide output, DLSS Performance and 3× frame generation. - Before, every decoded RGB channel in the saved 960×536 and 536×536 JPEGs was zero. The trace showed the 960×536 RGBA8 render target bound immediately before the files were written. - After, the player confirmed the new photo displayed in the phone gallery. Both saved JPEGs decoded with colour and detail. This run used the ultrawide build with the same readback patch. - On upstream `main` with this patch, a D3D12 regression test cleared a synthetic 960×536 RGBA8 target and checked all 514,560 pixels after the copy back to CPU memory. The existing texture allocation reuse regression test also passed. Both exercised the host GPU. - `git diff --check` and the asset-policy check for all five changed files passed. ## Checked for overlap - [x] Searched open PRs for #1388, phone gallery, phone photos and the target size. Related: #2412 covers partial readbacks from textures to buffers. AI-assisted contribution using OpenAI Codex. The in-game result was verified by the player.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 22:18:13 +00:00
github-bot closed this pull request 2026-12-01 18:58:50 +00:00

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/trustno1-coder--VIctory-NVIDIA!3363
No description provided.