GPU: finish pending texture checks before a host callback #1314
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/fxceless--victory-fork!1314
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1314"
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?
@Cuebert on GitHub · 2026-11-26 13:54 UTC · original
Cuebert:codex/flush-first-texture-upload→main· +4 −0 · 1 files · 1 commits · openIn the optional parallel refresh path, checking a texture is deferred. The host callback that maps a reserved texture needs the mip mask that check publishes. On the first upload it can observe an empty mask and leave every mip unmapped.
Finish pending texture checks before executing the host callback. The existing ordering for title-written steps stays in place.
A synthetic four-mip upload on
ceb9e1freproduced the problem on WARP and a physical RTX 5090. With parallel refresh enabled, the first mask was zero and none of the 5,570,560 bytes matched. With the four-line fix, the first mask was0xfand all 5,570,560 bytes matched. Both serial controls also matched every byte. Each case used a fresh process. The same source hunk applies toa20809d. AI-assisted development and testing with Codex.@ArturoWolff on GitHub · 2026-11-26 15:37 UTC · original
Independent ordering qualification on RTX 4060 / Proton
Confirmed the ordering defect on receiving main
58de9bf4c367d4e27f6dd5da523ca2f68951bc77, then applied only Cuebert's four-line correction from this PR (cf3c7717823f146f27e290747ba4c9a89929c020, parenta20809de366186a5770cb9ff00019537fbcc9eda). The same host/texture source is present in the subsequently observed main93db653ada3ee0b94b2334243d7af81c3d12f27a; that newer revision was not built for this comparison.Both actual Windows-target
victory-gpudiagnostic test executables built successfully (x86_64-pc-windows-gnullvm, Rust 1.98.1, locked dependencies, profilediag). Each of the four processes started in its own matched prefix with empty private driver cache, under GE-Proton 11-14 / Wine 11.0 Staging, vkd3d-proton71cae091b06571e, physical NVIDIA RTX 4060 (8 GB), driver 620.73.04. KeptVICTORY_TEXTURE_GUARD=0in all arms to hold the ordinary hashing path fixed.The shared test-only fixture uses the real
HostList::run_deferredand two independent, fully committed 512 x 128 RGBA8 textures with four mips each. It queues both texture checks (including one duplicate), observes their actual completed-mip masks at the first and subsequent host-only callbacks, then independently checks texture contents after all preparation finishes. The callbacks only observe readiness. A second sequence exercises the existing title-write notification (Run) ordering.0xf / 0xf0xf / 0xf0x0 / 0x00xf / 0xf0xf / 0xf0xf / 0xf0xf / 0xf0xf / 0xfThe initial callback before any texture check still observes the empty masks in every arm; the subsequent callback agrees with the first relevant callback. Each parallel sequence really processed one batch containing both distinct textures. Once preparation finished, all arms had complete masks and all 64 independently fenced mip readbacks matched byte-for-byte (5,570,560 bytes across the four invocations). This last result is deliberately a fully prepared control, not a claim that the uncorrected first upload was correct. The only expected failing assertion concerns readiness at callback time; the physical readbacks are ordinary committed-resource copies performed afterward.
Both guarded scopes completed, with a 512 MiB external host-memory stop threshold, no OOM kills, no observed kernel GPU faults and no device loss. The results support the ordering fix as a correctness prerequisite for the optional parallel refresh path on this receiving tree. I did not exercise a reserved-resource tile mapping, run the title, measure frame rate, or verify any specific visual symptom here. The independent-consumer qualification on #115 covers a separate part of texture refresh correctness.
AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol Max).
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.