Commit Graph

3 Commits

Author SHA1 Message Date
d8f2ac6f59 psocache_usersig: guard second open/mmap, validate --entry/limit/bounds, and reject empty path 2026-11-25 06:54:39 +01:00
5a3247c879 psocache_usersig: refuse --limit combined with --entry
(cherry picked from commit 6c3603e883)
2026-11-24 10:03:05 -05:00
16dc3fb7a0 Add a graphics user-signature describer
tools/psocache_usersig.py resolves a graphics PSO to the chunk records its
stage record names, decodes each 0x41 entry (kind, offset, key, count,
space/base/size) and each 0x42 slot word (SS, II, RR), and computes the
32-dword cost as constants + 2 tables and as constants + 1 table. --limit N
summarises the first N graphics PSOs, --entry N prints one, --json dumps the
same report. It reuses the cache parser from psocache_inspect and never
prints a hash.

docs/pso_cache.md maps the graphics records to descriptor tables, ranges and
32-bit constants with a confidence per claim, gives the measured fit numbers
and sketches how a CreateGraphicsPipelineState path would consume them.

tests/test_psocache_usersig.py builds a two-PSO cache that covers SRV, UAV,
CBV, Sampler, constants, a record that does not fit 32 dwords and extra
slots, and checks the summary, the entry listing, --limit, --json and the
error paths.
2026-11-23 05:43:31 +03:00