VIctory GPU loses earlier texture writes when two command lists are recorded in reverse order #1891

Open
opened 2026-11-26 04:47:46 +00:00 by github-bot · 7 comments
Owner

@⁠yuniskh on GitHub · 2026-11-25 00:12 UTC · original

Hey VIctory testers, can someone try this on a second GPU? On my RTX 5090, I can make three pixels disappear just by changing which command list I record first. The GPU still executes the same two copies in the same order.

  1. Start with the patched d2a4bae build described in the ZIP. Copy two overlapping 2×2 regions, A and B, into a 4×4 RGBA8 texture.
  2. Record A then B, submit A then B, and read back the texture immediately after B. On my GPU, all 16 pixels matched.
  3. Record B then A and still submit A then B. On my GPU, only 13/16 matched. The three pixels written only by A reverted to the background in all 10 runs for each source type (buffer and texture).

The native D3D12 control got 16/16 both ways on the same machine. Moving the initial texture upload decision to queue submission brought VIctory back to 16/16 as well. The patched GPU suite passed 55/55, plus 30 focused reruns. I tested on Windows 11 with NVIDIA driver 621.24.

If you try it, could you share your GPU, driver, and the pixel count before and after the patch? The test uses generated textures, so anyone can run it without GTA VI. I don’t have the game files to check whether this affects gameplay.

Download the test, candidate fix, native control, and logs · Original RTX 5090 report

I used Astra 6.2 to help collect and check the logs.

