Commit Graph

42931 Commits

Author SHA1 Message Date
JosJuice b35f7af355
Merge pull request #13257 from CasualPokePlayer/dtm_country_code
Add SYSCONF country code to DTM
2025-01-06 10:39:53 +01:00
JosJuice eec2e2f07a
Merge pull request #13251 from Sintendo/carry-opts
JitArm64_Integer: Carry flag optimizations
2025-01-06 10:39:43 +01:00
JosJuice 43d5f61a60
Merge pull request #13149 from Sintendo/dcbx-msub
JitArm64_LoadStore: Small dcbx optimization
2025-01-06 09:29:08 +01:00
OatmealDome 8d9ec2fde9
Merge pull request #13210 from OatmealDome/fix-scmrevgen
ScmRevGen: Don't generate Info.plist files directly
2025-01-06 01:18:20 -05:00
JMC47 6b686be5f1
Merge pull request #13233 from TryTwo/PR_Codec
AdvancedWidget: Replace FFV1 codec with Ut Video
2025-01-04 22:26:36 -05:00
JMC47 9b3b6bea9d
Merge pull request #12801 from JosJuice/jitarm64-crxxx-opt
JitArm64: Optimize crXXX
2025-01-03 16:32:49 -05:00
JMC47 f15a78ed38
Merge pull request #13094 from mitaclaw/ranges-modernization-5-contains
Ranges Algorithms Modernization - Contains
2025-01-01 14:42:44 -05:00
mitaclaw 527841f1df Simplify `std::search` with `Common::ContainsSubrange` 2025-01-01 09:52:03 -08:00
mitaclaw d92c68e1de Simplify `std::find_if` with `Common::Contains` 2025-01-01 09:52:03 -08:00
mitaclaw 110d32729e Simplify `std::find` with `Common::Contains`
In NandPaths.cpp, the `std::initializer_list<char>` of illegal characters has been turned into a `char[]` (similar to the one in GameList.cpp).

The reverse iteration in ResourcePack.cpp seemed to provide no benefits, and doing without it it seemed to have no ill effects.
2025-01-01 09:52:03 -08:00
mitaclaw 6f10acea3f Common: Create "Contains.h" Algorithm Header
The new `Common::Contains` and `Common::ContainsSubrange` function objects mirror C++23's `std::ranges::contains` and `std::ranges::contains_subrange`, respectively.
2025-01-01 09:52:01 -08:00
Admiral H. Curtiss b8921b1338
Merge pull request #13237 from AdmiralCurtiss/slider-mappings
DolphinQt/HacksWidget: Convert accuracy slider to ConfigSlider
2024-12-31 15:22:04 +01:00
Admiral H. Curtiss c1c80adf1a
Merge pull request #13235 from Gamer64ytb/vsync-fix
Android: Fix VSync option not working
2024-12-31 15:20:49 +01:00
TryTwo 3d248d000f Frame Dumping: Change lossless codec from FFV1 to Ut Video.
Ut Video is faster and more compatible with editing programs, but produces larger files.
2024-12-30 14:07:43 -07:00
CasualPokePlayer c1698c93e2 Add SYSCONF country code to DTM
Recently there was some issues in TASVideos trying to sync a Donkey Kong Country Returns TAS. It eventually was synced by directly using the config from the TAS author. The exact setting which caused the desync was narrowed down to being in SYSCONF, with the country code. The TAS author lives in the US, so the country code matched the US country code, while the person attempting to sync the TAS did not live in the US.

Adding SYSCONF country code to the DTM should avoid this being an issue for future Dolphin versions.
2024-12-30 07:50:22 -08:00
Sintendo d81bfe94eb JitArm64_Integer: addzex - Optimize InHostCarry case for 0
Before:
0x5280000d   mov    w13, #0x0                 ; =0
0x1a1f01ae   adc    w14, w13, wzr

