Admiral H. Curtiss
948a548fb2
Merge pull request #11720 from Pokechu22/hookable-event-recursive-mutex
...
HookableEvent: Use std::recursive_mutex instead of std::mutex
2023-04-10 22:50:44 +02:00
Minty-Meeo
2bb619a508
Resolve [-Wstringop-overflow=]
2023-04-10 14:21:15 -05:00
Minty-Meeo
1cf30055b2
Resolve [-Wsign-compare]
2023-04-10 14:21:15 -05:00
Admiral H. Curtiss
23843583bf
PowerPC: Refactor to class, move to System.
2023-04-09 21:48:37 +02:00
TellowKrinkle
b9595a2230
CMake: Use find_package and imported targets for Iconv
...
Fixes us forgetting to add its include directories, which could result in linking to a dylib from MacPorts while using the system's header, and failing to link because they use different function names
2023-04-08 21:43:03 -05:00
Mai
aaedc2827d
Merge pull request #11735 from Pokechu22/cmake-no-spirv-cross-on-linux
...
CMake: Don't include SPIRV-Cross except on Windows and macOS
2023-04-06 23:11:14 -04:00
Mai
74da38916e
Merge pull request #11729 from AdmiralCurtiss/redundant-mov
...
Jit64: Fix possibly redundant MOV in ABI_CallFunctionPR().
2023-04-06 21:42:28 -04:00
Pokechu22
56fcc97f6d
CMake: Check `WIN32` instead of `CMAKE_SYSTEM_NAME STREQUAL Windows`
2023-04-06 18:37:45 -07:00
Pokechu22
b08d259d5c
Common: Relicense TypeUtils to CC0
...
I am the sole contributor (apart from e149ad4f0a
which only changed the license header).
2023-04-05 19:01:11 -07:00
Admiral H. Curtiss
2ac7b5a523
Jit64: Fix possibly redundant MOV in ABI_CallFunctionPR().
2023-04-05 20:00:37 +02:00
Pierre Bourdon
d8fabd37fb
Merge pull request #11417 from K0bin/vk-submit-thread-cleanup
...
VideoBackends:Vulkan: Clean up submission thread using WorkQueueThread
2023-04-04 22:02:39 +02:00
Pierre Bourdon
c71a4c2751
Merge pull request #11719 from AdmiralCurtiss/enet-update
...
Update ENet to 8ae0e85298fafdb20777b4eb4241218f52f775b0
2023-04-04 22:00:45 +02:00
LillyJadeKatrin
07d2f3d305
Added Initial Achievement Settings
...
Added AchievementSettings in Config with RA_INTEGRATION_ENABLED, RA_USERNAME, and RA_API_TOKEN. Includes code to load and store from Achievements.ini file in config folder.
2023-04-03 21:17:44 -04:00
Pokechu22
9e0755a598
HookableEvent: Use std::recursive_mutex instead of std::mutex
...
This fixes a crash when recording fifologs, as the mutex is acquired when BPWritten calls AfterFrameEvent::Trigger, but then acquired again when FifoRecorder::EndFrame calls m_end_of_frame_event.reset(). std::mutex does not allow calling lock() if the thread already owns the mutex, while std::recursive_mutex does allow this.
This is a regression from #11522 (which introduced the HookableEvent system).
2023-04-02 15:51:21 -07:00
Admiral H. Curtiss
1e1041f299
NetPlay: Limit ENet's MTU to 1392 as a workaround for dropped packets over VPN via WireGuard, see https://github.com/lsalzman/enet/issues/132
2023-04-02 17:23:10 +02:00
Admiral H. Curtiss
8dabd1a025
PowerPC/MMU: Refactor to class, move to System.
2023-03-28 03:47:51 +02:00
Admiral H. Curtiss
2edb69f89f
Merge pull request #11682 from lioncash/queue
...
Common: Move FixedSizeQueue into Common namespace
2023-03-24 12:55:10 +01:00
Shawn Hoffman
3961afdbb9
windows: temporarily hardcode VCToolsVersion to 14.34.31931.0
...
this should be reverted after next beta is built
see https://bugs.dolphin-emu.org/issues/13206
2023-03-22 10:42:32 -07:00
Lioncash
0f326c6067
Common: Move FixedSizeQueue into Common namespace
...
Gets this out of the global namespace.
2023-03-22 01:23:15 -04:00
Lioncash
0888c93d48
Common: Move FPU-related helpers into Common namespace
...
Makes these utilities' namespace consistent with the majority of the
Common library.
2023-03-21 10:58:13 -04:00
Robin Kertels
9d422d14d5
WorkQueueThread: Fix WaitForCompletion
2023-03-20 16:31:40 +01:00
Pokechu22
14a93d24e1
Common: Add constexpr Fill function
2023-03-16 18:36:25 -07:00
Mai
4281606838
Merge pull request #11641 from JosJuice/android-remove-old-config
...
Android: Remove support for the old config system
2023-03-14 15:48:04 -04:00
Admiral H. Curtiss
3006c23c85
Core/CPUThreadGuard: Fetch System from Guard.
2023-03-13 18:13:20 +01:00
JosJuice
53e7090f55
Migrate game INI profile setting to new config system
2023-03-11 17:51:58 +01:00
Scott Mansell
901f12c935
HookableEvents: Add [[nodiscard]] to Register
2023-03-06 00:12:26 +13:00
JosJuice
95ce41ac56
Merge pull request #11399 from JosJuice/jit-one-stack
...
Jit: Don't use a second stack
2023-03-03 22:27:16 +01:00
Minty-Meeo
bf079d6d3a
[[unlikely]] ASSERT
...
and other ASSERT usage changes
2023-03-02 19:54:15 -06:00
Admiral H. Curtiss
e2bd7d1d95
Common/FatFsUtil: Close temp file before deleting it on conversion failure.
2023-02-28 20:31:56 +01:00
Admiral H. Curtiss
435d8c39ee
Common/FatFsUtil: Add callback for cancelling SD card conversion.
2023-02-28 20:31:51 +01:00
JosJuice
86c1f6e1e7
Jit: Don't use a second stack
...
This second stack leads to JNI problems on Android, because ART fetches
the address and size of the original stack using pthread functions
(see GetThreadStack in art/runtime/thread.cc), and (presumably) treats
stack addresses outside of the original stack as invalid. (What I don't
understand is why some JNI operations on the CPU thread work fine
despite this but others don't.)
Instead of creating a second stack, let's borrow the approach ART uses:
Use pthread functions to find out the stack's address and size, then
install guard pages at an appropriate location. This lets us get rid
of a workaround we had in the MsgAlert function.
Because we're no longer choosing the stack size ourselves, I've made some
tweaks to where the put the guard pages. Previously we had a stack of
2 MiB and a safe zone of 512 KiB. We now accept stacks as small as 512 KiB
(used on macOS) and use a safe zone of 256 KiB. I feel like this should
be fine, but haven't done much testing beyond "it seems to work".
By the way, on Windows it was already the case that we didn't create
a second stack... But there was a bug in the implementation!
The code for protecting the stack has to run on the CPU thread, since
it's the CPU thread's stack we want to protect, but it was actually
running on EmuThread. This commit fixes that, since now this bug
matters on other operating systems too.
2023-02-28 20:29:46 +01:00
Admiral H. Curtiss
bdb19085c4
Common: Add utility function for case-insensitive string comparison.
2023-02-28 00:56:33 +01:00
Admiral H. Curtiss
a11b9d585f
Common/FileUtil: Remove obsolete CopyDir() function.
2023-02-26 23:17:10 +01:00
Admiral H. Curtiss
5367bf394c
Common/FileUtil: Add Move() function.
2023-02-26 23:17:09 +01:00
Admiral H. Curtiss
884917a6d5
Common/FileUtil: Use non-throwing overload of is_directory() in CreateDir() and CreateFullPath().
2023-02-24 20:32:19 +01:00
Admiral H. Curtiss
e479f92418
Common/FileUtil: Add CreateDirs() function as a wrapper around std::filesystem::create_directories().
2023-02-24 20:32:18 +01:00
Admiral H. Curtiss
616d57e7fc
Common/FileUtil: Add Copy() function as a wrapper around std::filesystem::copy().
2023-02-24 20:32:18 +01:00
Shawn Hoffman
2c2fb869a2
use std-provided randomness for JitArm64 unittests
...
decreases runtime significantly and lessens dependency on mbedtls
2023-02-22 12:55:12 -08:00
Admiral H. Curtiss
e52aa52a66
Common/FileUtil: Rename Copy() to CopyRegularFile().
...
This is to clarify that it can only copy files, not folders.
2023-02-22 11:43:58 +01:00
Markus Wick
b381df700c
Merge pull request #11577 from JosJuice/android-armeabi-v7a
...
Android: Fix armeabi-v7a build
2023-02-17 17:57:38 +01:00
JosJuice
90b676d368
Android: Fix armeabi-v7a build
...
This very much isn't a build configuration that we're going to ship,
but I want to be able to tell people that they can build it on their
own if they really want to see how terribly it performs :)
Just like before, you'll need to edit two lines in app/build.gradle to
define ENABLE_GENERIC=ON and actually enable armeabi-v7a if you want an
armeabi-v7a build. This commit just fixes some compilations errors that
crop up if you do so.
2023-02-17 16:58:24 +01:00
Pokechu22
8802f96b7e
Fix uninitialized variable warnings (C26495)
2023-02-15 19:18:39 -08:00
Admiral H. Curtiss
0758e00cfe
Common/FileUtil: Revert behavior of CreateFullPath().
...
This was accidentally changed in 7e6436db34
.
2023-02-15 02:21:50 +01:00
Admiral H. Curtiss
5f929d00eb
Merge pull request #11560 from phire/EventHook_construct_on_first_use
...
HookableEvent: Switch to construct on first use
2023-02-14 01:01:03 +01:00
Admiral H. Curtiss
8f91cb62e6
Merge pull request #11426 from shuffle2/stdfs
...
fileutil: use std::filesystem
2023-02-14 00:50:34 +01:00
Scott Mansell
05181f6b88
HookableEvent: Switch to construct on first use
...
A registration might happen during static initialization, which opens
us up to issues with ordering of static initialization.
2023-02-13 18:48:43 +13:00
JosJuice
7cecb28bdf
DolphinQt: Properly lock CPU before accessing emulated memory
...
This fixes a problem I was having where using frame advance with the
debugger open would frequently cause panic alerts about invalid addresses
due to the CPU thread changing MSR.DR while the host thread was trying
to access memory.
To aid in tracking down all the places where we weren't properly locking
the CPU, I've created a new type (in Core.h) that you have to pass as a
reference or pointer to functions that require running as the CPU thread.
2023-02-12 11:27:50 +01:00
Admiral H. Curtiss
2f6e7d497d
ENetUtil: Add check for valid socket in SendPacket().
2023-02-10 19:32:40 +01:00
JMC47
258151fe5a
Merge pull request #11523 from degasus/OGL_KHR_subgroup
...
VideoBackend/OGL: Prefer KHR_shader_subgroup over NV_shader_thread.
2023-02-10 04:47:20 -05:00
Pokechu22
49a84cbc4c
Resolve various "no previous declaration" warnings
2023-02-09 16:23:01 -08:00
Markus Wick
17d7b75a9b
Merge pull request #11544 from jmallach/spng
...
Allow building against system libspng
2023-02-09 14:47:58 +01:00
degasus
4b2aa948e6
VideoBackend/OGL: Prefer KHR_subgroup over NV_shader_thread.
...
While the NV extension is totally fine, the KHR extension should be able to support more hardware.
For NVIDIA, the hardware either supports both or neither, it just needs a driver from the last two years.
For AMD, the drivers from late 2022-12 seems to bring support for the KHR extension.
For Intel, the KHR is also supported for some years.
2023-02-09 13:27:02 +01:00
Scott Mansell
aaad0cd39f
Merge pull request #11539 from phire/improve_workqueuethread
...
Various WorkQueueThread improvements
2023-02-09 20:00:04 +13:00
Scott Mansell
ccf92a3e56
Merge pull request #11522 from phire/KillRendererWithFire
...
Kill Renderer (with phire)
2023-02-09 19:59:16 +13:00
Scott Mansell
59a4b026f6
Better documentation for HookableEvent.
2023-02-09 18:36:20 +13:00
Scott Mansell
8c8bd0e7ac
Rename to HookableEvent. Because naming conflict
2023-02-09 18:36:20 +13:00
Scott Mansell
60f2b5af7b
Apply suggestions from code review
...
Co-authored-by: Mai <mathew1800@gmail.com>
Co-authored-by: BhaaL <bhaalsen@gmail.com>
Co-authored-by: iwubcode <iwubcode@users.noreply.github.com>
2023-02-09 18:36:20 +13:00
Scott Mansell
43b6a49012
Apply suggestions from code review
...
Co-authored-by: Mai <mathew1800@gmail.com>
2023-02-09 18:36:20 +13:00
Scott Mansell
31cfe8250d
Lint fixes
2023-02-09 18:36:20 +13:00
Jordi Mallach
4d164fcb77
Allow building against system libspng
2023-02-06 13:30:46 +01:00
Scott Mansell
2ff155f742
Optimise cond_var predicate order
...
m_items.empty() is by far the most likely reason for a notification.
2023-02-05 17:20:00 +13:00
Scott Mansell
271ffde71d
Prevent WaitForCompletion shutdown deadlock.
...
Adjust shutdown order to prevent potential deadlocks
when one thread calls Shutdown, and another calls WaitForCompletion.
2023-02-05 17:17:16 +13:00
Scott Mansell
9c012b09b3
Address review feedback
2023-02-05 16:52:53 +13:00
Scott Mansell
7c4fcc30a3
WorkQueueThread: provide name and function at same time
2023-02-04 15:56:27 +13:00
Scott Mansell
6594532f10
WorkQueueThread: rework Cancel/Shutdown workflow
...
- Cancel doesn't shut down anymore.
Allowing it to be used multiple times thoughout the life of
the WorkQueue
- Remove Clear, so we only have Cancel semantics
- Add IsCancelling so work items can abort early if cancelling
- Replace m_cancelled and m_thread.joinable() guars with m_shutdown.
- Rename Flush to WaitForCompletion (As it's ambiguous if a function
called flush should be blocking or not)
- Add documentation
2023-02-04 14:58:12 +13:00
Scott Mansell
acdb0c5be1
WorkQueueThread: Implement thread name
...
Otherwise we will end up with a dozen threads named "WorkQueueThread"
2023-02-04 14:58:12 +13:00
Robin Kertels
94a0c50bf8
WorkQueueThread: Rework without Flags/Events
2023-02-04 14:31:16 +13:00
Robin Kertels
9affbfe683
WorkQueueThread: Implement proper Flush
...
and rename the existing Flush to FlushOne.
2023-02-04 14:31:16 +13:00
Robin Kertels
9badcc6eb8
WorkQueueThread: Add Push
2023-02-04 14:31:16 +13:00
Scott Mansell
512273a507
WorkQueueThread: Add flush capability
2023-02-04 14:31:16 +13:00
OatmealDome
7240290382
CommonPaths: Add Steam-specific user directory
2023-01-31 17:57:09 -05:00
OatmealDome
59a44bea50
CommonPaths: Split platform-specific definitions for user directories into two blocks
2023-01-31 17:57:09 -05:00
OatmealDome
af33d4f13f
CommonPaths: Split PORTABLE_USER_DIR into "portable" and "embedded" to accomodate macOS
2023-01-31 17:57:09 -05:00
OatmealDome
7f962a4146
UICommon: Use NORMAL_USER_DIR for Windows
2023-01-31 17:57:09 -05:00
OatmealDome
5e3d77adae
CommonPaths: Rename DOLPHIN_DATA_DIR to NORMAL_USER_DIR
2023-01-31 17:57:08 -05:00
OatmealDome
846eef2a05
CommonPaths: Rename USERDATA_DIR to PORTABLE_USER_DIR
2023-01-31 17:57:08 -05:00
Scott Mansell
854a73dee0
CMake/MSVC: Fix PCH disabled build
2023-01-31 23:21:07 +13:00
Scott Mansell
154cb4f722
Introduce an Event system to VideoCommon
...
A lot of the remaining complexity in Renderer is the massive Swap function
which tries to handle a bunch of FrameBegin/FrameEnd events.
Rather than create a new place for it. This event system will try
to distribute it all over the place
2023-01-31 19:41:24 +13:00
Lioncash
cdd3e636e1
Common/Network: Resolve -Wexpansion-to-defined warning
...
Macros that expand to include the standard define macro are undefined.
This is pretty trivial to fix. We can just do the test and then define
the name itself if it's true, rather than making the set of definition
checks the macro itself.
2023-01-30 14:20:56 -05:00
MayImilae
37859ec1da
Cleanup: Remove CDUtils
...
This is a cleaning followup for #11456 .
2023-01-28 03:50:57 -08:00
Admiral H. Curtiss
bbdfb4bc14
CodeTrace: Avoid ppcState global.
2023-01-27 15:22:45 +01:00
Admiral H. Curtiss
be8d0b76ca
PowerPC: Remove PC macro.
2023-01-27 15:22:41 +01:00
Lioncash
0d93a31a38
Common/BitSet: Zero initialize data member
...
Gets rid of the need to remember to initialize them in the constructor,
except when overriding the default initializer.
2023-01-25 04:16:30 -05:00
Lioncash
6446fa7e48
Common/Bitset: Make initializer_list constructor constexpr
...
This was able to be constexpr since C++14.
2023-01-25 04:13:05 -05:00
Lioncash
1d03835c5d
StringUtil: Make StringUTF8CodePointCount take string_view
...
There's nothing really about this that would need to constrain it to
only std::string instances.
2023-01-24 16:55:43 -05:00
Lioncash
e5b91f00b0
Common: Replace StringBeginsWith/StringEndsWith with std equivalents
...
Obsoletes these functions in favor of the standard member functions
added in C++20.
2023-01-24 14:58:20 -05:00
Shawn Hoffman
a184d70193
convert File::ScanDirectoryTree to std::filesystem
2023-01-24 05:15:11 -08:00
Shawn Hoffman
7e6436db34
fileutil: use std::filesystem
2023-01-24 04:51:24 -08:00
Pierre Bourdon
caca662dbf
Merge pull request #10994 from shuffle2/fs
...
get rid of HAS_STD_FILESYSTEM
2023-01-24 12:18:25 +01:00
Pierre Bourdon
8d477c65c9
Merge pull request #11458 from shuffle2/winuver
...
windows: prefer os version from registry
2023-01-23 15:53:41 +01:00
Shawn Hoffman
c338f9e2a1
windows: replace comdef dependency with winrt
2023-01-23 06:09:01 -08:00
Shawn Hoffman
dff7f20f9d
windows: prefer os version from registry
...
this value is not modified by compatibility mode
drop reporting service pack numbers. no longer used
2023-01-17 01:38:00 -08:00
Shawn Hoffman
d51e4e5236
get rid of HAS_STD_FILESYSTEM
...
just use std::filesystem
2023-01-10 05:17:43 -08:00
Admiral H. Curtiss
653e0ccf28
Merge pull request #11365 from iwubcode/cheat_manager_freeze_value
...
DolphinQt: add ability to lock / freeze values in the watches window
2023-01-09 18:41:28 +01:00
Admiral H. Curtiss
7b04a6b958
Merge pull request #11089 from sepalani/pcap-share
...
NetworkCaptureLogger: Allow PCAP shared read access on Windows
2023-01-05 04:06:35 +01:00
JosJuice
e0fba20f1f
Merge pull request #11360 from shuffle2/vs
...
msvc: remove workaround for arm64 sha1 compiler bug
2022-12-24 22:55:47 +01:00
Sam Belliveau
673f81c18a
New FrameTime/VBlank Analyzer + Graph
2022-12-23 19:52:53 -05:00
iwubcode
8f3e8e4ca3
Core: add locked state to watches
2022-12-23 11:59:23 -06:00
iwubcode
2f2f906bf5
Core: add ability to add memory patches to the patch engine that will be executed each frame
2022-12-23 03:13:03 -06:00
iwubcode
4743d74985
Core: add helper function to apply a memory patch and mark the 'PPCPatches' as final
2022-12-23 03:13:03 -06:00