Textures and buffers read through ResourceDescriptorHeap are never refreshed or transitioned #754

Closed
opened 2026-11-26 04:13:55 +00:00 by github-bot · 1 comment
Owner

@⁠Conrage on GitHub · 2026-11-24 09:36 UTC · original

Only resources a shader reads through a descriptor table get their contents brought up to date before a draw.

  • tables() keeps only u.root == RootType::Table (crates/victory-gpu/src/draw.rs:649), and only those entries reach readable() (draw.rs:1105).
  • readable() is the only draw-time caller of texture::upload and shadow.refresh. The only other upload path is copies (list.rs:449, list.rs:543).
  • So a resource reached through RootType::ResourceHeap keeps 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 also host.rs:149 and shadow.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.

**@⁠Conrage** on GitHub · 2026-11-24 09:36 UTC · [original](https://github.com/Marvisak/VIctory/issues/754) Only resources a shader reads through a descriptor **table** get their contents brought up to date before a draw. - `tables()` keeps only `u.root == RootType::Table` (`crates/victory-gpu/src/draw.rs:649`), and only those entries reach `readable()` (`draw.rs:1105`). - `readable()` is the only draw-time caller of `texture::upload` and `shadow.refresh`. The only other upload path is copies (`list.rs:449`, `list.rs:543`). - So a resource reached through `RootType::ResourceHeap` keeps 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 also `host.rs:149` and `shadow.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._
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:55 +00:00
Author
Owner

@⁠Conrage on GitHub · 2026-11-24 09:52 UTC · original

Already addressed by open PR #413 (materializes bindless ResourceDescriptorHeap views and refreshes them), with #185 covering buffer coherency for directly indexed SRVs. Closing in favour of those.

**@⁠Conrage** on GitHub · 2026-11-24 09:52 UTC · [original](https://github.com/Marvisak/VIctory/issues/754#issuecomment-7128006476) Already addressed by open PR #413 (materializes bindless `ResourceDescriptorHeap` views and refreshes them), with #185 covering buffer coherency for directly indexed SRVs. Closing in favour of those.
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#754
No description provided.