Commit Graph

635 Commits

Author SHA1 Message Date
ParantezTech db05345cde [VideoOut] Unregister buffers after pending command streams
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:34 +03:00
ParantezTech 4a72655d17 [VideoOut] Close ports after pending command streams
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:34 +03:00
ParantezTech 2ce435b364 [Metal] Run state changes after pending command streams
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:34 +03:00
ParantezTech 018ab6a7b9 [VideoOut] Run state changes after pending command streams
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:34 +03:00
ParantezTech fef6800291 [GPU] Let backends run work after pending command streams
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:34 +03:00
ParantezTech 460bff2502 [VideoOut] Order relay work behind the presenter command stream
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:34 +03:00
ParantezTech 78902911e9 [GPU] Run relay work after accepted command streams
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:34 +03:00
ParantezTech 83e1ba5235 [GPU] Cancel pending control barriers when the command stream is discarded
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:34 +03:00
ParantezTech 837466cc03 [GPU] Cancel pending control barriers when the command stream fails
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:33 +03:00
ParantezTech a4e1e3125e [GPU] Queue control barriers behind accepted command streams
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:33 +03:00
ParantezTech 700e9bb684 [GPU] Number command stream submissions in admission order
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 17:47:33 +03:00
ParantezTech 3f8649449c [Tests] Cover DCC metadata adopted from a texture request
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 16:06:17 +03:00
ParantezTech 2295a55bd1 [GPU] Give images first found without metadata the DCC metadata of a texture request
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 16:06:17 +03:00
ParantezTech 5951a64b94 [Tests] Cover SDWA V_CMPX in the EXEC-full analysis 2026-10-06 15:45:55 +03:00
ParantezTech 4bd778fae5 [ShaderCompiler] Treat V_CMPX as an EXEC write in every encoding 2026-10-06 15:45:54 +03:00
ParantezTech 872d348587 [Tests] Cover stencil compression with and without HTile 2026-10-06 14:51:41 +03:00
ParantezTech 7218f7281e [GPU] Accept stencil targets with or without HTile backing 2026-10-06 14:51:41 +03:00
ParantezTech 4a417d8381 [Tests] Cover HTile-backed compressed stencil targets
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 14:42:11 +03:00
ParantezTech 46e7e7ea0f [GPU] Accept HTile-backed compressed stencil targets
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 14:42:11 +03:00
ParantezTech 9667375750 [Tests] Cover kernel sync, pthread stack bounds and NpWebApi2
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:55 +03:00
ParantezTech c6744d9b13 [Np] Add sceNpWebApi2PushEventRegisterCallback
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:49 +03:00
ParantezTech 0010bef600 [Np] Add sceNpWebApi2PushEventDeleteHandle
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:49 +03:00
ParantezTech d4e2d0587d [Np] Track WebApi2 user contexts and push filters
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:49 +03:00
ParantezTech bb7d613b69 [Kernel] Add _umtx_op wait and wake
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:49 +03:00
ParantezTech fbefcaeb34 [Kernel] Share the sync-on-address wait and wake cores
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:49 +03:00
ParantezTech 6d62f8599f [Kernel] Poll host sync waits in bounded slices
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:49 +03:00
ParantezTech 77532c6f79 [Kernel] Track deadlines and POSIX results on sync waiters
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:49 +03:00
ParantezTech 02644abf19 [Kernel] Keep every end-of-pipe interrupt event
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:49 +03:00
ParantezTech b833771dc8 [Kernel] Refresh pending user data when an event is re-added
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:49 +03:00
ParantezTech ef78f5d877 [Kernel] Block timed event queue waits in the guest scheduler
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:48 +03:00
ParantezTech 91a36b461d [Kernel] Remove every pending copy of a deleted event
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:48 +03:00
ParantezTech 5c71314661 [Kernel] Add scePthreadSemTimedwait
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:48 +03:00
ParantezTech 4d2b7035d9 [Kernel] Poll host semaphore waits and deliver guest exceptions
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:48 +03:00
ParantezTech 4c9464effa [Kernel] Route semaphore waits through one core
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:48 +03:00
ParantezTech d00e9ca5ca [Kernel] Accept zero-count semaphore signals
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:48 +03:00
ParantezTech f7ef80e544 [Kernel] Publish semaphore handles as 64-bit values
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:48 +03:00
ParantezTech 9cd139fdcb [Kernel] Report every guest thread's stack in pthread attributes
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:48 +03:00
ParantezTech b8a5155d17 [Kernel] Validate pthread stack bounds before reporting them
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:48 +03:00
ParantezTech 0b41146cd3 [Core] Report the mapped stack of each guest thread
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:47 +03:00
ParantezTech b521b0e104 [HLE] Let schedulers report guest thread stack bounds
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
2026-10-06 13:44:47 +03:00
Berk a17aaca533
Astro playroom shaders (#1030)
* [Vulkan] Enable shader clip and cull distances

* [Vulkan] Track shader clip distance support

* [ShaderCompiler] Add a clip distance support flag to compile requests

* [GPU] Expose host clip distance support to pipelines

* [GPU] Pass clip distance support to shader compilation

* [ShaderCompiler] Reserve a clip plane for position exports

* [ShaderCompiler] Cull primitives with a zero position

* [GPU] Bind vertex buffers with their guest descriptor sizes

* [GPU] Accept B10G11R11 float vertex attributes

* [GPU] Spill oversized image readbacks to a temporary buffer

* [GPU] Carry DCC metadata on compressed textures

* [GPU] Mark sampled DCC clears through the metadata fill path

* [Tests] Cover vertex descriptor bounds and oversized image readbacks

* [GPU] Revert binding vertex buffers with their guest descriptor sizes

* [GPU] Carry DCC metadata only on single-layer 2D textures

* [Tests] Cover DCC metadata on 2D, 3D and array textures
2026-10-06 01:32:13 +03:00
ParantezTech 83abe47b6e [readme] re-order 2026-10-05 16:29:03 +03:00
ParantezTech d6c4778218 [readme] added warning for not official sites, donations etc. 2026-10-05 16:27:41 +03:00
ParantezTech 5965b07c7b [Logging] Skip "tbb_thead" without LogThreadMode 2026-10-05 16:18:27 +03:00
ParantezTech 4a822aedb9 Merge branch 'main' of https://github.com/sharpemu/sharpemu 2026-10-05 15:36:18 +03:00
ParantezTech 22bbcb1415 [readme] update screenshot 2026-10-05 15:36:01 +03:00
T 9e99769ce5
[GPU] Report mip statistics for sampled textures so streamed textures reach full detail (#1029) 2026-10-05 14:39:40 +03:00
Berk 41a1912cd9
[SRT] Compile shader resource plans in the background (#1028)
Each shader resource plan is compiled once to a DynamicMethod that evaluates
its resource table graph with plan-local value slots instead of the
interpreter's hashed cache. ASTRO's PLAYROOM goes from about 20 to 60 fps.

Compilation runs on a low-priority "SRT compiler" thread; until a plan is
ready, the interpreter evaluates it, so a new shader no longer stalls the
render thread while its plan is JIT-compiled. A plan whose compilation fails
stays on the interpreter. SHARPEMU_SRT_NATIVE=0 turns the compiled path off;
it is also off when the runtime does not support dynamic code.
2026-10-05 01:19:33 +03:00
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
Berk 57e0da2150
Revert "[DeS] Fixes for page faults and stack bounds issues in the emulator a…" (#1022)
This reverts commit ec0198f2d0.
2026-10-04 05:57:24 +03:00