Commit Graph

35977 Commits

Author SHA1 Message Date
9de7ef6d8d Fix improper naming
I'm so sorry
2021-11-24 17:04:30 +01:00
aa5cb35c86 Merge pull request #10143 from Pokechu22/png-compression-level
Add option for setting the PNG zlib compression level
2021-11-23 16:40:34 +01:00
e1e3db13ba Merge pull request #10228 from Filoppi/fix_android_input_deadlock
ControllerInterface: fix UpdateReferences() deadlock
2021-11-23 16:27:03 +01:00
ba62019eb5 Merge pull request #10235 from AdmiralCurtiss/netplay-save-sync-boot
Netplay: Fix possible Wii save restore race condition between Netplay and CPU threads on game shutdown by making the Wii Save Sync data part of the BootParameters.
2021-11-23 16:19:56 +01:00
cc9a75a87b Merge pull request #10230 from JMC47/redsteel2
Compatibility Settings for Red Steel 2
2021-11-21 21:07:33 -05:00
15ff70baba Merge pull request #10231 from JosJuice/android-dir-init-livedata
Android: Make DirectoryInitialization use LiveData
2021-11-21 21:07:17 -05:00
6350c93ae1 NetPlay: Pass Wii FS sync data directly to game boot logic instead of indirectly through globals. 2021-11-22 01:33:46 +01:00
894773f607 Core/Boot: Add Wii FS sync data (for temp NAND/netplay) to BootSessionData and handle it in the boot and shutdown logic. 2021-11-22 01:33:45 +01:00
7b776f3769 NetPlay: Refactor game boot code path to allow passing BootSessionData through it. 2021-11-22 00:52:15 +01:00
83ad84061e Core/Boot: Refactor storage of boot-to-savestate data into a separate class. 2021-11-22 00:35:35 +01:00
d5b917a6c2 Merge pull request #10237 from AdmiralCurtiss/netplay-server-crash
NetPlayServer: Clear remaining m_players when netplay thread ends so that their destructors can run while the ENetHost still exists.
2021-11-21 22:04:12 +01:00
37247a51a7 Merge pull request #10240 from AdmiralCurtiss/mgba-save-import-export
GBA: Add import and export save options to context menu.
2021-11-21 15:55:55 -05:00
8488ff6884 GBA: Add import and export save options to context menu. 2021-11-21 18:08:23 +01:00
05ecff199f Merge pull request #10232 from JosJuice/android-minify
Android: Enable R8 code shrinking
2021-11-21 04:50:03 -05:00
138847f98e Merge pull request #10239 from JosJuice/android-mmu
Android: Add MMU setting to GUI
2021-11-21 04:49:07 -05:00
77aa2cd04e Android: Add MMU setting to GUI
Now that we have fast MMU emulation on AArch64, there's no
reason to keep excluding this from the GUI like we've been doing.
2021-11-21 09:38:56 +01:00
e716349426 Merge pull request #10238 from PatrickFerry/add-mmu-games
Gameini: Enable MMU for some games
2021-11-21 01:35:15 -05:00
f8ea167b1f GameSettings: Enable MMU for We Love Golf! 2021-11-21 05:20:30 +00:00
715a80ef57 GameSettings: Enable MMU and Set Texture Cache Accuracy to "Medium" for 007: From Russia with Love 2021-11-21 05:19:18 +00:00
d2ca1037d9 Merge pull request #10162 from JosJuice/jitarm64-memcheck
JitArm64: Implement memcheck
2021-11-20 23:36:43 -05:00
e2c4cf49e2 NetPlayServer: Clear remaining m_players when netplay thread ends so that their destructors can run while the ENetHost still exists. 2021-11-21 00:18:44 +01:00
5490797867 JitArm64: Implement memcheck for psq_lXX/psq_stXX with update 2021-11-20 23:39:27 +01:00
61c73061e9 JitArm64: Implement memcheck for psq_lXX/psq_stXX without update 2021-11-20 23:39:27 +01:00
9e43796912 JitArm64: Allow passing temp FPR to EmitMemcheck
Small optimization. If the caller already has an FPR that
it isn't using, might as well pass it on to fpr.Flush.
2021-11-20 23:39:27 +01:00
89301b1f91 JitArm64: Implement memcheck for lfXX/stfXX with update 2021-11-20 23:39:27 +01:00
8c96e60cd1 JitArm64: Implement memcheck for lfXX/stfXX without update 2021-11-20 23:39:27 +01:00
1c8ddcdda1 JitArm64: Implement memcheck for dcbz 2021-11-20 23:39:27 +01:00
4fe15e788f JitArm64: Implement memcheck for lmw/stmw 2021-11-20 23:39:27 +01:00
b4ffdce800 JitArm64: Implement memcheck for lXX/stX with update 2021-11-20 23:39:27 +01:00
662ae570a0 JitArm64: Make EmitBackpatchRoutine support saving W0
Being able to preserve the address register is useful for the
next commit, and W0 is the address register used for loads. Saving
the address register used for stores, W1, was already supported.
2021-11-20 23:39:27 +01:00
e316d0e94f JitArm64: Don't update dest reg when load triggers exception, part 2
If a host register has been newly allocated for the destination
guest register, and the load triggers an exception, we must make
sure to not write the old value in the host register into ppcState.
This commit achieves this by not marking the register as dirty
until after the load is done.
2021-11-20 23:39:26 +01:00
96190887ce JitArm64: Don't update dest reg when load triggers exception
Fixes a problem introduced in the previous commit.
2021-11-20 23:39:26 +01:00
ab1ceee16f JitArm64: Implement memcheck for lXX/stX without update 2021-11-20 23:39:26 +01:00
8c905e152a JitArm64: Make WriteConditionalExceptionExit more flexible
You can now specify an already allocated register for it to use as a
temporary register, and it also supports being called while in farcode.
2021-11-20 23:37:02 +01:00
e5a4a86672 Merge pull request #10055 from JosJuice/jitarm64-reuse-memory
JitArm64: Codegen space reuse
2021-11-20 17:35:24 -05:00
1badceb455 ControllerInterface: fix UpdateReferences() deadlock
Removed useless locks to DeviceContainer::m_devices_mutex, as they were all already protected by m_devices_population_mutex.
We have no interest in blocking other threads that were potentially reading devices at the same time so this seems fine.
This simplifies the code, and I've adjusted a few comments which mentioned possible deadlock that should now be totally gone.

