Repository navigation
Conversation
|
Recommendation: [MERGE] Reasoning: Bindless descriptor-table uploads memcpy the occupied slot range directly into staging instead of writing each slot in fragments. New static_asserts pin the trivially-copyable 40-byte layout the copy relies on, the Impact level: 3/10 |
270aaeb to
2fd49df
Compare
…#1904, #1196, #1932, #1957, suballoc 4 MiB) Self-contained standalone header optimizations & hardening (GPL-3.0, zero RVAs, zero game data, zero non-trivial thread_local): 1. BufferVaIndex (ubiquitarianism/leonida#1904, IlyassRS3, GPL-3.0): Replace std::map + std::multiset with an O(log N) augmented AVL interval tree (per-subtree max_end_inc & max_size, O(1) upper-bound miss reject, single-node allocation, zero-alloc in-place updates, overflow-safe near UINT64_MAX lookups, covers()). 2. DescriptorTable (ubiquitarianism/leonida#1196, Kadamitas, GPL-3.0): Static-assert DescriptorEntry layout and use contiguous memcpy in write_to_buffer() / build_gpu_buffer() / read_slots() for faster WC staging. 3. VulkanSlabAllocator (runtime/src/vulkan_suballoc.h): Raise kDefaultSlabBytes (16 -> 32 MiB) and kDefaultMaxSuballocBytes (512 KiB -> 4 MiB) to suballocate 1024x1024 and 2048x2048 BC7 textures, and add lock-free per-memory-type empty-slab reclamation capping idle slabs at 1 per memory type (vkFreeMemory outside pool mutex). 4. GraphicsShaderModules (ubiquitarianism/leonida#1932, IlyassRS3, GPL-3.0): Switch to std::shared_mutex read fast path, destroy losing duplicate VkShaderModules outside the cache lock, enforce cross-device isolation, add null/VK_NULL_HANDLE guards and bucket pruning, and add CTest vulkan_graphics_shader_modules. 5. MemoryWaitHolds (ubiquitarianism/leonida#1957, IlyassRS3, GPL-3.0): Add work-aware timeout clock (MemoryWaitTimeoutClock, hold_with_budget), cycle-safe overwrite/alias-aware producer dependency analysis, and address/ timestamp/override anti-wrap hardening while preserving all Wave 2/8 behavior. Verified: Ninja + sccache + /Z7 build of gta6rt + all 5 test targets (0 warnings); CTest 5/5 passed with LEONIDA_VK_VALIDATION=1; check_no_game_data.py 0 violations.
(cherry picked from commit f9347a7)
2fd49df to
72ff4ab
Compare
Claimed in the coordination issue as bulk-copy occupied descriptor staging slots.
What and why
Full bindless table uploads currently write every slot in small fragments, even though the descriptor and value records are already laid out in upload order. Bulk-copy full tables and consecutive slot ranges. Full vector and pointer uploads share the serializer. Removing the occupied marker preserves the descriptor kind, and the layout and tombstone values are preserved.
Tested
descriptor_table_testpassed on Windows after the Nov 27 rebase, including partial range reads and the kind-preserving marker path.GPUs tested: N/A. The benchmark used native Windows write-combined host pages.
AI-assisted: yes.
Checklist
main(43a9d562d).