**@⁠yuniskh** on GitHub · 2026-11-25 00:12 UTC · [original](https://github.com/Marvisak/VIctory/issues/1891) Hey VIctory testers, can someone try this on a second GPU? On my RTX 5090, I can make three pixels disappear just by changing which command list I record first. The GPU still executes the same two copies in the same order. 1. Start with the patched `d2a4bae` build described in the ZIP. Copy two overlapping 2×2 regions, A and B, into a 4×4 RGBA8 texture. 2. Record A then B, submit A then B, and read back the texture immediately after B. On my GPU, all 16 pixels matched. 3. Record B then A and still submit A then B. On my GPU, only 13/16 matched. The three pixels written only by A reverted to the background in all 10 runs for each source type (buffer and texture). The native D3D12 control got 16/16 both ways on the same machine. Moving the initial texture upload decision to queue submission brought VIctory back to 16/16 as well. The patched GPU suite passed 55/55, plus 30 focused reruns. I tested on Windows 11 with NVIDIA driver 621.24. If you try it, could you share your GPU, driver, and the pixel count before and after the patch? The test uses generated textures, so anyone can run it without GTA VI. I don’t have the game files to check whether this affects gameplay. [Download the test, candidate fix, native control, and logs](https://github.com/user-attachments/files/35382924/VIctory-RTX5090-recording-order-results.zip) · [Original RTX 5090 report](https://git.gtahub.st/github/Marvisak--VIctory/issues/49) I used Astra 6.2 to help collect and check the logs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:47:46 +00:00
Author
Owner

@⁠arthurprudenteres on GitHub · 2026-11-25 00:28 UTC · original

I'd like to take the current-main follow-up for #1891. I will check on an RTX 5060 Ti and WARP whether GPU contents still depend on recording order, and add a focused regression for the case that reproduces on main. I will stay within the GPU texture upload/copy and submission code. I will compare against the RTX 5090 report and avoid opening a second PR for the same candidate if you already plan to submit it.

**@⁠arthurprudenteres** on GitHub · 2026-11-25 00:28 UTC · [original](https://github.com/Marvisak/VIctory/issues/1891#issuecomment-7148541656) I'd like to take the current-main follow-up for #1891. I will check on an RTX 5060 Ti and WARP whether GPU contents still depend on recording order, and add a focused regression for the case that reproduces on main. I will stay within the GPU texture upload/copy and submission code. I will compare against the RTX 5090 report and avoid opening a second PR for the same candidate if you already plan to submit it.
Author
Owner

@⁠arthurprudenteres on GitHub · 2026-11-25 00:36 UTC · original

I am releasing my current-main claim while the lab changes its development baseline. The GPU test crate compiled at 4118f33, but I did not run the recording-order fixture on the RTX 5060 Ti or WARP. I have no new pixel measurements or PR for this issue. The RTX 5090 report remains the available before-and-after evidence.

**@⁠arthurprudenteres** on GitHub · 2026-11-25 00:36 UTC · [original](https://github.com/Marvisak/VIctory/issues/1891#issuecomment-7148692548) I am releasing my current-main claim while the lab changes its development baseline. The GPU test crate compiled at `4118f33`, but I did not run the recording-order fixture on the RTX 5060 Ti or WARP. I have no new pixel measurements or PR for this issue. The RTX 5090 report remains the available before-and-after evidence.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 01:04 UTC · original

I reproduced the recording-order dependency on WARP at upstream 42363ab6cd with a related synthetic case. One list snapshots a 4×4 RGBA8 texture and the other overwrites it. The two matching record/submit orders produced 16/16 correct pixels. Both opposite orders produced 0/16. The same test failed on fbec4e2 and got 16/16 for all four combinations on #230 at 067ece6b11.

Regression commit · Full verification and current rebase conflicts

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 01:04 UTC · [original](https://github.com/Marvisak/VIctory/issues/1891#issuecomment-7149176882) I reproduced the recording-order dependency on WARP at upstream 42363ab6cd5265f0fb3b500ad265f2b84c6b5dbf with a related synthetic case. One list snapshots a 4×4 RGBA8 texture and the other overwrites it. The two matching record/submit orders produced 16/16 correct pixels. Both opposite orders produced 0/16. The same test failed on fbec4e2 and got 16/16 for all four combinations on #230 at 067ece6b119459d3085b8208a5c8cbd4514ce7e8. [Regression commit](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/52cc201418a76411dc9b8bcd993bfc43e97be785) · [Full verification and current rebase conflicts](https://git.gtahub.st/github/Marvisak--VIctory/pulls/230)
Author
Owner

@⁠Marcos-Barranquero on GitHub · 2026-11-25 01:07 UTC · original

Second GPU, as asked: RTX 4070 Ti SUPER (Ada), driver 32.0.16.1692 (616.92), Windows 11.

With the regression from @⁠andrewpozdnakov7-jpg's 52cc201 (list::tests::texture_copy_reads_follow_submission_order, cargo test -p victory-gpu --features diagnostics --lib):

  • upstream main 42363ab plus that test: fails 5 out of 5 runs, with the same table as on WARP. The two matching record/submit orders are 16/16; both opposite orders are 0/16.
  • #230 at 067ece6 plus the test: passes 5 out of 5. The whole victory-gpu lib suite on that tree: 58 passed, 0 failed, 1 ignored.

So the recording-order dependency is not specific to WARP or Blackwell, and #230 fixes it on Ada too. #230 still needs a rebase onto main (the conflicts are listed in its thread).

For anyone comparing: on main here victory-gpu also fails descriptor::host::tests::dynamic_slots_are_held_until_released (NVIDIA's 1,000,000 view cap, #1835) and memory::tests::lists_share_a_table_and_copies_keep_their_views. Both are existing tests on main, independent of the one added here.

No game files: synthetic textures only.

AI-assisted (Claude Code).

**@⁠Marcos-Barranquero** on GitHub · 2026-11-25 01:07 UTC · [original](https://github.com/Marvisak/VIctory/issues/1891#issuecomment-7149226191) Second GPU, as asked: **RTX 4070 Ti SUPER** (Ada), driver 32.0.16.1692 (616.92), Windows 11. With the regression from @⁠andrewpozdnakov7-jpg's 52cc201 (`list::tests::texture_copy_reads_follow_submission_order`, `cargo test -p victory-gpu --features diagnostics --lib`): - upstream `main` 42363ab plus that test: **fails 5 out of 5 runs**, with the same table as on WARP. The two matching record/submit orders are 16/16; both opposite orders are 0/16. - #230 at 067ece6 plus the test: **passes 5 out of 5**. The whole `victory-gpu` lib suite on that tree: 58 passed, 0 failed, 1 ignored. So the recording-order dependency is not specific to WARP or Blackwell, and #230 fixes it on Ada too. #230 still needs a rebase onto `main` (the conflicts are listed in its thread). For anyone comparing: on `main` here `victory-gpu` also fails `descriptor::host::tests::dynamic_slots_are_held_until_released` (NVIDIA's 1,000,000 view cap, #1835) and `memory::tests::lists_share_a_table_and_copies_keep_their_views`. Both are existing tests on `main`, independent of the one added here. No game files: synthetic textures only. AI-assisted (Claude Code).
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 02:21 UTC · original

Third vendor, as asked — the recording-order dependency is not NVIDIA-specific. RX 7800 XT (RDNA3), driver 32.0.32029.2010, Windows 10 19045, upstream main 940d32f plus @⁠andrewpozdnakov7-jpg's list::tests::texture_copy_reads_follow_submission_order applied verbatim (cargo test -p victory-gpu --features diagnostics --lib texture_copy_reads_follow_submission_order):

record submit pixels matching sampled value
A A 16/16 0xFF3C3C3C
A B 0/16 zero
B A 0/16 zero
B B 16/16 0xFF5A5A5A

Expected on all four: 16/16. That is the same shape Marcos-Barranquero saw on Ada: the record/submit orders that match are 16/16, both opposite orders are 0/16. So it reproduces on WARP, Blackwell, Ada and now RDNA3 — it is in the GPU layer's upload decision, not in a driver.

I am testing #230 (the prelude copy recording fix) on this GPU next and will report the pixel counts here. Synthetic textures only, no game data.

**@⁠Calvix2k** on GitHub · 2026-11-25 02:21 UTC · [original](https://github.com/Marvisak/VIctory/issues/1891#issuecomment-7150623391) Third vendor, as asked — the recording-order dependency is not NVIDIA-specific. **RX 7800 XT (RDNA3), driver 32.0.32029.2010, Windows 10 19045**, upstream `main` `940d32f` plus @⁠andrewpozdnakov7-jpg's `list::tests::texture_copy_reads_follow_submission_order` applied verbatim (`cargo test -p victory-gpu --features diagnostics --lib texture_copy_reads_follow_submission_order`): | record | submit | pixels matching | sampled value | |---|---|---|---| | A | A | 16/16 | `0xFF3C3C3C` | | A | B | **0/16** | zero | | B | A | **0/16** | zero | | B | B | 16/16 | `0xFF5A5A5A` | Expected on all four: 16/16. That is the same shape Marcos-Barranquero saw on Ada: the record/submit orders that match are 16/16, both opposite orders are 0/16. So it reproduces on WARP, Blackwell, Ada and now RDNA3 — it is in the GPU layer's upload decision, not in a driver. I am testing #230 (the prelude copy recording fix) on this GPU next and will report the pixel counts here. Synthetic textures only, no game data.
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 02:22 UTC · original

Follow-up with the fix tested: wbkepler's #230 head 067ece6 passes this exact test on the same RX 7800 XT (1 passed, all four orders 16/16, on a ffe310e base), while main 940d32f fails 2 of 4 arms. So the regression is fixed by the prelude-recording change on RDNA3 too, not just on the NVIDIA cards and WARP. Details in #230.

**@⁠Calvix2k** on GitHub · 2026-11-25 02:22 UTC · [original](https://github.com/Marvisak/VIctory/issues/1891#issuecomment-7150646940) Follow-up with the fix tested: wbkepler's #230 head `067ece6` passes this exact test on the same RX 7800 XT (1 passed, all four orders 16/16, on a `ffe310e` base), while `main 940d32f` fails 2 of 4 arms. So the regression is fixed by the prelude-recording change on RDNA3 too, not just on the NVIDIA cards and WARP. Details in #230.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 12:51 UTC · original

Automated triage for the maintainers.

Confirmed in main (940d32f). The texture's initial upload is decided when a list is recorded, not when it is submitted. upload in crates/victory-gpu/src/texture.rs records the staging copy in the first list that uses the texture, unless host_written is already set. The copy paths in crates/victory-gpu/src/list.rs set host_written while recording. So when B is recorded before A but submitted after it, the initial upload can sit in the wrong list and overwrite the earlier copy. The regression list::tests::texture_copy_reads_follow_submission_order reproduces this on WARP, an RTX 4070 Ti SUPER and an RX 7800 XT (Windows 10): 0/16 pixels for both mismatched orders.

Open pull requests: #1934 (resolves initial uploads and host_written at submission; it names this issue) and #230 (prelude copy recording; passes the regression on Ada and RDNA3, needs a rebase). The ZIP attached to the issue was not opened by this triage. Putting the change and its test in a PR, as these do, is the way to get it reviewed.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 12:51 UTC · [original](https://github.com/Marvisak/VIctory/issues/1891#issuecomment-7162961901) <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T02:22:48Z at=2026-11-25T12:51:34Z --> Automated triage for the maintainers. Confirmed in `main` (`940d32f`). The texture's initial upload is decided when a list is recorded, not when it is submitted. `upload` in `crates/victory-gpu/src/texture.rs` records the staging copy in the first list that uses the texture, unless `host_written` is already set. The copy paths in `crates/victory-gpu/src/list.rs` set `host_written` while recording. So when B is recorded before A but submitted after it, the initial upload can sit in the wrong list and overwrite the earlier copy. The regression `list::tests::texture_copy_reads_follow_submission_order` reproduces this on WARP, an RTX 4070 Ti SUPER and an RX 7800 XT (Windows 10): 0/16 pixels for both mismatched orders. Open pull requests: #1934 (resolves initial uploads and `host_written` at submission; it names this issue) and #230 (prelude copy recording; passes the regression on Ada and RDNA3, needs a rebase). The ZIP attached to the issue was not opened by this triage. Putting the change and its test in a PR, as these do, is the way to get it reviewed. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
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/Marvisak--VIctory#1891
No description provided.