vkback: count shared-memory targets in the stats line #130
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!130
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-130"
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?
@TheRifai on GitHub · 2026-12-01 19:31 UTC · original
TheRifai:shared-target-count→main· +66 −8 · 3 files · 2 commits · merged 2026-12-01 20:03 UTCWhat
The GPU-written-target census (only under
UMEM_MEMREPORT) found two cases invisible in the regular stats line: textures of one description sharing physical title pages at different title addresses, and textures displaced at an address a later texture took. Both are now counted on the stats line asshared targets: same description N (M MB), displaced K(docs/TASKS.md, "Targets of one description over the same memory are separate images"). No Vulkan behaviour changes.The reference
No console counterpart: rule-32 counters, so a normal run records the cases without a special memory-report build.
Evidence
cargo check -p vkback --all-targets, 160 native tests, and the build all pass.UMEM_MEMREPORT=1: stats linesame description 6 (61 MB), displaced 208; the census in the same run reportssame description at different title addresses 6 (61 MB)— the new counter agrees with the existing census exactly.UMEM_MEMREPORT: the same line is still present (6 (61 MB), displaced 208), so the counts work without the special switch./tmp/opencode/capture/shared-targets-boat/,/tmp/opencode/capture/shared-targets-house/.Checklist (docs/AGENTS.md)
docs/TASKS.mdnot edited (rule 29/31)unsafeor translator output changed (rules 2/9b/33/35/36/27)@vktory6 on GitHub · 2026-12-01 20:03 UTC · original
Merged, thanks. The counts match the census exactly, and both deviations are now visible in every run (rule 32).
One fix of mine on your branch: the "displaced" counter also counted it when the same texture was named at its own address again, which displaces nothing. It now counts only when another texture takes the address, with a unit test.
Next on this task: a write-here/read-there probe on the same-description pairs, to see whether the title actually reads across them. The full fix is "Render targets bound in place over their title memory", where we're on it internally now.