upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/coder.md
diff options
context:
space:
mode:
authorTheGeogeo <57634077+TheGeogeo@users.noreply.github.com>2026-11-30 05:12:23 +0100
committerTheGeogeo <57634077+TheGeogeo@users.noreply.github.com>2026-11-30 05:13:14 +0100
commitc78140d110d141d874076af301b6bf9a29816113 (patch)
treec70b946f3a4228923bbd4b6524d98123299eae5b /docs/coder.md
parent1d22590b9fb5c0f51a6a7c0405f1f136e0696c0d (diff)
d3d12: blocks of textures and staging buffers are made with their pool's lock released (D3D12-POOL-GROW-UNLOCKED)
A new 64 MiB block of textures (CreateHeap, MakeResident, the wait for its mapping) or of staging buffers was made inside the pool's mutex, and with blocks made ahead (LEONIDA_RIPE_BLOCKS) one is made each time one is begun. Meanwhile every pooled texture let go, every read of texture_room() (the residency policy and the once-a-second sweep) and every other texture or staging piece, even one with room in a block, waited for it. Pool::take_or_need now only finds a piece, or says a block is to be made first; take_unlocked makes it with the lock released and adds it. One block at a time is made for want of room: a thread that needs one while another is made waits for that one on a condvar, and the maker takes the first piece of its block before the others are woken. Blocks being made count toward the blocks made ahead. A block that failed is not asked for again for half a second, and a later failure never shortens that. texture_room() reads a block count kept beside the pool and takes no lock. A block is counted as made by the submissions begun when it is added, after its making. LEONIDA_POOL_GROW_UNLOCKED=0 keeps the old path, with the submissions begun asked for under the lock as before. With diagnostics, the memory line gives the blocks made and the time they took, and the waits for the pools' locks and for blocks being made.
Diffstat (limited to 'docs/coder.md')
0 files changed, 0 insertions, 0 deletions