The deadlock could have happen if a thread directly called EmulatedController::UpdateReferences(), while another another thread also reached EmulatedController::UpdateReferences() within a call to ControllerInterface::UpdateDevices(), as the mentioned function locked both the DeviceContainer::m_devices_mutex and s_get_state_mutex at the same time.

The deadlock was frequent on game emulation startup on Android, due to the UpdateReferences() call in InputConfig::LoadConfig() and the UI thread triggering calls to ControllerInterface::UpdateDevices().
It could also have happened on Desktop if a user pressed "Refresh Devices" manually in the UI while the input config was loading.

Also brought some UpdateReferences() comments and thread safety fixes from https://github.com/dolphin-emu/dolphin/pull/9489
2021-11-20 16:54:36 +02:00
6ca2897d20 Merge pull request #10233 from AdmiralCurtiss/riivolution-case-sensitive
RiivolutionPatcher: Use case-insensitive filename comparison when searching for files in a folder patch.
2021-11-19 21:42:27 -05:00
0fc563ee2e RiivolutionPatcher: Use case-insensitive filename comparison when searching for files in a folder patch. 2021-11-20 01:15:18 +01:00
c2aa2818be Android: Make rescan on app start work again
I haven't fully confirmed why the previous commit broke this,
but I imagine it's due to AfterDirectoryInitializationRunner
executing in a different order than before, resulting in
startRescan running before startLoad.
2021-11-19 22:58:05 +01:00
bb475391d2 Android: Make DirectoryInitialization use LiveData
Gets rid of all remaining uses of the deprecated LocalBroadcastManager.
2021-11-19 22:58:05 +01:00
d3a23fe5c2 Android: Enable R8 code shrinking
This decreases our APK size by a few megabytes. Most of the reduction
is from Java libraries that we only use small parts of. Code shrinking
gets rid of all the unused code from these libraries from the APK.

Because I highly value the ability to get stack traces that make
sense, I have specifically disabled obfuscation (automatic renaming
of symbols to short incomprehensible names).

I've only enabled code shrinking for release builds, purely because
I feel like the extra build time (30 seconds on my machine)
would be annoying when you want to make debug builds rapidly.
2021-11-19 22:56:34 +01:00
d73f3183ac Compatibility Settings for Red Steel 2
Red Steel 2 has FMVs that get corrupted with Anisotropic filtering.  It
also hangs on dualcore.  While SyncGPU works, both another user and
myself saw much smoother gameplay when using Single Core for unknown
reasons.
2021-11-18 18:57:45 -05:00
dbaebdc585 Merge pull request #10222 from phire/fix-copy-filter-clamping
Fix copy filter clamping
2021-11-18 17:48:33 -05:00
94ccf765af Add option for setting the PNG zlib compression level 2021-11-18 13:10:22 -08:00
6f4bbac528 Merge pull request #9956 from Pokechu22/non-power-of-2-wrap-2
VideoCommon: Manually handle texture wrapping and sampling
2021-11-18 13:08:23 -05:00
95b9941044 Use Fast Texture Sampling by default
This commit changes the default value of Fast Texture Sampling to true, and also moves the setting that controls it to the experimental section of the advanced tab.  This is its own commit so that it can be easily reverted when we want to default to Manual Texture Sampling.

Co-authored-by: JosJuice <josjuice@gmail.com>
2021-11-17 21:29:57 -08:00
1adff1c467 VideoCommon: Skip textureQueryLevels if it doesn't exist 2021-11-17 21:28:39 -08:00
bdcfb31187 VideoCommon: Handle custom texture sizes correctly
Specifically, when using Manual Texture Sampling, if textures sizes don't match the size the game specifies, things previously broke.  That can happen with custom textures, and also with scaled EFB copies at non-native IRs.  It breaks most obviously by not scaling the texture coordinates (so only part of the texture shows up), but the hardware wrapping functionality also assumes texture sizes are a power of 2 (or else it will behave weirdly in a way that matches how hardware behaves weirdly).  The fix is to provide alternative texture wrapping logic when custom texture sizes are possible.
2021-11-17 21:28:36 -08:00
93eea7cb13 VideoCommon: Add option to use old behavior (Fast Texture Sampling)
Co-authored-by: JosJuice <josjuice@gmail.com>
2021-11-17 21:27:32 -08:00
ee80298ca4 VideoCommon: Implement diagonal LOD
Note that both GLSL and HLSL provide a fwidth (fragment width) function defined as `fwidth(p) = abs(dFdx(p)) + abs(dFdy(p))`.  However, it's easy enough to implement this ourselves (and it makes the code a bit more obvious).
2021-11-17 20:04:34 -08:00