Copy GPU texture aliases after an upload from title memory #1241

Closed
github-bot wants to merge 1 commit from gh-pr/1241/head into gh-pr/1241/base
Owner

@⁠kesku on GitHub · 2026-11-26 01:31 UTC · original
kesku:fix/atlas-copy-after-upload → main · +0 −0 · 0 files · 0 commits · closed without merging

A command list can upload a texture from title memory, then sample it as a view of a GPU-written texture. The upload marks the view as used. If the GPU source needs no state transition, alias skips the copy and the shader reads the uploaded bytes.

Track the last GPU source copied into each texture in the list. The first alias read copies from that source even if the list already uploaded the texture.

On an RTX 5080, the regression read back zero on main and the expected 0x8c020100 with the patch. All 10 resource tests passed.

**@⁠kesku** on GitHub · 2026-11-26 01:31 UTC · [original](https://github.com/fxceless/victory-fork/pull/1241) `kesku:fix/atlas-copy-after-upload` → `main` · +0 −0 · 0 files · 0 commits · closed without merging A command list can upload a texture from title memory, then sample it as a view of a GPU-written texture. The upload marks the view as used. If the GPU source needs no state transition, `alias` skips the copy and the shader reads the uploaded bytes. Track the last GPU source copied into each texture in the list. The first alias read copies from that source even if the list already uploaded the texture. On an RTX 5080, the regression read back zero on `main` and the expected `0x8c020100` with the patch. All 10 resource tests passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:00:12 +00:00
github-bot closed this pull request 2026-11-26 04:00:12 +00:00
Author
Owner

@⁠Dathinel on GitHub · 2026-11-26 01:50 UTC · original

Confirmed the atlas readback on an RTX 3050 Laptop (4 GB). With the same synthetic test on our integration tree before the fix (9a5ecb3), the first sampled texel was 0x00000000. After integrating upstream's 19a45d1, it was 0x8c020100, exactly the value written by the GPU. I added a temporary print immediately before the assertion to confirm the test reached readback on both runs.

cargo test -p victory-gpu --features diagnostics --lib alias_after_title_upload_copies_the_gpu_atlas -- --nocapture

Integration commit. This checks the texture copy. Scene brightness and frame time remain unmeasured. AI-assisted verification.

**@⁠Dathinel** on GitHub · 2026-11-26 01:50 UTC · [original](https://github.com/fxceless/victory-fork/pull/1241#issuecomment-7180198078) Confirmed the atlas readback on an RTX 3050 Laptop (4 GB). With the same synthetic test on our integration tree before the fix (`9a5ecb3`), the first sampled texel was `0x00000000`. After integrating upstream's `19a45d1`, it was `0x8c020100`, exactly the value written by the GPU. I added a temporary print immediately before the assertion to confirm the test reached readback on both runs. `cargo test -p victory-gpu --features diagnostics --lib alias_after_title_upload_copies_the_gpu_atlas -- --nocapture` [Integration commit](https://github.com/Dathinel/victory-fork/commit/090554fcc4cde2b9ba21f1ba1b4de96bf6e89db3). This checks the texture copy. Scene brightness and frame time remain unmeasured. AI-assisted verification.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.