sharpemu/tests
kuba 7ab6de1b93
[GPU] Cut per-draw command-worker cost in resource materialization and pixel input setup (#1039)
* [ShaderCompiler] Materialize directly for plans whose cached inputs never repeat

The materialization cache records every guest word a draw reads and keys
the result on the draw's user data. Most Silent Hill draws point their
user data at per-draw constants, so only 8% of lookups hit and every miss
still paid for recording the reads and storing an entry. A plan now
counts its lookups and hits; after 64 lookups with fewer than one hit in
eight it walks its resources directly and probes the cache again on every
64th draw. On the SH title menu the command worker's busy time per draw
fell from ~125 to ~111 us (cache hit rate of the remaining lookups 70%).

* [GPU] Scan a pixel program's interpolated attributes once per decoded program

Every draw scanned all instructions of its pixel program twice, once
through a LINQ chain with Distinct/Order/ToArray, to count interpolated
attributes and the vertex outputs they read. The sorted attribute set
is a property of the decoded program, so it is computed once and kept
beside it. Pixel input resolution on the SH menu dropped from ~14 us to
a few us per draw.
2026-10-07 10:48:57 +02:00
..
SharpEmu.Libs.Tests [GPU] Keep sampled depth attachments in one rendering scope (#1037) 2026-10-07 10:48:52 +02:00
SharpEmu.ShaderCompiler.Metal.Tests [SpirvTranslator] Shader fixes (#1019) 2026-10-04 01:17:02 +03:00
SharpEmu.ShaderCompiler.Tests [GPU] Cut per-draw command-worker cost in resource materialization and pixel input setup (#1039) 2026-10-07 10:48:57 +02:00
SharpEmu.SourceGenerators.Tests feat(hle): prefer loaded guest exports for selected registrations (#844) 2026-08-25 22:32:57 +02:00