Textures and buffers read through ResourceDescriptorHeap are never refreshed or transitioned #754
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from Marvisak/VIctory. Originally posted by Conrage on 2026-11-24T09:36:21Z.
Only resources a shader reads through a descriptor table get their contents brought up to date before a draw.
tables()keeps onlyu.root == RootType::Table(crates/victory-gpu/src/draw.rs:649), and only those entries reachreadable()(draw.rs:1105).readable()is the only draw-time caller oftexture::uploadandshadow.refresh. The only other upload path is copies (list.rs:449,list.rs:543).RootType::ResourceHeapkeeps what its host copy held when it was created (a texture) or when it was first used (a buffer), and it is never moved to a shader-resource state (see alsohost.rs:149andshadow.rs:13-16).Possible effect: if world shaders use bindless access, their textures read black and their buffers read stale data. This would fit the dark world in the README. I have not confirmed this in-game.
Suggestion: at submission, upload and transition the title-written resources named by the views in the bound heap. A first step could be a diagnostics counter of heap-indexed views never uploaded, to confirm the impact.
AI use: found and written with Claude from reading the code at
8e79c80; not run on hardware.Imported from Marvisak/VIctory. Originally posted by Conrage on 2026-11-24T09:52:28Z.
Already addressed by open PR #413 (materializes bindless
ResourceDescriptorHeapviews and refreshes them), with #185 covering buffer coherency for directly indexed SRVs. Closing in favour of those.