Unset, ScanHostVolumes returns no volume, so nothing is scanned or
exposed and the guest sees no USB storage, as on main. The test checks
that injected volumes are neither listed nor raised by a rescan with the
switch off, and turns it on for the device cases.
USAGE.md's performance overlay section now gives F10's cycle (off, page
1, page 2, off) and ANYPS5_OVERLAY=2, a table with one row per line of
page 2 that names each source and the system it comes from, and what the
page costs: the trace totals it turns on while it shows, and the checks
and counters that run while the overlay is hidden or on page 1.
ENVIRONMENT.md's ANYPS5_OVERLAY row lists page 2.
A depth plane and the color storage image that holds or receives its texels were copied image to buffer, then buffer to image. With VK_KHR_maintenance8, which the device already enables, vkCmdCopyImage copies the depth aspect directly to and from a single-component color format of its size (D32 with R32, D16 with R16), so those copies record one image copy and two barriers in place of the staging buffer round trip and three barriers. TakeStorage keeps its discard of the new depth surface before the copy. 24-bit depth, the stencil plane and every other format pair keep the buffer path, as does APS5_NO_DIRECT_DEPTH_COPY=1. The graphics Context now carries the maintenance8 flag. No performance claim is made.
Resolve the overlap with main's WindowLaneGuard and image-resource changes
by keeping both sides: DescriptorFault sits next to WindowLaneGuard in the
opcode list, metadata and side-effect switch, and its emitter next to
EmitWindowLaneGuard; optionalDescriptor is serialized after
remappedDepth1D; undefinedImageWords follows the new image helpers; the
descriptor web debt entry follows main's new entries.
The ImageResource field-count assertion is derived from the merged
structure (44 fields: main's 43 plus optionalDescriptor). sizeof
(ImageResource) stays 96 and sizeof(MemoryInfo) stays 80, so those
assertions are unchanged. The undefined-format test keeps its captured
regions in a variable, as MemoryRegionView no longer binds a temporary.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two runs of the same scene drift apart by more than many effects worth
measuring. APS5_AB=<seconds>:<switch>[+...] alternates phase A (switches
as the environment sets them) and phase B (the listed switches toggled)
at flip packets, under the GPU mutex after the draw pipeline drained,
and prints "[ab] phase A|B <k> begins/settled at present <n> (t <s> s)".
APS5_AB_START (a flip count, or <n>s) delays the first phase and
APS5_AB_SETTLE (default 2 s) marks when a phase's reports are clean.
Switches live in a registry (RuntimeSwitches) of relaxed atomics that
start as the environment sets them; APS5_NO_BARRIER_BATCH is the first,
since every elision it gates is decided per barrier. Any other name
fails the first flip. Without APS5_AB nothing changes.
AI-assisted: yes
The [gputime] line printed a draw's range key with the draw flag still set, so an ordinary variant id 0x2 appeared as 0x8000000000000002 next to [drawvariant] 0x2. A draw's key now comes from Recorder::DrawTimingKey and the line prints it through Recorder::TimingKeyLabel as "draw 0x2", the id [drawvariant] names.
The [drawvariant] line was only printed when a draw was recorded inline, so a queued draw's first-seen variant had a timing range with no address line. It is now printed before the draw is handed to the pipeline.
The APS5_PROFILE_GPU_DRAWS row states the label, the shared per-batch query cap and that draws using a recipe are not timed.
Opt-in with APS5_PROFILE_GPU_DRAWS=1 together with APS5_PROFILE_GPU=1: a [gputime] range around each recorded draw command keyed by the fragment program's variant id, and a [drawvariant] line naming the code address behind each variant id once.
Every shader source keeps up to 256 materialized results of
Recompile(request, capture) in its result memo, and as many patch
recipes in its masked memo, with no limit on their bytes. In Ghost of
Tsushima's opening the memos held about 500 MiB after 5 minutes and
kept growing, at a 13 % hit rate.
Each memo entry now counts the bytes its result's vectors keep (the
bindings' vectors included; the module is shared with the prepared
module cache), plus its patch recipe in the masked memo. A result held
by both tables counts once in each. Past a budget, 256 MiB unless
APS5_RESULT_MEMO_MB sets another (0 sets none), the least recently used
entries of both tables of all sources are dropped until three quarters
of the budget is left. The recency stamps come from one clock for all
sources and both tables so they compare across them. The profile line
also reports the trimmed and held entries and their MiB.
The trim takes its lock blocking and repeats, re-reading the bytes held,
until they are within the budget, so the insertion that pushed them
over has its trim run after any other; it stops when nothing is left to
drop.
SetResultMemoBudget and ResultMemoBytes let agc_shader_result_memo_budget
check that a memo over its budget keeps the most recently used results
and drops the oldest one, with the masked memo off. A one-shot hook
inside the trim (SetResultMemoTrimHook) lets
agc_shader_result_memo_budget_threads insert two results from other
threads after the trim has read the bytes held: the memo must still end
within its budget. agc_shader_result_memo_budget_masked, with the masked
memo on, checks that a first result counts its masked entry too and that
a trim empties the masked memo.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A traced run that ends without a crash or an abort never reports which
imports it called. With APS5_TRACE_CALLS_FILE set, the first traced import
starts a thread that rewrites that file every 10 seconds with every import
called so far, most called first.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The graphics pipeline store kept a fixed 1024 entries and the pipeline journal replayed at most
1024 records, and a replayed pipeline that found the store full was dropped. A title whose
working set is larger rebuilt the rest at the draw on every run, and evicted pipelines it kept
using were rebuilt again and again.
The bound now starts at 1024 and doubles up to 4096: a journal replay that does not fit grows it
instead of dropping the pipeline, and so does eviction churn (a ghost list of evicted keys, checked
every bound/32 evictions: more than half of them came back). It never shrinks during a run;
APS5_PIPELINE_STORE_ENTRIES still fixes it. The journal loads its last 4096 records by default
(APS5_PIPELINE_JOURNAL_ENTRIES). Resident pipelines are bounded by count, not bytes.
agc_driver_recorder_tests --benchmark-pipeline-store-memory [count] (opt-in, not registered)
builds count graphics pipelines with one fragment module each through CachedPipeline and prints
process private bytes and VK_EXT_memory_budget heap usage before and after: with the triangle
shaders about 59 KiB host and no device memory per pipeline on an RTX 4090, 100 KiB host and
8 KiB device-local on a UHD 770.
Tests: agc_pipeline_store_growth (fails on main), agc_pipeline_store_fixed_bound,
agc_pipeline_store_replay_growth (replays on one thread: the mock Vulkan is not thread-safe).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017SNUYRd7sRKZrMYpquAsnU
strtoull took the valid hex prefix of a token and ignored the rest, so a
malformed token such as "123garbage" selected program 0x123, and an
overflowing token was not detected. A token now has to be a whole 64-bit
hex number (with an optional 0x prefix); any other token is reported and
ignored. The test adds a list with a malformed token whose prefix is the
first program's address and an overflowing token.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
APS5_SKIP_SHADER_FILE names a file of hex program addresses (whitespace
separated, # starts a comment). Draws and dispatches that use a listed
program are dropped as with APS5_SKIP_SHADER. The file is re-read within
500 ms of a change, so passes can be switched off and on while the title
runs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>