sharpemu/src/SharpEmu.Libs/VideoOut
Berk 0163750e7e
Page fixes (#1023)
* [DeS] Fixes for page faults and stack bounds issues in the emulator and audio fixes

* [ShaderPrewarm] Hold the game until the prewarm finishes and resume interrupted runs

The prewarm compiled thousands of compute pipelines on background threads
while the now faster boot ran beside it, so logos, Bink movies and the first
scenes raced the compile and dropped frames.

- Hold the guest at its first splash hide, GPU submission or CPU flip until
  the prewarm is decided and done; the render thread keeps presenting the
  splash. SHARPEMU_SHADER_PREWARM_WAIT=0 opts out.
- Stamp only the shader translators, the compiler type and the driver, so a
  Libs-only build no longer triggers a full prewarm.
- Record finished pipelines in shader-prewarm.progress so an interrupted
  prewarm resumes with the remaining ones.

* [AudioOut2] Block a blocking push only until a queue slot frees

A blocking sceAudioOut2ContextPush waited only when the host stream hit its
128 KiB cap, so a title rendering faster than real time kept about 680 ms
queued and every sound played that far behind (GTA V: queue=2 context,
queued_ms avg=678). The push now waits until the device holds the cushion
plus QueueDepth-1 grains, the level GetQueueLevel already reports as full;
the host cap stays as the limit for non-blocking bursts. GTA V now holds
about 41 ms with no underruns.

* [GPU] Run bounded modulo copies of plain words on the host

Demon's Souls copies its per-frame constant and descriptor tables with a
compute kernel (dst[i] = src[i % N] for i < count). Run on the GPU, the
destinations stay GPU-dirty, and every draw whose resource tables read them
waits for a readback: about 19% of the render thread in the title scene,
for values that never changed.

The kernel is now recognized by its instruction sequence. When both
descriptors are plain 32-bit words of the same format and neither range is
GPU-dirty or GPU image memory, the copy is written to guest memory through
the host DMA path and the dispatch is skipped; anything else still runs on
the GPU. SHARPEMU_HOST_BOUNDED_COPY=0 turns it off.

Title scene with profiling: 7.4-8.6 -> 11.8-15.9 fps.

* [Diagnostics] Summarize synchronized table reads and trace several writer addresses

SHARPEMU_TRACE_GPU_READS=1 now also reports, every five seconds, the guest
words resource planning read through a GPU synchronization: read count, how
often the value changed, and the first and last value. SHARPEMU_TRACE_WRITER_ADDRESS
accepts a comma-separated list.
2026-10-04 19:07:37 +03:00
..
BufferUploadProfile.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
FlipProgressTracker.cs Fix Vulkan presenter synchronization and frame handling issues (#747) 2026-08-03 00:36:33 +03:00
GuestBlendStateNormalizer.cs Vulkan: fix guest storage image and render-state handling (#332) 2026-07-18 02:54:52 +03:00
GuestImageUploadPayloadDiagnostics.cs A vplayer fix (#821) 2026-08-17 00:57:42 +03:00
HostDisplayCatalog.cs Sdl backend (#670) 2026-07-28 03:33:26 +03:00
HostVideoOptions.cs [VideoOut] Keep guests on SDR output under Auto HDR on macOS (#1020) 2026-10-04 05:39:24 +03:00
PerfOverlay.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
PerformanceOverlayState.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
PngSplashLoader.cs Fix PNG chunk CRC validation (#241) 2026-07-16 00:46:43 +03:00
RenderDocCapture.cs [GUI/CLI] Add option to disable Vulkan implicit layers (#900) 2026-09-23 16:08:19 +03:00
RenderPhaseProfile.cs Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
SdlHostWindow.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
SubmissionFlowProfile.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
VideoOutDisplayClock.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
VideoOutExports.FlipRequests.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
VideoOutExports.cs [Gpu] Expose HDR output support and handle PQ buffer attribute changes 2026-10-02 03:37:17 +03:00
VulkanHostBufferPool.cs fix(gta): restore wiped GTA foundation and gameplay path (PPSA04264) (#650) 2026-07-27 01:58:55 +03:00
VulkanPipelineCacheStorage.cs Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
VulkanStorageFeedbackTargetResolver.cs Fix for DS,Little Nightmares, Little Nightmares III and Astro Bot shader (#913) 2026-09-27 20:43:07 +03:00
VulkanVideoPresenter.CachedImages.cs Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
VulkanVideoPresenter.CommandStream.cs Page fixes (#1023) 2026-10-04 19:07:37 +03:00
VulkanVideoPresenter.Descriptors.cs Page fixes (#1023) 2026-10-04 19:07:37 +03:00
VulkanVideoPresenter.Device.Errors.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
VulkanVideoPresenter.Device.Setup.cs Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
VulkanVideoPresenter.Device.Teardown.cs Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
VulkanVideoPresenter.Draws.Recording.cs Fix for DS,Little Nightmares, Little Nightmares III and Astro Bot shader (#913) 2026-09-27 20:43:07 +03:00
VulkanVideoPresenter.GuestBuffers.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
VulkanVideoPresenter.GuestDraws.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
VulkanVideoPresenter.GuestSubmissions.cs Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
VulkanVideoPresenter.HostBuffers.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
VulkanVideoPresenter.HostMovie.cs Astrobot / Demon's soul performance improvement (#955) 2026-09-30 18:14:21 +03:00
VulkanVideoPresenter.PipelineCacheShards.cs Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
VulkanVideoPresenter.Pipelines.cs Page fixes (#1023) 2026-10-04 19:07:37 +03:00
VulkanVideoPresenter.Present.Frames.cs Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
VulkanVideoPresenter.Present.Hdr.cs Vk version update (#897) 2026-09-22 17:45:51 +03:00
VulkanVideoPresenter.Present.Images.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
VulkanVideoPresenter.Present.Overlay.cs Vk version update (#897) 2026-09-22 17:45:51 +03:00
VulkanVideoPresenter.Present.Swapchain.cs [Gpu] Expose HDR output support and handle PQ buffer attribute changes 2026-10-02 03:37:17 +03:00
VulkanVideoPresenter.Present.cs Page fixes (#1023) 2026-10-04 19:07:37 +03:00
VulkanVideoPresenter.RenderLoop.cs Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
VulkanVideoPresenter.Rendering.cs Page fixes (#1023) 2026-10-04 19:07:37 +03:00
VulkanVideoPresenter.Scheduler.cs Perf computed shaders (#1013) 2026-10-03 04:49:43 +03:00
VulkanVideoPresenter.ShaderPrewarm.cs Page fixes (#1023) 2026-10-04 19:07:37 +03:00
VulkanVideoPresenter.cs Fix for DS,Little Nightmares, Little Nightmares III and Astro Bot shader (#913) 2026-09-27 20:43:07 +03:00
WindowPollProfile.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
WindowsGpuUsage.cs Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00