- replay_cpu_bench: #3693 moved a draw's render targets and vertex buffers into Draw::views (D3D-391); the bench
builds a DrawViews block instead of writing the old inline arrays.
- xgameruntime_user_test links file_system.cpp, which now defines rt::fs::game_dir that xgameruntime.cpp calls.
- check_sparse_queue_family: a vkCreateInstance refused because the api_dump/validation layer is not installed is
the documented "layer absent" skip (77), not a failure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- replay_cpu_bench: Draw::vertex_buffers is a fixed array by input slot since D3D-289; set slots 0 and 1.
- test_shader_checks: TOTAL counts the standalone cs_fmt_d16_xyz / cs_heap_init dumps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every command's detail::Prepared carried a draw's fields (a copy of the
GraphicsPipeline, eight attachment slots, depth, vertex and index views),
456 of its 1288 bytes, and the whole entry is refilled for every command on
every ExecuteCommandLists. They move to detail::PreparedDraw in
PreparedList::draws, which Prepared::draw indexes; the pool is kept between
executions like the PreparedList itself and reset() keeps its vectors'
storage. The entry is now 856 bytes.
The draw keeps a pointer to the context's GraphicsPipeline instead of a
copy (a vector and a std::function per draw): VulkanQueue::execute holds
the resource lock from prepare through emit, which add/remove_pipeline
need exclusively, and unordered_map elements don't move. emit builds the
colour attachments in a std::array of D3D12's 8 instead of a vector per
draw, and to_attachment takes the attachment const, so the const_cast goes.
replay_cpu_bench --self-test prepares an indexed draw with depth, then a
draw without either in the same storage, and checks the second keeps
neither (fails without reset(), checked).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The frame's passes now record 16 draws each (three of four indexed),
into the colour and depth targets with two vertex streams, and the
per-kind table times a draw and an indexed draw on their own. The scene
has one graphics pipeline and a geometry arena behind buffer_at, as
VulkanContext provides them.
i7-14700K: a draw costs 487-500 ns (record 170-180 with 4 allocations,
prepare 213, emit 104-107 with 1 allocation), and the frame (37,888
commands) 548 ns per command, 20.8 ms per ExecuteCommandLists for the
layer alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
execute built a new std::vector<PreparedList> on every call, so every
command's detail::Prepared entry (1288 bytes on main now) was made in
fresh memory and freed again: replay_cpu_bench measures that at 274-292
ns per command on an i7-14700K, against 85 ns refilled in kept storage,
over half of the layer's whole CPU cost per command. The queue now keeps
the vector as a member (per queue, like its command buffers: one execute
at a time on a queue, as acquire() and submit() already assume) and
resizes it to the list count; prepare refills each list's entries in
place, where the per-entry vectors also keep their capacity.
replay_cpu_bench mirrors the change and reports both floors (entries in
kept storage and made fresh). Its frame goes from 425 to 194 ns per
command (a 21,504-command frame from 9.1 ms to 4.2 ms).
d3d12_vulkan_device_test executes {B, A}, then {B} alone, and checks
that only B ran the second time: with storage that only grows, a stale A
is replayed after B and the test fails (checked).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A benchmark of the D3D12 -> Vulkan replay's own CPU time: CommandList
recording, prepare and emit, with no-op Vulkan entry points that count
their calls and fake resource bindings, so no GPU, driver or game files
are involved. Bindings and image views are looked up the way
VulkanContext does (unordered_map, std::map view cache), and each
execution makes a new PreparedList, as VulkanQueue::execute does.
It reports, for every command kind on its own and for a frame mix
(barriers, whole-view and rectangle clears, buffer and texture copies,
a UAV clear, queries, predication), the median ns per command of each
phase, heap allocations per command and Vulkan calls per command, plus
the cost of just making and freeing the PreparedList entries.
--self-test (in ctest) checks that every kind and the frame record and
replay, and that the counts are the same on a second run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>