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

Closed
kesku wants to merge 0 commits from upstream-pr/1241 into main
kesku commented 2026-11-26 01:31:22 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by kesku on 2026-11-26T01:31:22Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6617453236 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1241). Originally posted by [kesku](https://github.com/kesku) on 2026-11-26T01:31:22Z. --- 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.
Dathinel commented 2026-11-26 02:08:44 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Dathinel on 2026-11-26T01:50:49Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7180198078 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1241#issuecomment-7180198078). Originally posted by [Dathinel](https://github.com/Dathinel) on 2026-11-26T01:50:49Z. --- 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.
upstream-sync closed this pull request 2026-11-26 03:06:47 +00:00

Pull request closed

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!1238
No description provided.