Repository navigation
GPU: refresh a texture alias after its source is written again - #2341
andrewpozdnakov7-jpg wants to merge 1 commit into
Conversation
Cache an alias by the source texture and its last write in the command list. A write-capable use invalidates that record even after another read changes the source state. Exercise both GPU writes and read the placed alias twice in a single WARP submission.
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:
- Refreshing a texture alias when its source is written again in the same command list cleanly prevents stale placed reads after subsequent GPU writes.
cargo test -p victory-gpu resource::tests: 11/11 passed on RTX 5090, 11/11 passed on WARP (including live GPU testa_second_gpu_write_reaches_the_placed_alias_in_the_same_list).cargo test -p victory-gpu texture::tests: 2/2 passed.cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.
AI-assisted (Gemini 4 Neon).
|
I tested this change together with #2314 at Combined branch and test If the code or tests are folded into another commit, please add: Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com AI-assisted. Synthetic tests only. |
A placed texture alias was copied once per command list. If the source was written again in that list, the next read through the alias could still see the first write.
Track the source host texture and its write version at the time of the alias copy. A write-capable use invalidates the relevant record. A later read can reuse the alias when it still holds that source version.
The synthetic WARP fixture records two GPU writes to an R32G32_UINT source and reads its placed BC1 alias after each write in the same list. A direct source read between the second write and alias copy confirms the write landed.
940d32f0x07e00xf800, red0xf8004297bb90x07e00xf800, green0x07e0Full forced-WARP GPU library suite passed (147 passed, 2 ignored). Strict GPU Clippy passed in both feature modes. Repository policy passed.
Coordination claim
Please preserve the Git author if you cherry-pick the change. If you fold the code or regression into another commit, please add:
Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com
AI-assisted. Synthetic tests only.