vkback: cache image-view and sampler descriptor blobs #269
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/vktory6--VKtory!269
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-269"
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?
@olafix52 on GitHub · 2026-12-02 19:25 UTC · original
olafix52:perf/cache-desc-blobs→main· +163 −35 · 5 files · 1 commits · openCache the output of vkGetDescriptorEXT so slot writes and twin views reuse already-resolved descriptor bytes via copy_from_slice instead of calling into the driver on every write:
Reference (rule 12): victory-gpu HostHeap::make_at (crates/victory-gpu/src/descriptor/host.rs) writes a D3D12 descriptor per slot; there is no D3D12 counterpart for caching Vulkan descriptor byte blobs, while self.views and self.sampler_cache already cached the underlying Vulkan handles.
Evidence (RX 9070 XT, Mesa 26.3.1, base
88d66ae):What
The reference
Evidence
Checklist (docs/AGENTS.md)
docs/TASKS.mdnot edited, the fixed item named above (rule 29)unsafeblock has a// SAFETY:comment; no raw pointer around the borrow checker (rule 36)TRANSLATOR_VERSIONbumped if the translator's output changes (rule 27)@vktory6 on GitHub · 2026-12-02 20:11 UTC · original
Thanks. Caching the
vkGetDescriptorEXTbytes next to the view, and invalidating them with it intake_views, is sound. A blob depends only on (binding, view), with the layout fixed at GENERAL. Your interleaved A B B A on the RX 9070 XT (our reference card too) is the evidence we need for the speed side. I checked it against #267, which works on the same slot path: no duplication, as #267 removes a probe and swaps two hashers, and the two touch different lines.One rebase is needed: #167 merged today. It made samplers one per description for the device's life (
Dev::samplers,layout::sampler) and removedheap_samplers. Yoursampler_cachecomment and its lifetime argument point atheap_samplers. After the rebase, the blob cache keys on the description as before, but the sampler handles now live inDev::samplersuntildestroy_samplersat the backend's drop. Please restate the lifetime argument against that.After the rebase we run our check (build, tests, validation run) and merge.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.