sharpemu/tests/SharpEmu.Libs.Tests
kuba 30321142cb
[GPU/Vk] Keep guest readbacks of GPU-written memory off the command worker (#1032)
* [Vk] Run async readbacks on a second general queue family when no dedicated one exists

The async readback queue was only taken from a family without graphics,
so drivers that expose several general families (each its own hardware
queue) kept every guest readback on the main queue and the command
worker. Any other family with transfer support now qualifies after the
dedicated transfer and compute families.

(cherry picked from commit 7b04d6185dfc1711f0fbdf5c75c842a065acd1fa)

* [GPU] Let guest reads of GPU-written memory wait on the main queue off the worker

A guest thread reading memory the GPU wrote hands the download to the
command worker, which recorded the copies, submitted and then waited for
the whole GPU before handing the bytes back - unless a dedicated readback
queue existed, where the download ran asynchronously and only the guest
thread waited. MoltenVK exposes one queue family in-process, so on macOS
every such read idled the worker for tens of milliseconds, several times
per frame in Silent Hill: The Short Message's menu (a quarter of the
worker's time).

Without a readback queue the worker now copies the pieces into a buffer
of their own, submits without waiting and returns a pending download
carrying the submission tick; the guest thread waits for that tick on the
timeline (safe from any thread) and completes the read back on the
worker, as the readback-queue path does. The worker's GPU wait time drops
to zero; SHARPEMU_MAIN_QUEUE_PENDING_READS=0 restores the synchronous
path.

(cherry picked from commit 6c9ad44bcea7f9396a7564621fcbda3841834052)

* [GPU] Re-issue a stale pending readback instead of reading synchronously on the worker

A guest read of GPU-written memory records a copy and waits for its tick
off the queue. When another GPU write lands first, the completion fell
back to a synchronous read on the command worker, which stalled it until
the GPU drained (up to half of SH's readbacks). The guest thread now
re-issues the pending read and waits again; only the fourth attempt falls
back to the synchronous read.

(cherry picked from commit 17bf5bb958ebfd4dd980dbf241cbe9e77fffd938)
2026-10-07 10:51:48 +02:00
..
Agc Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
Ampr Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
AppContent Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
Audio Page fixes (#1023) 2026-10-04 19:07:37 +03:00
AvPlayer Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
Cpu [Cpu] Copy page-sized guest memcpys on the managed path (#1055) 2026-10-07 10:48:00 +02:00
Fiber Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
Font [Font] Fix font face creation (#1010) 2026-10-03 05:04:56 +03:00
GUI [GUI] revision of default settings (#1009) 2026-10-02 02:51:50 +03:00
Gpu [GPU/Vk] Keep guest readbacks of GPU-written memory off the command worker (#1032) 2026-10-07 10:51:48 +02:00
HLE Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
Ime Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
Json Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
Kernel Unity fixes 1016p1 (#1043) 2026-10-06 18:43:21 +03:00
LibcInternal Add libc heap trace contract tests (#409) 2026-07-19 03:25:42 +03:00
Loader Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
Logging Reject undefined numeric LogLevel values (#390) 2026-07-18 15:47:19 +03:00
Media Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
Memory Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
Network Gran Turismo 7 Fixes, AvPlayer, Razor CPU stubs, Net stubs (#927) 2026-09-30 01:37:56 +03:00
Ngs2 Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
Np Unity fixes 1016p1 (#1043) 2026-10-06 18:43:21 +03:00
Pad Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
PlayGo [PlayGo] Reject authoritative unknown chunk loci (#242) 2026-07-16 19:22:33 +03:00
Pthread Unity fixes 1016p1 (#1043) 2026-10-06 18:43:21 +03:00
Random [HLE] Add RandomExports HLE (#413) 2026-07-18 23:44:57 +03:00
Remoteplay fix(gta): restore wiped GTA foundation and gameplay path (PPSA04264) (#650) 2026-07-27 01:58:55 +03:00
Rtc Fix sceRtcConvertLocalTimeToUtc failing on non-UTC hosts (#210) 2026-07-16 00:04:35 +03:00
SaveData Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
ShaderCompiler Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
SystemService [GUI/CLI] Add support for console settings and language selection (#907) 2026-09-26 00:17:25 +03:00
Tls [AGC/Vulkan] Extend PS5 runtime and rendering compatibility (#216) 2026-07-16 02:02:34 +03:00
VideoOut Astro playroom shaders (#1030) 2026-10-06 01:32:13 +03:00
AerolibCatalogTests.cs [SourceGenerators] Compile-time SysAbi export registry, analyzers, and build-generated aerolib.bin (#204) 2026-07-16 00:00:32 +03:00
AllocationMeasurement.cs Astrobot / Demon's soul performance improvement (#955) 2026-09-30 18:14:21 +03:00
FakeCpuMemory.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
LibcStdioExportsTests.cs Fix/gen5 shader resource handling (GTA 5) (#1015) 2026-10-03 04:00:32 +03:00
NativeExecutionRequirements.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
NativePageProtectionRequirements.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
SaveDataStorageTests.cs Sdl backend (#670) 2026-07-28 03:33:26 +03:00
SharpEmu.Libs.Tests.csproj Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
SysAbiRegistryTests.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00