Commit Graph
31 Commits
Author SHA1 Message Date
libretroadmin f1208a7a5a Make threading lock-free
The core and the headless tools no longer use mutexes, condition variables,
spinlocks, std::atomic, std::thread or volatile flags. Threads hand off through
libretro-common's retro_atomic and rthreads plus a few small pieces on top of
them in Common/Thread: Thread, MpscQueue, EventCounter, ParkingLot waits and
ReaderGate. Every wait blocks until it's woken; nothing polls on a timer.

State that only one thread touches just loses its lock. The PSP filesystem,
sceIo and the savedata dialog now belong to the emulation thread: async reads
and writes run when they're queued and complete later in emulated time, and
the IO and savedata threads are gone. The friend finder only talks to the
adhoc server and hands what it gets to the emulation thread. GPU init always
runs on the thread that starts the game.

The Vulkan render and compile queues, pipeline and render pass caches, delete
list and SPIR-V cache, the GL render queue, the software renderer's jit caches,
the file loader caches, the web debugger, UPnP, input, savestates, logging and
the GE debugger all hand off through queues and atomics. The IR jit's spinning
profiler thread goes.

A CPU thread with nothing to run now sleeps until work is queued instead of
spinning. Headless with --debugger waits for a client while stopped, and ends
the run once every client that connected has left. Web server shutdown keeps
servicing the CPU queue until the server has finished.
2026-10-09 04:56:16 +02:00
Henrik RydgårdandClaude Opus 5.5 7e553b0732 GE debugger: Lock when adding command breakpoints
Debuggers add them from their own threads, racing ClearTempBreakpoints
on the emu thread.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 13:17:00 -06:00
Henrik Rydgård a317890c08 Remove the GPUDebugInterface class
Just a pointless extra layer in the class hiearchy, making it
unnecessarily hard to modify the interface.

Might as well hit GPUCommon directly.
2026-06-02 11:15:08 +02:00
Herman Semenoff 400d136f51 GPU: modernize use C++17 constexpr for precalculate compilation 2026-05-19 21:57:45 +03:00
Henrik Rydgård 95cf9c2e28 Just some constification 2025-03-03 13:59:42 +01:00
Henrik Rydgård 4223bcfae1 Move the ownership of GPU breakpoints to GPUCommon 2024-12-15 12:51:37 +01:00
Henrik Rydgård 7b3687d79c Replace a fiddly callback with a global bool (which later won't be global) 2024-12-15 10:49:49 +01:00
Unknown W. Brackets 3b03c1ca85 GE Debugger: Make step tex jump to first prim. 2023-07-16 11:34:51 -07:00
Henrik Rydgård ed3cd1dc26 Merge pull request #16150 from unknownbrackets/vram-mirrors
GPU: Mask away unused bits in framebuf/zbuf ptr, cleanup
2022-10-03 11:56:24 +02:00
Unknown W. Brackets 4a17ab8070 GE Debugger: Correct mask in target breakpoints. 2022-10-02 20:47:12 -07:00
lainon 3cdf72b68b Better readability and optimization insertion into container by replacing 'insert' -> 'emplace', 'push_back' -> 'emplace_back' 2022-09-30 12:35:28 +03:00
Unknown W. Brackets 55c70332a1 GE Debugger: Eval breakpoints as if register set. 2022-09-11 11:05:30 -07:00
Unknown W. Brackets 100cbec620 GE Debugger: Fix crash on bp before list running. 2022-09-10 19:45:08 -07:00
Unknown W. Brackets f14e49a373 GE Debugger: Add conditions to cmd breakpoints. 2022-09-05 17:33:54 -07:00
Unknown W. Brackets 0b30b723bb GE Debugger: Add address breakpoint conditions. 2022-09-05 17:33:54 -07:00
Unknown W. Brackets da4206b078 GE Debugger: Skip overhead without breakpoints.
In the common case that there's no breakpoints, we can skip most of the
checks and a call.
2022-02-07 23:54:18 -08:00
Unknown W. Brackets 2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Henrik Rydgård 3162f30158 Merge base/basictypes.h into Common/Common.h (mostly). 2020-09-29 15:51:51 +02:00
Henrik Rydgård 809fd6b8fa Small perf optimization in debug mode (surprisingly expensive to do a vector lookup here). 2020-07-24 00:05:36 +02:00
Unknown W. Brackets a37a8ca4f0 GPU: Add quick method for debugging.
Helps when you want to bail out to the debugger quickly.
2017-12-24 18:05:44 -08:00
Henrik Rydgard 26a2d42731 Big mutex overhaul - remove our custom ones, make them non-recursive where possible 2017-02-28 11:40:29 +01:00
Unknown W. Brackets 2cfe80ccc0 Add a basic context menu to the state list.
This allows us to toggle breakpoints on specific commands.
2016-05-21 18:32:15 -07:00
Unknown W. Brackets 916c53c859 Add render target breakpoints to GE debugger.
Including z buffer as well, hope it's not confusing.
2016-05-21 17:55:45 -07:00
Unknown W. Brackets 69756733eb Add another GE cmd for skip tex in debugger. 2015-02-21 18:09:53 -08:00
Unknown W. Brackets 673f264ef4 Add a couple more texture-related break cmds.
These prevent it from breaking too early so the preview is more likely to
be complete and viewable.
2014-05-13 22:38:53 -07:00
Unknown W. Brackets 72a2ff83ba Break on a changed texture only if enabled. 2013-10-12 10:03:31 -07:00
Unknown W. Brackets d79a9bff6d Add a simpler break on next texture. 2013-10-12 10:03:30 -07:00
Unknown W. Brackets 2584d0e67f Use a more foolproof texture breaking method. 2013-10-12 10:03:30 -07:00
Unknown W. Brackets 3ac5198b89 Migrate texture breakpoints as well. 2013-10-12 10:03:29 -07:00
Unknown W. Brackets 4b8ace8a10 Small optimization to make breakpoint checks fast. 2013-10-12 10:03:29 -07:00
Unknown W. Brackets c8d2c45590 Move GE debugger breakpoints out of Windows/ code. 2013-10-12 10:03:28 -07:00