upleb.uk

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

summaryrefslogtreecommitdiff
path: root/docs/d3d12_vulkan.md
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-26 17:42:43 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-26 17:42:43 -0500
commit83d9eee2bbf58d729b2e0feb31bb5ad0aa71473b (patch)
treef7887597cccff5d68d1ce024cd6eee02ef6dc391 /docs/d3d12_vulkan.md
parent134a1d17ff6ab53a5af77ed7e664282a4489a25f (diff)
parent9807c5ec2464f4960039b76d6a8f356743e6798a (diff)
Merge branch 'descriptor-refill' into slot-records-merged
The T# records, the room lists and the texture and room changes of descriptor-refill now live in the exact-range index of slot-records-index. src/console_heap_slot_records.h: a third index, by T# address (the exact range [address, address + 1)), of the same groups with a settled and a waiting list; a texture gone visits exactly the T#s recorded for its address, a texture added the waiting ones. The records waiting for room (V# halves refused a geometry copy, T#s refused for a full bindless array) are kept in a list per kind with each record's place, so a record leaves it in O(1) and room made visits only the records waiting for it. Interface as descriptor-refill has it (states, set_texture, base, textures, textures_waiting); device code, README rows and both sides' docs kept. 32 bytes a half. Tests: console_heap_slot_records_test, both sides' cases (60,010-slot release; 300,000 slots in 74 blocks, a 40-byte release looks at 3; 400 random rounds against a full re-resolution; a texture registered looks at the 10 of 60,015 waiting on its address; room changes touch only the records waiting for room); a copy that skips settled lists on a removal fails. Linux ctest 115/115. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/d3d12_vulkan.md')
-rw-r--r--docs/d3d12_vulkan.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md
index 685c9b393..9121ec0ad 100644
--- a/docs/d3d12_vulkan.md
+++ b/docs/d3d12_vulkan.md
@@ -2112,6 +2112,27 @@ The game can use D3D12 descriptors in three ways, and the layer must handle all
2112 of a buffer 10 of 60,010 slots name looks at those 10, that a 40-byte release among 300,000 slots packed into 74 2112 of a buffer 10 of 60,010 slots name looks at those 10, that a 40-byte release among 300,000 slots packed into 74
2113 blocks of 64 KiB looks at the 3 it overlaps, and compares the copy with a full re-resolution through random 2113 blocks of 64 KiB looks at the 3 it overlaps, and compares the copy with a full re-resolution through random
2114 writes, releases, additions and alias changes. 2114 writes, releases, additions and alias changes.
2115 A title-written T# has a record too, under the exact base address it names (`bind_title_image` looks textures up
2116 by that address, or by the other view of texture-pool memory): bound, or waiting for a texture there (no texture,
2117 or one whose type, samples, mips, layers, image or views do not fit the T#), or waiting for room in its bindless
2118 array. A texture registered, replaced or published at an address (`note_image_address`, a title texture's
2119 placement, a streamed texture's image), or gone from it (`forget_image`, a placement removed), goes on the same
2120 list, and the next submission fixes again exactly the T#s naming that address; freed bindless entries fix the
2121 T#s waiting for room. Nothing looks at a waiting T# otherwise: before, a round robin tried the waiting slots again
2122 for 500 µs a submission (`LEONIDA_CONSOLE_RETRY_US`), which in world runs took tens of submissions to come round
2123 and counted every look as a T# "naming no texture" again. A texture that goes takes its T#s out of the descriptor
2124 hash table at once (`forget_image_views_locked`), so a shader reading the slot gets the fallback; the slot then
2125 waits for the next texture at the address, which a texture streamed out and back in needs. A V# half whose
2126 geometry copy was refused for lack of room waits for room the same way: the slots are fixed again when geometry
2127 copies are freed (`GeometryViews::free_generation`), not only when something is added over their base.
2128 A T# with no texture at its address is counted by what the address is (`unbound T#s by reason` in the heap's log
2129 line): title memory, a texture of the layer's own that is gone, an address whose low 32 bits are one of the
2130 layer's texture addresses with other high bits (the texture there with the T#'s shape, with another, or gone),
2131 or none of these. The heap's `slot records` line gives the T#s recorded, those waiting, the T# fixes that left
2132 one waiting and the refills since the last line. `d3d12_tsharp_refill_test` samples, through the last of 60,001
2133 waiting slots, a texture made after the T# was written, at the first submission after it appears. T#s are a third
2134 index of the same kind, keyed by their address: a texture change visits exactly the T#s recorded for that address,
2135 and the records waiting for room are kept in a list per kind, which a change saying room was made visits whole.
2115 Console resource heap copies and shader-visible CBV/SRV/UAV heaps with at least 65,536 slots request 2136 Console resource heap copies and shader-visible CBV/SRV/UAV heaps with at least 65,536 slots request
2116 64 MiB of zeroed padding after their last descriptor. `LEONIDA_HEAP_GUARD_MB` sets the padding in MiB 2137 64 MiB of zeroed padding after their last descriptor. `LEONIDA_HEAP_GUARD_MB` sets the padding in MiB
2117 (0 disables it). When arena space is tight, allocation can fall back to the heap alone. Only indices 2138 (0 disables it). When arena space is tight, allocation can fall back to the heap alone. Only indices