Memory report: say how full the texture blocks are and how many queued textures wait for room #474
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/lobomfz--VIctory-xmem!474
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-474"
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?
@LOCKhart07 on GitHub · 2026-12-04 15:36 UTC · original
LOCKhart07:main-texture-report→main· +165 −3 · 3 files · 1 commits · openTaken out of the structure arena change of #306, where it rode along. It has nothing to do with ray tracing and stands here on main alone. Words in the log only: nothing is placed, kept or freed otherwise. No switch.
What it adds to the memory report
Measured
On one machine (
x86_64-pc-windows-msvc, tests under Wine on Linux, RADV):--lib --bins --tests): 51 warning lines, as on main.Not measured
🤖 Generated with Claude Code
@Kal0s-design on GitHub · 2026-12-04 17:09 UTC · original
Checked
58aa134on top of main and ran the tests natively on Windows (MSVC build, not Wine) on an NVIDIA card.poolfilter: 12 passed, both new tests among themdescriptor::host: 34 passedpoolagain with--features diagnostics, so theGetCopyableFootprintspath gets built: builds clean, 12 passedThe blocks line looks right to me.
texture_blocks_report(pool.rs:670) takes the TEXTURES lock once, walks at most 64 blocks and lets go before formatting. The same report already takes that lock throughtexture_room()anddrains()(host.rs:8020, 8032), so the lock order doesn't change.outgoes down ingive(), so a resting piece drops out of its block's tenth, andfree()only counts ranges. The first new test checks both, and it would catch a wrong bucket or resting bytes being counted as free. Every block is BLOCK sized, soblocks * 64 MBholds, and.min(9)puts a full block in the last tenth. Outside diagnostics builds the creation path only adds one relaxedfetch_addof 0 per texture (pool.rs:1131).Two small things in the queue part, which has no test.
scan(descriptor/host.rs:1303-1309) walks all ofheldand looks each slot up inslotsunder the queue lock on everytexture_slots_wantedcall, which happens once per pass from draw.rs:3661. When the card is fullheldcan grow to hundreds or more. It's cheap, but it could be done at report time or kept as a running count inhold/room/wake.w.mapped == 0 && w.looks > 0also matches kind 2 inWaiting::kind(descriptor/host.rs:912-920,looks == 1 && checked.2 != 0, a recheck after a whole upload). Those slots aren't in{away}, which iskinds[3]. Any due slot can be held (draw.rs:4000), so "N of them among those waiting for their memory" can count slots that aren't in that number.w.kind() == 3would match the wording.Neither one blocks the PR.
AI-assisted: yes
@Luxuride on GitHub · 2026-12-04 17:15 UTC · original · edited 2026-12-04 17:21 UTC
The body already says "taken out of the structure arena change of #306", so the extraction is declared — no title change needed, and this reads as a clean, reviewable slice.
The other side of it is the queue: while #306 stays open carrying the same lines, the same hunks are proposed twice, and #306's rebase after this lands is manual. A line in #306 saying the arena report moved here, next time you touch it, is enough. Nothing to change in this PR.
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.