Every mapping change queued behind the GPU worker so it could not race a pending GPU read. During loading that worker is busy translating shaders, and Demon's Souls' reservations and batch maps waited seconds for a queue slot (23.6 s over 132 calls, up to 7.1 s each) while the change itself took about a millisecond. A change that only places memory where the GPU was never given anything - a kernel-chosen address, or a fixed range that is empty or reserved and overlaps no registered span - cannot race a GPU read and has nothing to unregister, so it now runs on the calling thread. Those paths also skip the unregister request for free and reserved ranges, which are never registered; waiting on the worker while holding the mapping lock that GPU reads take would deadlock, so reaching a registered span there throws instead. |
||
|---|---|---|
| .. | ||
| SharpEmu.Libs.Tests | ||
| SharpEmu.ShaderCompiler.Metal.Tests | ||
| SharpEmu.ShaderCompiler.Tests | ||
| SharpEmu.SourceGenerators.Tests | ||