Repository navigation
Conversation
|
Tested 113d292 on Windows 11, RTX 5080 (driver 616.92) and AMD Radeon iGPU gfx1036 (driver 26.10.1):
AI-assisted. |
|
Tested 113d292 (merged onto main 1628210) on NVIDIA GeForce RTX 4060 Ti, driver 610.88 (32.0.16.1088), Windows 11 26200, MSVC 14.51.36231 (VS 2026), Vulkan SDK 1.4.363.0: pass
AI-assisted (Claude). |
113d292 to
19353e1
Compare
|
Rebased onto #2928's rebase on D3D-252's new statistics planner only runs for overlapping queries. The self-test's allocation check still passes for every kind on the rebased head. Tested 19353e1: RTX 5070, driver 621.01, Windows 11, MSVC 14.44, with
All three are at 0 allocations, down from 0.5–1 per command. Most of the time drop comes from #2928's smaller entry, which AI-assisted (Claude Code). |
Copies, resolves and atomic copies keep their source, regions, depth24/rgb96 conversion and staging in detail::PreparedCopy, in PreparedList::copies, indexed by Prepared::copy, the way ItsNotRexed#2123 moved the draws' data. An ExecuteIndirect's count buffer uses the same slot. Each PreparedCopy is kept between executions and reset() keeps its vectors' storage. detail::Prepared: 872 -> 392 bytes (MSVC 14.44, measured with sizeof). replay_cpu_bench --self-test checks that a buffer copy prepared where a texture upload was before keeps none of its regions. AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QueryReplay::pending_ took one map node per query a submission begins or ends (one allocation per timestamp, one per occlusion Begin/End pair). A QueryReplay lives for one submission and never erases, so its nodes now come from a monotonic arena that grows in a few blocks. PreparedList::queries is refilled from empty on every execution, which made each ResolveQueryData's resolve runs again. Their emptied storage now waits in PreparedList::spare_resolves for the next execution's resolves. replay_cpu_bench --self-test fails a kind whose list takes more than one allocation (the arena's first block) to prepare. AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19353e1 to
2446c4a
Compare
|
Rebased onto #2928's rebase on AI-assisted (Claude Code). |
|
Tested |
Depends on: #2928 (this branch carries its commit; the last commit is this PR's own). Claim: #2891 (comment)
Before this PR, query commands were the only ones in
replay_cpu_benchthat allocated while being prepared: 1 per timestamp, 1 perResolveQueryData, and 1 per occlusion Begin/End pair. There were two causes:QueryReplay::pending_made onestd::mapnode per query a submission begins or ends. AQueryReplaylives for one submission andpending_never erases, so its nodes now come from astd::pmr::monotonic_buffer_resource. That takes a few blocks per submission (4 KiB first, then growing) instead of one allocation per query, and none when the lists have no queries.QueryReplayis now non-copyable, since the map points into its arena.prepare()refillsPreparedList::queriesfrom empty, so eachResolveQueryData'sresolvesvector was made again on every execution. Before the clear, the emptied vectors now go intoPreparedList::spare_resolves, and the next resolves take them from there.Numbers
replay_cpu_bench --reps 25, i7-14700K, base 8e1fae6 (#2928's head) → this branch:The frame has few queries, so its time doesn't move beyond run-to-run noise on this machine. Preparing it now allocates nothing.
Tests
Tested 113d292 on an RTX 5070, driver 621.01, Windows 11, MSVC 14.44, Vulkan SDK 1.4.363, with
LEONIDA_VK_VALIDATION=1:ctest -E loader: 117/117 passed.d3d12_vulkan_device_test: exit 0, 0 validation messages.replay_cpu_bench --self-test: ok. It now fails any kind whose list takes more than one allocation to prepare (the arena's first block).vulkan_replay.h(8e1fae6) fails as expected:AI-assisted (Claude Code).
🤖 Generated with Claude Code