Commit graph

99 commits

Author SHA1 Message Date
Henrik Rydgård
acad90a041 More work on the lua console 2025-03-27 14:26:48 +01:00
Henrik Rydgård
e5d00ce493 Fix startup on Android, oops
Forgot that we can't create android-compatible threads in global
constructors, for JNI reasons.
2025-03-27 01:58:53 +01:00
Henrik Rydgård
a3a7807aac Fix crash when taking screenshots on a thread
Forgot that we only enable android JNI on "I/O" threads.

Fixes #20139
2025-03-21 19:12:54 +01:00
Henrik Rydgård
b421c0791f Perform screenshot processing (including image encode) on background tasks 2025-03-20 20:48:51 +01:00
Henrik Rydgård
cb1df4056c Remove almost-empty files ThreadPools.cpp/h 2025-03-20 17:21:20 +01:00
oltolm
9566065455 make compile on mingw-w64 2025-01-11 01:25:27 +01:00
Henrik Rydgård
3743b5dea6 Add new minimal-overhead RunParallel function 2024-12-29 10:48:00 +01:00
Henrik Rydgård
080798b5dd Move out two more functions from Core.cpp. Clean up Windows includes 2024-12-08 12:12:02 +01:00
Henrik Rydgård
7cbb60fd22 Bypass the PSP file system when calculating the savedata size to avoid a lock 2024-11-29 14:43:13 +01:00
Henrik Rydgård
e01ca5b057
Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Henrik Rydgård
3802d4ee16 Try to resolve another race condition. Improve an assert. 2024-02-03 10:54:16 +01:00
Henrik Rydgård
ee62ffdb02 Audit our use of condition variables, fix some minor issues 2024-01-29 11:09:08 +01:00
Henrik Rydgård
622aeaab6d Hopefully robustify some logic in EmuScreen enough 2024-01-24 00:06:01 +01:00
Henrik Rydgård
c1a7235767 Fix another shutdown race condition in the Vulkan backend 2024-01-15 17:06:00 +01:00
Henrik Rydgård
f8927df9a6 Load savestate screenshots in the background 2023-12-13 12:07:23 +01:00
Henrik Rydgård
6a8f65b566 Some assert paranoia, remove unused "failed_" variable 2023-09-23 10:09:32 +02:00
Henrik Rydgård
f0f96750b1 After picking a task from the global queue, gotta break from the loop. 2023-03-15 22:31:24 +01:00
Henrik Rydgård
1cf4e83824 Show thread name in assert messagebox caption on Windows. Minor cleanup 2023-03-15 22:26:58 +01:00
Henrik Rydgård
e625727543 Fix debug symbols for ThreadContext by renaming it (was clashing with something else)
Also reorder the fields.
2023-03-15 12:06:32 +01:00
Henrik Rydgård
1860a73d58 Address feedback from previous PR 2023-03-12 23:15:09 +01:00
Unknown W. Brackets
c690b12669 ThreadManager: Use priority across global/thread. 2023-02-02 17:08:24 -08:00
Unknown W. Brackets
0971555e51 ThreadManager: Add simple priority queues.
This allows basic differentiation of priorities.
2023-02-02 17:08:24 -08:00
Unknown W. Brackets
88ba003f46 ThreadManager: Add a simple priority field.
Currently, not actually respected.
2023-02-02 17:08:24 -08:00
Henrik Rydgård
6b0903f566 Add facility to run tasks on dedicated threads using the ThreadManager interface.
Useful for things that should be run ASAP even if the threadpool is full,
at a small extra cost. (Not recommended for very small tasks).

Considering using this to resolve the deadlocks in #16802.
2023-01-31 11:07:40 +01:00
Unknown W. Brackets
3a6fa9b4ba ThreadManager: Don't allow reordering of queue.
Allowing a priority item is faster, but can cause confusion when you
expect things to run in the same sequence they're enqueued.
2023-01-14 16:35:01 -08:00
Henrik Rydgård
7672556e5c Better pipeline descriptions in shader viewer (shorter in overview, longer after click) 2023-01-09 11:22:35 +01:00
Henrik Rydgård
ab6fafb6eb Invert dependency to avoid compile issues 2023-01-05 08:38:53 +01:00
Henrik Rydgård
7e374c9324 Address feedback, more fixes 2023-01-05 08:38:53 +01:00
Henrik Rydgård
b56eef487c Strict mode checking - no way to forget detaching now.
And if we forget to attach, boom. Hopefully I caught all of them.
2023-01-05 08:38:52 +01:00
Henrik Rydgård
916404f0e4 Try to get a bit better at detaching threads that have used JNI from the VM. 2023-01-05 08:38:49 +01:00
Unknown W. Brackets
a800938604 Common: Fix worker thread names. 2022-12-10 10:40:32 -08:00
Johan Mattsson
2b1d57257a
Fix comparison 2022-12-03 15:28:22 +01:00
Henrik Rydgård
25547b5fe2 Make Mailbox handle null values. Fixes hang. 2022-11-08 00:21:08 +01:00
Henrik Rydgård
3393d47e92 Remove ill-formed asserts 2022-09-23 23:14:36 +02:00
Henrik Rydgård
e828df9f25 Split each renderpass/framebuffer into multiple "compatibility classes" (RenderPassType). 2022-09-08 00:32:03 +02:00
Henrik Rydgård
76bd2395bf Promise: Add SpawnEmpty (couldn't come up with a better name), fix bug with multiple waiters 2022-09-03 15:21:08 +02:00
Henrik Rydgård
c06cf8efaa Switch Vulkan pipelines to use promises for synchronization
Slightly more expensive I guess but shouldn't be much of a bottleneck.
2022-09-03 15:21:08 +02:00
Henrik Rydgård
ebe2d1b30f More buildfixing 2022-09-03 15:21:07 +02:00
Henrik Rydgård
210233ede0 Buildfix 2022-09-03 15:21:07 +02:00
Henrik Rydgård
e701037267 Buildfix 2022-09-03 15:21:07 +02:00
Henrik Rydgård
8775837c11 Work towards finding the leak 2022-09-03 15:21:07 +02:00
Henrik Rydgård
ec0586ba50 Use promises to hold shader modules, for later asyncification 2022-09-03 15:21:07 +02:00
Henrik Rydgård
8d8a553f5b Fix typo and optimize locking pattern in Event, make it the same as LimitedWaitable. 2022-04-15 18:30:21 +02:00
Unknown W. Brackets
81ace52f53 ThreadManager: Improve waitable destruction. 2022-04-09 09:27:26 -07:00
Henrik Rydgård
adfce57d9e Fix race condition in LimitedWaitable between Notify and Wait 2022-04-08 12:29:30 +02:00
Henrik Rydgård
bde54ccdc0 Fix misuses of cond.wait (should return true when you want to stop waiting!) 2022-04-08 12:28:45 +02:00
Henrik Rydgård
5b20ace502 OK, this does crash 2022-04-08 12:04:34 +02:00
Henrik Rydgård
b04e5925d2 Add a scheduling stress test to TestThreadManager.cpp.
Was hoping to find the cause of the issue I looked at in #15431
2022-04-08 11:41:50 +02:00
Unknown W. Brackets
ffbd9bbe98 Global: Fix some int/size_t conversion warnings. 2022-03-13 12:03:48 -07: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