After:
0x1a9f37ee   cset   w14, hs
2024-12-29 12:21:34 +01:00
Sintendo c817b4779d JitArm64_Integer: addzex - Optimize InPPCState case for 0
Before:
0x52800019   mov    w25, #0x0                 ; =0
0x394bd3b8   ldrb   w24, [x29, #0x2f4]
0x2b180339   adds   w25, w25, w24

After:
0x394bd3b9   ldrb   w25, [x29, #0x2f4]
2024-12-28 23:20:22 +01:00
Sintendo 14641b06fc JitArm64_Integer: addzex - Optimize ConstantFalse and ConstantTrue
When the input register and carry flags are known, we can always
precompute the result.

We still materialize the immediate when the condition register
needs to be updated, but this seems to be a general problem. I might
look into that one day, but for now this'll do.

- ConstantFalse
Before:
0x52800119   mov    w25, #0x8                 ; =8
0x2a1903fa   mov    w26, w25

After:
N/A

- ConstantTrue
Before:
0x52800119   mov    w25, #0x8                 ; =8
0x1100073a   add    w26, w25, #0x1

After:
N/A
2024-12-28 23:07:38 +01:00
Sintendo a4ba13b4c9 JitArm64_Integer: addex - Optimize InHostCarry for -1
Same thing we did for subfex.

Before:
0x1280001a   mov    w26, #-0x1                ; =-1
0x1a1f035a   adc    w26, w26, wzr

After:
0x5a9f23fa   csetm  w26, lo
2024-12-28 22:12:50 +01:00
Sintendo d2bfa157dc JitArm64_Integer: addex - Optimize InHostCarry for 0
Similar to what we did for subfex, but for 0.

Before:
0x5280001b   mov    w27, #0x0                 ; =0
0x1a1f037b   adc    w27, w27, wzr

After:
0x1a9f37fb   cset   w27, hs
2024-12-28 21:55:57 +01:00
Sintendo ad7dba5413 JitArm64_Integer: addex - Optimize InPPCState case for 0
Same optimization we did for subfex. Skip loading the carry flag into a
temporary register first when we're dealing with zero.

Before:
0x394bd3b8   ldrb   w24, [x29, #0x2f4]
0x2a1803f9   mov    w25, w24

After:
0x394bd3b9   ldrb   w25, [x29, #0x2f4]
2024-12-28 21:41:51 +01:00
Sintendo 7410bc2025 JitArm64_Integer: subfzex - Constant folding
When both the input register and the carry flag are constants, the
result can be precomputed.

Before:
0x52800016   mov    w22, #0x0                 ; =0
0x2a3603f6   mvn    w22, w22

After:
2024-12-28 20:58:24 +01:00
Sintendo fa13457abb JitArm64_Integer: subfex - Optimize InHostCarry case for -1
The result is either -1 or 0 depending on the state of the carry flag.
This can be done with a csetm instruction.

Before:
0x1280001a   mov    w26, #-0x1                ; =-1
0x1a1f035a   adc    w26, w26, wzr

After:
0x5a9f23fa   csetm  w26, lo
2024-12-28 20:18:14 +01:00
Sintendo 18dd3f69f1 JitArm64_Integer: subfex - Optimize InPPCState case for 0
When the immediate is zero, we can load the carry flag from memory
directly to the destination register.

Before:
0x394bd3b8   ldrb   w24, [x29, #0x2f4]
0x2a1803f9   mov    w25, w24

After:
0x394bd3b9   ldrb   w25, [x29, #0x2f4]
2024-12-28 18:15:48 +01:00
Sintendo e54bfd6605 JitArm64_Integer: Refactor subfex 2024-12-28 18:12:13 +01:00
Sintendo 5cc9bde1c1 JitBase: Improve const-correctness 2024-12-28 16:44:58 +01:00
Sintendo 50d991780f JitBase: Add HasConstantCarry helper 2024-12-28 16:44:52 +01:00
Tilka 05cad38abc
Merge pull request #13243 from nlebeck/stringutil-tests
Add some unit test coverage of the `SplitPath` function
2024-12-27 18:10:47 +01:00
Admiral H. Curtiss 4fc50226c6
DolphinQt/HacksWidget: Convert accuracy slider to ConfigSlider 2024-12-27 05:40:24 +01:00
Admiral H. Curtiss 98ee3836e5
DolphinQt: Add option for value mappings to ConfigSlider 2024-12-27 05:40:13 +01:00
JMC47 532a8621da
Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-of
Ranges Algorithms Modernization - Of
2024-12-26 16:51:53 -05:00
Niel Lebeck bae4616dd1 Add some unit test coverage of the SplitPath function 2024-12-26 11:42:01 -08:00
Gamer64 764bf314e1 Android: Fix VSync option not working
It happened due to a typo from SECTION_GFX_HARDWARE
2024-12-24 10:41:45 +01:00
JMC47 f9ce2b9d76
Merge pull request #13232 from TryTwo/PR_hotfix
Qt crash hotfix
2024-12-23 18:04:51 -05:00
TryTwo 27ac5fa777 Qt crash fix. Don't store Config::Info variable as a reference. 2024-12-23 15:40:07 -07:00
JMC47 c528a70e64
Merge pull request #13211 from Sintendo/blendvpd
Jit_FloatingPoint: fselx - Prefer BLENDVPD over VBLENDVPD
2024-12-22 18:35:11 -05:00
JMC47 a1d6aa7d3e
Merge pull request #13212 from JosJuice/jitarm64-ps-sel-same-reg
JitArm64: Optimize ps_sel with d == b || d == c
2024-12-22 18:34:32 -05:00
JosJuice 5641b83d4e
Merge pull request #13063 from TryTwo/PR_GameSettings
Add ability to edit game-specific GFX settings from game properties tab.
2024-12-22 20:42:28 +01:00
Admiral H. Curtiss bb8c0a795f
Merge pull request #13214 from JosJuice/sethardcoremode-private
AchievementManager: Make SetHardcoreMode private
2024-12-22 20:09:29 +01:00
JMC47 1ba8541da9
Merge pull request #13091 from mitaclaw/ranges-modernization-2-returns
Ranges Algorithms Modernization - Return
2024-12-20 12:50:19 -05:00
JMC47 ac0d6cbaaa
Merge pull request #13224 from Sintendo/jitarm64-subfic2
JitArm64_Integer: Optimize subfic for -1
2024-12-18 12:07:23 -05:00
OatmealDome 01f6810a9d
Merge pull request #13207 from OatmealDome/vulkan-hdr-color-space
VKSwapChain: Always use surface formats with a normal sRGB color space if not RGBA16F
2024-12-16 17:29:19 -05:00
mitaclaw 2b0cd16c8c Modernize `std::none_of` with ranges
In JitRegCache.cpp, the lambda predicate were replaced by a pointer to member function because ranges algorithms are able to invoke those.

In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.

In BoundingBox.cpp, the lambda predicate was returning the bool element unchanged, so `std::identity` was a better fit.
2024-12-15 19:54:17 -08:00
mitaclaw 140252ffc0 Modernize `std::any_of` with ranges
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those.

In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
2024-12-15 19:54:16 -08:00
mitaclaw 860e6cf5cb Modernize `std::all_of` with ranges
In DITSpecification.cpp, MaterialAsset.cpp, and ShaderAsset.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those.

In NetPlayClient.cpp, the non-trivial `NetPlay::Player` elements were being passed by value in `NetPlayClient::DoAllPlayersHaveGame()`. This has been fixed.

In WIABlob.cpp, the second example's predicate was returning the `std::optional` by value instead of implicitly converting it to a bool. This has been fixed.
2024-12-15 19:50:34 -08:00
mitaclaw 826e2bbf98 StringUtil: More Wrappers For <cctype>
`Common::IsLower(char)` was omitted as nothing needed it.
2024-12-15 19:50:34 -08:00
Jordan Woyak b4a1967310
Merge pull request #13226 from JosJuice/achievementmanager-forward-declarations
AchievementManager: Add required forward declarations
2024-12-15 14:02:56 -06:00
JosJuice ad24ddb6bb VerifyTool: Add missing USE_RETRO_ACHIEVEMENTS ifdefs 2024-12-15 18:15:57 +01:00
JosJuice 84ab15e020 AchievementManager: Add required forward declarations
This was causing compilation errors when building without
USE_RETRO_ACHIEVEMENTS.
2024-12-15 18:00:14 +01:00
Sintendo d81213c4a5 JitArm64_Integer: Optimize subfic for -1
Another one backported from x86. Not sure why I didn't do this in #12891
already.

- Without carry
Before:
0x2a3a03fb   mvn    w27, w26
0x6b1a037b   subs   w27, w27, w26

After:
0x1280001b   mov    w27, #-0x1                ; =-1

- With carry
Before:
0x2a3b03f7   mvn    w23, w27
0x6b1b02f7   subs   w23, w23, w27
0x1a9f37f6   cset   w22, hs
0x390bd3b6   strb   w22, [x29, #0x2f4]

After:
0x12800017   mov    w23, #-0x1                ; =-1
2024-12-15 02:24:30 +01:00