fix(gpu): defer view-first alias descriptor rewrite until copy finishes #623
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!623
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-623"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@chefulano on GitHub · 2026-12-05 20:22 UTC · original
chefulano:fix/alias-deferred-refresh→main· +126 −12 · 3 files · 1 commits · openIn #550, when a placed alias view is created before its first
texture::alias()copy (view-first order),copy_target()detaches the pooled copy ontoREPLACEDand immediately queues a descriptor slot rewrite for the nextmake_waiting(). That lets shaders sample the freshly allocated, uncopied target for up to one frame before the alias copy submission completes (flagged in #550 review by @Kal0s-design and @t-jonesy).This small follow-up defers the view-first descriptor rewrite until the alias copy submission finishes, mirroring
RESHOWN_AFTERindescriptor/host.rs(REPLACEDalready keeps the retired copy alive until then):REPLACED_TEXTURESwith anafter_submission: u64gate (queue_texture_replaced_after/take_replaced_textures_ready(finished)), keepingafter == 0immediate for existing callers whilemake_waiting()drains ready entries againsthost::submissions().1.copy_target_for_alias_deferred()and aPendingAliasRefreshRAII guard intexture::alias()so both copy paths deferqueue_texture_replaced_after(placed, start, true, host::submissions().0)vialist.defer_host(...), while any early return before recording the copy falls back to immediate refresh on drop so the detached copy is never stranded.descriptor::tests::queued_texture_replacements_defer_until_submission_finishes.Verification on
main(a5c6484):cargo xtask policy:368 files ok;policy::tests:7 passed, 0 failed;switches::documented_switches_are_read:1 passed, 0 failed.cargo check --locked --target x86_64-pc-windows-msvc -p victory-gpu -p victory --testsandcargo clippy --no-deps --locked --target x86_64-pc-windows-msvc -p victory-gpu -p victory --all-targets: 0 errors, 0 new warnings.descriptor::tests::queued_texture_replacements(2 passed, 0 failed).Created with Gemini 4 Neon in T3 Code.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.