JosJuice
6e88c44d5d
Move SmallVector to Common
...
We had one implementation of this type of data structure in Arm64Emitter
and one in VideoCommon. This moves the Arm64Emitter implementation to
its own file and adds begin and end functions to it, so that VideoCommon
can use it.
You may notice that the license header for the new file is CC0. I wrote
the Arm64Emitter implementation of SmallVector, so this should be no
problem.
2023-08-22 13:19:49 +02:00
JosJuice
7197e3abd0
Use structs for config callback IDs
...
This way you can't mix up regular config callback IDs and CPU thread
config callback IDs. (It would be rather bad if you did!)
2023-08-17 19:19:26 +02:00
JosJuice
2b17e89336
Config: Don't clear callbacks on shutdown
...
This fixes a problem that started happening in CoreTimingTest after the
previous commit. CPUThreadConfigCallback registers a Config callback
only once per run of the process, but CoreTimingTest calls
Config::Shutdown after each test, and Config::Shutdown was clearing all
callbacks, preventing the callback from running after that.
2023-08-17 19:19:25 +02:00
JosJuice
71ce8bb6f0
Don't call RunAsCPUThread in config callbacks
...
In theory, our config system supports calling Set from any thread. But
because we have config callbacks that call RunAsCPUThread, it's a lot
more restricted in practice. Calling Set from any thread other than the
host thread or the CPU thread is formally thread unsafe, and calling Set
on the host thread while the CPU thread is showing a panic alert causes
a deadlock. This is especially a problem because 04072f0
made the
"Ignore for this session" button in panic alerts call Set.
Because so many of our config callbacks want their code to run on the
CPU thread, I thought it would make sense to have a centralized way to
move execution to the CPU thread for config callbacks. To solve the
deadlock problem, this new way is non-blocking. This means that threads
other than the CPU thread might continue executing before the CPU thread
is informed of the new config, but I don't think there's any problem
with that.
Intends to fix https://bugs.dolphin-emu.org/issues/13108 .
2023-08-17 19:19:25 +02:00
Dentomologist
9ad0d9ca6a
NandPaths: Use initializer_list instead of unordered_set
2023-08-12 14:00:41 -07:00
Dentomologist
9955a06dbd
NandPaths: Resolve Android tautological comparison warning
...
Android interprets char as unsigned char, so comparing with 0 triggers a
tautological-unsigned-char-zero-compare warning.
Casting c to an unsigned char and removing the comparison with 0
resolves the warning while needing one less comparison on all platforms.
2023-08-12 14:00:41 -07:00
JosJuice
30c4ac34b0
Merge pull request #12073 from AdmiralCurtiss/wiimote-win32error
...
WiimoteReal/IOWin: Use correct error type in the default case.
2023-07-29 18:54:10 +02:00
Admiral H. Curtiss
cd923718c3
CommonFuncs: Add GetWin32ErrorString().
2023-07-28 08:10:01 +02:00
Dentomologist
3c6ea825c2
GekkoDisassembler: Remove unused parameter dmode from fdabc function
...
With the removal of m_flags, dmode is no longer used in fdabc.
2023-07-27 10:47:46 -07:00
Dentomologist
33dc2a9e6a
GekkoDisassembler: Remove unused parameter dmode from ldst function
...
With the removal of m_flags, dmode is no longer used in ldst.
2023-07-27 10:47:46 -07:00
Dentomologist
b3c5021fc4
GekkoDisassembler: Remove unused parameter dmode from rrn function
...
With the removal of m_flags, dmode is no longer used in rrn.
2023-07-27 10:47:46 -07:00
Dentomologist
a177c8bcb1
GekkoDisassembler: Remove unused parameter dmode from dab function
...
With the removal of m_flags, dmode is no longer used in dab.
2023-07-27 10:47:45 -07:00
Dentomologist
a732647e5a
GekkoDisassembler: Remove unused parameter dmode from nooper function
...
With the removal of m_flags, dmode is no longer used in nooper.
2023-07-27 10:47:45 -07:00
Dentomologist
317bb629b9
GekkoDisassembler: Remove unread variable m_flags
...
Writes to m_flags are pointless as it's never read.
2023-07-27 10:47:41 -07:00
Admiral H. Curtiss
0a2afa48b7
Merge pull request #12045 from tupfold/master
...
[Minor Bugfix] Extremely rare HostID collision bugfix
2023-07-24 03:55:45 +02:00
Upfoldian
c4978edaf6
Fixed a bug where in the extremely unlikely change that HostIDs collide, a new HostID is generated.
2023-07-13 21:33:36 +10:00
Sepalani
cbb76c1d4f
Common/Network: Use StrErrorWrapper
2023-07-12 20:52:35 +04:00
Sepalani
92be54d57a
Common/CommonFuncs: Add StrErrorWrapper function
2023-07-12 20:52:35 +04:00
Dentomologist
c8e276c6f5
GekkoDisassembler: Remove unread variable m_displacement
2023-07-01 20:09:10 -07:00
Dentomologist
98c9049184
GekkoDisassembler: Remove unread variable m_sreg
2023-07-01 20:09:09 -07:00
JosJuice
179d823852
Merge pull request #11992 from Dentomologist/remove_mtype_and_associated_enum
...
GekkoDisassembler: Remove unread variable and associated enum
2023-07-01 09:00:42 +02:00
Admiral H. Curtiss
fa81006b51
Merge pull request #11955 from TellowKrinkle/CMakeDependencies
...
CMake: Allow ignoring system packages
2023-06-30 19:06:04 +02:00
Admiral H. Curtiss
e4d7ba5554
Merge pull request #12007 from AdmiralCurtiss/cmake-scmrev-at-build-time
...
CMake: Generate scmrev.h at build time instead of configure time.
2023-06-30 18:59:33 +02:00
TellowKrinkle
d844317a6d
Common: Better AlignUp implementation
2023-06-29 02:35:44 -05:00
Admiral H. Curtiss
2a6f4d879c
CMake: Generate scmrev.h at build time instead of configure time.
2023-06-29 03:23:31 +02:00
Admiral H. Curtiss
3a8e7de214
Merge pull request #11903 from noahpistilli/wiilink
...
IOS/KD: Add WiiLink as WC24 service provider by default
2023-06-26 02:27:47 +02:00
Sketch
f9f8e94e30
Add default support for WiiLink + configuration
2023-06-25 14:57:15 -04:00
Dentomologist
2472269d06
GekkoDisassembler: Remove unused enum InstructionType
2023-06-24 13:45:26 -07:00
Dentomologist
2cf48bc32c
GekkoDisassembler: Remove unread variable m_type
...
Writes to m_type are pointless because it's never read.
2023-06-24 13:45:26 -07:00
Pokechu22
50c929928c
Merge pull request #11920 from Minty-Meeo/kill-ascii-to-hex
...
Kill AsciiToHex
2023-06-23 18:20:36 -07:00
get
445bf8d2c6
Kill AsciiToHex
...
Now superseded by Common::FromChars
2023-06-22 00:06:50 -05:00
Nicolas van Kempen
4ef2f2c710
Rename Symbol constructor parameter to prevent shadowing
2023-06-20 13:38:31 -04:00
Admiral H. Curtiss
5d7b5822c9
Merge pull request #11972 from Minty-Meeo/string-improvements-part-1c
...
Replace std::ostringstream usage with fmt::format
2023-06-19 02:18:30 +02:00
get
ffabb6c57b
Replace std::ostringstream usage with fmt::format
2023-06-18 18:37:32 -05:00
Admiral H. Curtiss
8039d10994
Merge pull request #11966 from Dentomologist/convert_xemitter_prefetchlevel_to_enum_class
...
xEmitter: Convert PrefetchLevel to enum class
2023-06-18 15:17:02 +02:00
JosJuice
39a8219767
Arm64Emitter/x64Emitter: Use nodiscard for FixupBranch
...
This should prevent future occurrences of the type of problem that was
fixed in b713042
.
2023-06-18 09:10:20 +02:00
Dentomologist
04fcf68176
xEmitter: Convert PrefetchLevel to enum class
2023-06-17 16:41:32 -07:00
get
07ad75f34f
EnumUtils: Add Common::ToUnderlying
...
Mirrors the C++23 <utility> function, std::to_underlying
2023-06-17 07:15:33 -05:00
Admiral H. Curtiss
f5eea4a957
Merge pull request #11834 from Dentomologist/xemitter_use_pseudonamed_parameter_force5bytes
...
XEmitter: Add enum class Force5Bytes
2023-06-16 15:46:36 +02:00
TellowKrinkle
5b10a80401
CMake: Use targets for all optionally-external dependencies
2023-06-15 01:41:41 -05:00
Dentomologist
7ff7c9e84f
Common: Convert FromWhichRoot to enum class
2023-06-13 13:25:22 -07:00
Admiral H. Curtiss
6d16a09707
Merge pull request #11941 from Dentomologist/convert_blockingloop_stopmode_to_enum_class
...
Common: Convert BlockingLoop::StopMode to enum class
2023-06-13 11:47:20 +02:00
Dentomologist
3c80f821c0
Common: Convert BlockingLoop::StopMode to enum class
2023-06-12 17:12:25 -07:00
Dentomologist
4c2759f541
XEmitter: Add enum class Jump
...
Replace the bool parameter force5bytes in J, JMP, and J_CC with an enum
class Jump::Short/Near. Many callers set that parameter to the literal
'true', which was unclear if you didn't already know what it did.
2023-06-12 13:04:18 -07:00
Lioncash
41df38cb7c
Common: Move DebugInterface.h into Core
...
The base DebugInterface now depends on the Core's CPUThreadGuard, and
utilities in Common shouldn't be depending on Core facilities. So, we
can move this into the core library instead.
2023-06-12 10:35:31 -04:00
OatmealDome
1a0a1e8f12
Merge pull request #10976 from TellowKrinkle/StackFrames
...
Improve stack frames for profilers
2023-06-12 05:00:08 +02:00
Robin Kertels
23bebc5270
VideoBackends:Vulkan: Allow loading custom drivers on Android
...
... using libadrenotools
2023-06-11 13:52:34 +02:00
TellowKrinkle
28ed1f8be1
Common:AGL: Support making temporary contexts from the main thread
...
- Don't crash when making contexts from the main thread
- Don't focus the window when making a context
2023-06-10 14:25:45 -05:00
Pokechu22
b246a634d4
OpenGL: Check the list of supported AA modes instead of hardcoding
2023-06-08 22:07:41 -07:00
Admiral H. Curtiss
3dbdf0472d
Merge pull request #11901 from Filoppi/add_texture_types
...
Video: add R10B10G10A2 and R16G16B16A16F texture types
2023-06-08 15:28:15 +02:00
Filoppi
cdc53c046b
Video: add R10B10G10A2 and R16G16B16A16F texture types (needed by PR 11850)
2023-06-08 03:17:20 +03:00
Minty-Meeo
e92f8fcbb4
Remove old GCC version workarounds
...
The minimum GCC version is now GCC 10.
2023-06-06 22:49:53 -05:00
Admiral H. Curtiss
a7678f3210
Merge pull request #11694 from jnaidu360/skylanders-portal-window
...
Skylanders Portal Menu Navigational Improvements
2023-06-06 19:20:39 +02:00
jnaidu360
66f4902a1e
Improved Skylanders Portal Window Navigation
...
Adds features to improve navigation of Skylanders portal menu, includes:
-List of Skylanders and filters for searching
-Improved buttons for faster loading options
-Added default user folder for storing .sky files
2023-06-04 18:10:08 -07:00
Admiral H. Curtiss
ca484c7a65
Merge pull request #11609 from AdmiralCurtiss/sd-size-select
...
Add SD card size option for converting folder -> file.
2023-06-02 20:52:08 +02:00
Admiral H. Curtiss
68c3b1fb7d
Merge pull request #11830 from shuffle2/vs17.6
...
update to VS 17.6
2023-05-23 00:37:01 +02:00
Floogle
5c1c22bab9
Traversal: Notify user of TTL to be used
2023-05-20 17:15:10 +02:00
Floogle
4f11b0d4c9
Traversal: Autoconfigure TTL to use for probe packet
2023-05-20 17:15:07 +02:00
Admiral H. Curtiss
86f1ef1e33
Merge pull request #11707 from TellowKrinkle/CMakeIconv
...
CMake: Use find_package and imported targets for Iconv
2023-05-19 19:27:16 +02:00
Admiral H. Curtiss
8342164dbd
Common/MemArena: Pass shared memory base file name to GrabSHMSegment().
2023-05-19 18:53:08 +02:00
Admiral H. Curtiss
ff5bcba966
Common/MemArenaWin: Handle file mappings >= 4GB.
2023-05-19 18:44:32 +02:00
Admiral H. Curtiss
b0d7fa9eb1
Merge pull request #11823 from AdmiralCurtiss/mmap-android
...
Common/MemArenaAndroid: Keep fastmem region mapped.
2023-05-19 18:42:33 +02:00
Shawn Hoffman
ac7003a1ac
Revert "windows: temporarily hardcode VCToolsVersion to 14.34.31931.0"
...
This reverts commit 3961afdbb9
.
2023-05-16 20:24:45 -07:00
Lioncash
1a2b48c204
StringUtil: Move ThousandSeparate() into Common namespace
2023-05-16 14:26:33 -04:00
Lioncash
954afd81ec
StringUtil: Move CommandLineToUtf8Argv() into Common namespace
2023-05-16 14:23:21 -04:00
Lioncash
d368c989e7
StringUtil: Move GetEscapedHtml() into Common namespace
2023-05-16 14:21:19 -04:00
Lioncash
21df3ca572
StringUtil: Move IsPrintableCharacter() into Common namespace
2023-05-16 14:17:54 -04:00
Lioncash
a9f1edeb61
StringUtil: Move IsAlpha() into Common namespace
2023-05-16 14:11:02 -04:00
Admiral H. Curtiss
ab98db445d
Common/MemArenaAndroid: Keep fastmem region mapped.
2023-05-11 03:01:05 +02:00
Admiral H. Curtiss
8c67083c87
Merge pull request #11813 from lioncash/insert
...
PPCSymbolDB: Use emplace() where applicable
2023-05-09 18:48:06 +02:00
Lioncash
15d1ae3a8a
SymbolDB: Add constructors to Symbol
...
Allows for much more convenient in-place construction.
2023-05-02 16:04:47 -04:00
Lioncash
4db186f9ff
Common/JitRegister: Move interface into Common namespace
...
Makes the namespace consistent with other common utilities.
2023-05-02 12:00:05 -04:00
Léo Lam
0eeeac2487
Merge pull request #11736 from noahpistilli/get-scheduler-stat
...
IOS/Network/KD: Implement GetSchedulerStat
2023-05-01 01:19:11 +01:00
Brad Smith
29a8226ac5
Fix building on OpenBSD
...
86c1f6e1e7
introduced code that had not
been build tested on OpenBSD.
https://bugs.dolphin-emu.org/issues/13241
2023-04-29 19:21:48 -04:00
Brad Smith
c9bbb12c2e
Fix build of iconv code on OpenBSD
2023-04-25 01:22:05 -04:00
Léo Lam
77b334b47b
Merge pull request #11791 from lioncash/traverse
...
Common/Traversal: Move interface into Common namespace
2023-04-25 01:05:41 +01:00
Lioncash
d991cbaf3c
Common: Move CodeTrace.cpp/.h into Core
...
This interface relies on Core details and shouldn't be in Common to
begin with, since it's not a general utility.
2023-04-24 09:10:43 -04:00
Lioncash
30e7ab94fa
Common/TraversalProto: Move interface into Common namespace
...
Gets the types out of the global namespace.
2023-04-24 08:53:14 -04:00
Lioncash
27f38c6c8f
Common/TraversalClient: Move interface into Common namespace
...
Gets the interface out of the global namespace.
2023-04-24 08:28:25 -04:00
Lioncash
b4cc1ade02
Common/TraversalClient: Use correct deleter with g_MainNetHost
...
Previously this was using the default deleter (which just calls delete
on the pointer), which is incorrect, since the ENetHost instance is
allocated through ENet's C API, so we need to use its functions to
deallocate the host instead.
2023-04-19 12:38:16 -04:00
Lioncash
07ed932a09
Common/LinearDiskCache: Move interface into Common namespace
...
Gets the interface out of the global namespace.
2023-04-19 09:14:39 -04:00
Admiral H. Curtiss
2a0b90807d
Merge pull request #11770 from lioncash/err
...
Common/CommonFuncs: Move interface into Common namespace
2023-04-19 10:38:22 +02:00
Lioncash
f1ad43afaf
Common/CommonFuncs: Move interface into Common namespace
...
Gets these functions out of the global namespace.
2023-04-18 19:23:04 -04:00
Admiral H. Curtiss
2e7f0d002e
Merge pull request #11760 from Minty-Meeo/embracing-nullptr
...
Embrace nullptr over NULL and 0
2023-04-18 22:14:11 +02:00
Admiral H. Curtiss
d861b8caca
Config: Add setting for SD card file size when converting.
2023-04-18 11:04:26 +02:00
Sketch
467b961e9c
IOS/Network/KD: Implement GetSchedulerStat
2023-04-17 11:38:42 -04:00
get
a5d06fde4b
Embrace nullptr over NULL and 0
2023-04-15 16:07:05 -05:00
Lioncash
784a216927
Common/MathUtil: Move IntLog2 into MathUtil namespace
...
Gets this out of the global namespace.
2023-04-15 03:35:05 -04:00
Lioncash
5e0c20f8a5
Common/MathUtil: Remove MathFloatVectorSum()
...
This isn't used anywhere and not really a generic utility, so we can get
rid of it.
This also lets us remove MathUtil.cpp, since this was the only thing
within that file.
2023-04-15 03:25:38 -04:00
Admiral H. Curtiss
e9dbb93cb5
Merge pull request #11756 from lioncash/ini
...
Common/IniFile: Move interface into Common namespace
2023-04-14 20:52:30 +02:00
Léo Lam
ae18aa0639
Merge pull request #11687 from Minty-Meeo/warnings
...
Resolve GCC/Clang Warnings
2023-04-14 01:29:46 +01:00
Lioncash
e4caace6bb
Common/IniFile: Move interface into Common namespace
...
Gets this out of the global namespace and into the Common namespace
2023-04-13 10:19:28 -04:00
Lioncash
f5bdfdde1a
Common/UPnP: Move interface into Common namespace
...
Keeps these utilities consistent with the rest of most of the Common
library.
2023-04-12 14:15:58 -04:00
Minty-Meeo
244918acb8
Resolve [-Wdeprecated-declarations]
2023-04-12 03:59:57 -05:00
Minty-Meeo
efd06a85d2
Resolve [-Wunused-but-set-variable]
2023-04-12 03:59:57 -05:00
Lioncash
09e11b8067
Common: Rename ENetUtil.cpp/.h to ENet.cpp/.h
2023-04-11 11:48:46 -04:00
Lioncash
64ce2012e3
Common/ENetUtil: Move interface into Common namespace
...
Rather than just being under a separate ENetUtil namespace, we can unify
this into the common namespace as Common::ENet.
2023-04-11 09:12:04 -04:00
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