Commit Graph

35082 Commits

Author SHA1 Message Date
Mai 20b13df507
Merge pull request #12179 from JosJuice/jitarm64-gp-deduplicate
JitArm64: Deduplicate the gather pipe exception check
2023-11-28 19:21:58 +01:00
Mai ac53766058
Merge pull request #12215 from JosJuice/android-si-devices
Android: Add more GameCube controller types
2023-11-28 19:21:29 +01:00
JosJuice 80171adf1e PPCTables: Retire FL_EVIL
FL_EVIL is only used for blocking instructions from being reordered.
There are three types of instructions which have FL_EVIL set:

1. CR operations. The previous commits improved our CR analysis
   and removed FL_EVIL from these instructions.
2. Load/store operations. These are always blocked from reordering
   due to always having canCauseException set.
3. isync. I don't know if we actually need to prevent reordering
   around this one, since as far as I know we only do reorderings
   that are guaranteed to not change the behavior of the program.
   But just in case, I've renamed FL_EVIL to FL_NO_REORDER instead of
   removing it entirely, so that it can be used for this instruction.
2023-11-28 18:59:34 +01:00
JosJuice f494a3d9e8 PPCAnalyst: Remove CanSwapAdjacentOps's OPCD check
Other than the CR instructions, which we now analyze properly,
all the covered instructions are not integer operations and also
have either FL_ENDBLOCK or FL_EVIL set, so there are two other
checks in CanSwapAdjacentOps that will reject them.
2023-11-28 18:59:34 +01:00
JosJuice 96d622bb61 PPCAnalyst: Run cror reordering after cmp reordering
We would rather have cror be close to the cmp than the branch.
2023-11-28 18:59:34 +01:00
JosJuice 40e0dd93be PPCAnalyst: Allow more reordering of CR operations
This is possible with the improved CR analysis implemented
in the previous commits.
2023-11-28 18:59:34 +01:00
JosJuice da63cee711 PPCAnalyst: More strict a_flags checks in CanSwapAdjacentOps
If for instance instruction a sets OE and instruction b
reads it, we shouldn't permit reordering.
2023-11-28 18:59:34 +01:00
JosJuice 8e9609df6e JitArm64: Add flush/discard support for condition registers
By flushing the condition registers as soon as we no longer
need them, we reduce the register pressure.
2023-11-28 18:59:31 +01:00
JosJuice 6cc4f593e5 PPCAnalyst: Add in-register/discard analysis for CR
This brings the analysis done for condition registers
more in line with the analysis done for GPRs and FPRs.

This gets rid of the old wantsCR member, which wasn't actually
used anyway. In case someone wants it again in the future, they
can compute the bitwise inverse of crDiscardable.
2023-11-28 18:58:47 +01:00
JosJuice d6987b98be PPCAnalyst: Perform CR analysis for crXXX 2023-11-28 18:51:03 +01:00
JosJuice 4ecdb9e57e JitArm64: Use one instruction for making NaNs quiet
Instead of materializing the quiet bit in a register and ORing the NaN
with it, we can perform an arithmetic operation on the NaN. This is a
cycle or two slower on some CPUs in cases where generating the quiet bit
pipelined well, but this is farcode that rarely runs, so instruction
fetch latency is the bigger concern. And for non-SIMD cases, we also
save a register.
2023-11-28 18:49:30 +01:00
JosJuice d5ec5c005a JitArm64: Some more FPRF optimization
By using MOVI2R+MOVI2R+CSEL in the zero case instead of doing bitwise
operations on the output of the other MOVI2R+MOVI2R+CSEL, we avoid using
BFI, an instruction that takes two cycles on most CPUs. The instruction
count is the same and the pipelining should be at least equally good.
2023-11-28 18:30:55 +01:00
JosJuice 255ee3fdce JitArm64: Use LSL+CLS for classifying floats
This is a little trick I came up with that lets us restructure our float
classification code so we can exit earlier when the float is normal,
which is the case more often than not.

First we shift left by 1 to get rid of the sign bit, and then we count
the number of leading sign bits. If the result is less than 10 (for
doubles) or 7 (for floats), the float is normal. This is because, if the
float isn't normal, the exponent is either all zeroes or all ones.
2023-11-28 18:30:45 +01:00
Zopolis4 481bc76d8e
Remove redundant 32-bit code 2023-11-28 23:03:26 +11:00
Zopolis4 f0d2ce4683
Remove _M_X86 in favour of _M_X86_64 2023-11-28 23:03:20 +11:00
Tilka ac4da97159
Merge pull request #12075 from JosJuice/gpr-block-inputs
PPCAnalyst: Fix gprBlockInputs calculation
2023-11-28 09:23:23 +00:00
Lexi Larkin 71dfa66d8b Tool/Header: Add JSON output mode; game data 2023-11-28 08:49:28 +00:00
Dentomologist becbaf50c4 OGLConfig: Only use Warn Log if OGL extensions are missing 2023-11-27 20:52:04 -08:00
Mai 9d415c1dbc
Merge pull request #12192 from JosJuice/jitarm64-nan-check
JitArm64: Check packed NaNs without using extra register
2023-11-28 04:22:27 +01:00
Mai 99cf862596
Merge pull request #12317 from JosJuice/setting-saveable-cleanup
Config: Clean up IsSettingSaveable
2023-11-28 04:20:21 +01:00
Mai 7e9c19fdb1
Merge pull request #12231 from JosJuice/jitarm64-frsqrte-optimization
JitArm64: Optimize frsqrte routine
2023-11-28 04:19:27 +01:00
Mai 731013c316
Merge pull request #12263 from Dentomologist/realtime_cheatsearch_update
CheatSearch: Automatically update Current Values
2023-11-28 04:17:06 +01:00
Mai 2869a4c168
Merge pull request #12278 from JosJuice/jitarm64-gpr-loop
JitArm64: Optimize Arm64GPRCache::FlushRegisters/FlushCRRegisters
2023-11-28 04:14:34 +01:00
Mai 6be8e63b23
Merge pull request #12306 from JosJuice/hle-discard
PPCAnalyst: Don't discard registers across HLE'd functions
2023-11-28 04:05:31 +01:00
Tilka b8a897fda7
Merge pull request #12328 from iwubcode/xf_state_manager
VideoCommon: move xf state management to its own class
2023-11-28 02:04:26 +00:00
TryTwo e5f5722497 Callstack: Bugfix. Remove double counting in loop to allow for more callstack items to be reported. 2023-11-27 14:18:25 -07:00
JosJuice 3a00ff625e PPCAnalyst: Don't discard registers across HLE'd functions
Not sure if this was causing correctness issues – it depends on whether
the HLE code was actually reading the discarded registers – but it was
at least causing annoying assert messages in one piece of homebrew.
2023-11-27 21:40:42 +01:00
JosJuice ba6fea1c81 HLE: Refactor ReplaceFunctionIfPossible 2023-11-27 21:40:42 +01:00
JosJuice be1e103435 Remove references to Debugger.ini
This file was only used by DolphinWX. DolphinQt uses Qt.ini instead.
2023-11-27 21:38:43 +01:00
JosJuice b18519320c Config: Flip the IsSettingSaveable system check
Nowadays, basically everything except for controller config is handled
by the new config system. Instead of enumerating the systems that are,
let's enumerate the systems that aren't.

I've intentionally not included Config::System::Session in the new list.
While it isn't intended to be saved, it is a setting that's fully
handled by the new config system. See
https://github.com/dolphin-emu/dolphin/pull/9804#discussion_r648949686.
2023-11-27 21:38:25 +01:00
JosJuice 5c3517c31d Config: Remove RA settings from s_setting_saveable
We can cover them using Config::System::Achievements.
2023-11-27 21:36:19 +01:00
JosJuice 51bc86fc25 Config: Remove MAIN_USE_DISCORD_PRESENCE from s_setting_saveable
It's already covered by Config::System::Main.
2023-11-27 21:36:19 +01:00
Mai d28155a7bb
Merge pull request #12265 from TryTwo/FuncFinder_bkup
CodeDiffDialog: Add saving/loading results to a file.
2023-11-27 19:00:27 +01:00
Tilka c53e29c3c8
Merge pull request #11093 from Pokechu22/disable-graphics-settings
Disable graphics settings fields when incompatible settings are enabled
2023-11-27 12:54:02 +00:00
Tilka ff6ea89036
Merge pull request #10818 from Pokechu22/icache-always-invalidate
PPCCache: Always invalidate on icbi, even if icache is disabled
2023-11-27 10:15:05 +00:00
TryTwo 0826586f96 CodeDiffDialog: Add saving/loading function finder results. 2023-11-26 21:26:58 -07:00
Mai eba2b9ab9c
Merge pull request #12279 from Dentomologist/opengl_single_core_fix_start_movie_recording_crash
Movie: Fix crash when starting input recording on OpenGL single core
2023-11-27 03:19:54 +01:00
iwubcode fb86c6342e VideoCommon: move texture dump function out of texture cache to its own free function so it can be used elsewhere. Doing this change may also slightly improve performance of this operation 2023-11-26 16:35:03 -06:00
iwubcode 095f946b66 Core: update State version due to adding XFStateManager 2023-11-26 16:30:54 -06:00
iwubcode 849a0c13b5 VideoCommon: move xf state management to its own class, so changes can be detected in places other than VertexShaderManager 2023-11-26 16:27:26 -06:00
Mai 1a2d0882d0
Merge pull request #12319 from JosJuice/jitarm64-branch-not-farcode
JitArm64: Don't use farcode for conditional branch instructions
2023-11-26 23:09:25 +01:00
Mai c8a493964a
Merge pull request #12307 from iwubcode/xxhash
Externals: update xxhash to 0.8.2 as submodule
2023-11-26 23:00:24 +01:00
Mai 10e2ad305d
Merge pull request #12316 from JosJuice/android-less-host-thread-lock
Android: Remove HostThreadLocks that are no longer needed
2023-11-26 22:56:55 +01:00
Mai 8a19be6052
Merge pull request #12321 from Dentomologist/netplay_setup_dialog_connect_tab_fix_spacing
NetPlaySetupDialog: Fix spacing in Connect tab
2023-11-26 22:51:42 +01:00
JosJuice 3d5f95b298
Merge pull request #12297 from Filoppi/improve_paper_white
Change HDR paper white default to 203 to match the ITU recommendations
2023-11-26 18:03:39 +01:00
JosJuice 166bd87f70 PowerPC: Unify "FromJit" MMU functions
This gets rid of the odd argument order we were using for JitArm64.
2023-11-26 14:51:16 +01:00
Tilka 719f1dca29
Merge pull request #12325 from Tilka/vulkan
Vulkan: use EnumMap for blend factor luts (NFC)
2023-11-26 07:12:23 +00:00
Lioncash 05015531a8 SkylanderModifyDialog: Remove unnecessary string conversions 2023-11-25 22:29:44 -05:00
Lioncash 8dfbc45df7 SkylanderModifyDialog: Mark label string as translatable
This is a user-facing string. Also fixes a nearby typo in an error
message string.
2023-11-25 22:29:41 -05:00
Lioncash cdfabb4524 SkylandersPortalWindow: Directly connect slot in CreateSlotLayout
The interface corresponds with what QCheckBox::toggled wants, so we can
use the member function directly.
2023-11-25 22:16:39 -05:00
Lioncash 24c009f7ce SkylandersPortalWindow: Mark helpers as const/static where applicable
These helpers don't directly modify class state.
2023-11-25 21:44:07 -05:00
Lioncash 6d47d6c08e SkylandersPortalWindow: Remove unnecessary string conversions
Same behavior without a bit of churn.
2023-11-25 21:33:25 -05:00
Tilka c16e98a31f
Merge pull request #12323 from lioncash/virt
CustomAssetLibrary: Add virtual destructor
2023-11-26 00:54:11 +00:00
Tillmann Karras e3b1439e1b Vulkan: use EnumMap for blend factor luts (NFC) 2023-11-26 00:36:53 +00:00
Lioncash 04011373f3 CustomAssetLibrary: Remove unnecessary qualifier in LoadInfo
The type is already in visible scope, so we don't need the rather length
qualifier.
2023-11-25 18:01:44 -05:00
Lioncash b85902ccb5 CustomAssetLibrary: Add virtual destructor
This is used as a base pointer inside CustomPipelineAction, so this
should probably really have a virtual destructor to ensure derived
objects are torn down properly.
2023-11-25 18:01:17 -05:00
Lioncash 644f7f6e55 WC24Send: Add missing header guard
Prevents double inclusions from occurring in the same TU.
2023-11-25 17:53:46 -05:00
Dentomologist 715ba3cd0f NetPlaySetupDialog: Fix spacing in Connect tab
Add a spacer between the alert text and Connect button to prevent the
alert text from migrating down with larger window heights.
2023-11-25 13:14:45 -08:00
Admiral H. Curtiss 76d605639b
Merge pull request #11881 from JosJuice/aarch64-function-call
JitArm64: Add utility for calling a function with arguments
2023-11-25 17:30:42 +01:00
JosJuice 2f407fc854 JitArm64: Don't use farcode for conditional branch instructions
The point of farcode is to provide a separate location for code that
rarely runs, so that it doesn't pollute the icache. Taking a conditional
branch is something that happens very often, so the code for that
shouldn't be in farcode.
2023-11-25 16:40:35 +01:00
JosJuice 5bda811a00 Android: Remove HostThreadLocks that are no longer needed
71ce8bb6f0 got rid of the need to be the
host or CPU thread when writing to the config.
2023-11-25 14:06:29 +01:00
Admiral H. Curtiss afb4be1a90
Merge pull request #12311 from kemenaran/fix-metal-adapter-unknown-selector
Metal: fix crash by enabling concurrent compilation only if available
2023-11-24 21:52:32 +01:00
Pierre de La Morinerie 0ecfaf3b9e
Metal: enable concurrent compilation only if available
Bug: https://bugs.dolphin-emu.org/issues/13404

On macOS 13.6 / Intel HD 5000, Dolphin crashes with this message:

> -[MTLIGAccelDevice setShouldMaximizeConcurrentCompilation:]: unrecognized selector

This should be available on all macOS 13.3+ systems – but when using OCLP drivers,
some devices use an older version of Metal.framework, which doesn't expose the selector.

This concerns Intel Ivy Bridge, Haswell and Nvidia Kepler when using OCLP on macOS 13.3
or newer.
(See
34676702f4/docs/PATCHEXPLAIN.md?plain=1#L354C1-L354C83)

As the behavior is an optional optimization anyway, perform a dynamic
detection to avoid crashing if the feature is not available.
2023-11-24 15:09:25 +01:00
Admiral H. Curtiss feeac104d8
Merge pull request #12304 from sepalani/pcap-io
BBA/HLE: Fix random PCAP file corruption
2023-11-23 19:26:00 +01:00
Sepalani 91020ac4fa BBA/HLE: Fix random PCAP file corruption
Concurrency between RecvHandlePacket and SendFromDirectFIFO
2023-11-23 22:07:44 +04:00
Admiral H. Curtiss 937cb8ef3a
Merge pull request #12299 from TryTwo/PR_bugfix_frame_advance
Core: Add option to not report state change to SetState (bugfix)
2023-11-22 23:10:51 +01:00
Admiral H. Curtiss 1cfa29f090
Merge pull request #12303 from Pokechu22/dsp-hle-aesnd-2023
DSPHLE: Support 2023 libaesnd uCode
2023-11-22 23:05:38 +01:00
Tillmann Karras 77a1eaa740 IOS: fix crash when closing invalid file descriptor
This regression was introduced in 5.0-20284.
2023-11-21 12:00:34 +00:00
Tilka f79c88f30b
Merge pull request #12302 from JosJuice/jit-replace-vectors
Jit: Get rid of short-lived std::vectors
2023-11-20 18:11:15 +00:00
iwubcode 321e5051db Externals: update xxhash to 0.8.2 as submodule; put in logic to ensure LZ4 which is also using xxhash does not clash when linking symbols 2023-11-19 14:22:59 -06:00
Pokechu22 2d7a078d53 DSPHLE: Support 2023 libaesnd uCode
Fixes https://bugs.dolphin-emu.org/issues/13401
2023-11-19 10:16:47 -08:00
JosJuice c3c0c7dc1c Jit: Get rid of short-lived std::vectors
Let's aim for making as few heap allocations as possible while jitting.
2023-11-18 23:15:37 +01:00
Tillmann Karras da1bf29722 AX: fix envelope volume for Wii ucodes
Technically it is signed in the 0x7699af32 ucode but that's only used
by the Wii Startup Disc which never uses negative values.
2023-11-16 21:43:45 +00:00
TryTwo b57ba42a55 Core::SetState() allow state to change without sending a callback.
Some state changes are meant to be near instantanoues, before switching to something else. By reporting ithe instant switch, the UI will flicker between states (pause/play button) and the debugger will unnecessarily update. Skipping the callback avoids these issues.
2023-11-16 11:07:37 -07:00
TryTwo df8c0d2b39 Core::GetState() bugfix: remove forced incorrect state on frame advance.
This was implemented to prevent UI flickering due to  the state rapidly switching between pause/play.  Recently, it has been causing issues with debugger windows, which update during frame advance.
2023-11-16 10:41:53 -07:00
Shoegzer 21e9cdfbd0 Also update IP in Android GUI 2023-11-15 13:50:54 -05:00
Shoegzer 1d848c554d Update default IP for HLE BBA 2023-11-14 15:00:06 -05:00
Filoppi a8fd938a06 Change paper white default to 203 to match the ITU 2023-11-14 20:21:34 +02:00
JosJuice 6a9f565ac4 JitArm64: Optimize Arm64GPRCache::FlushRegisters/FlushCRRegisters
This way, the number of loop iterations is equal to the number of set
bits in the bitset rather than the number of bits in the bitset,
which is a good improvement because usually very few bits are set.
2023-11-13 18:28:51 +01:00
JosJuice 2ea95f5835 JitArm64: Use BitSet8 for Arm64GPRCache::FlushCRRegisters
There are only 8 CR registers, after all.
2023-11-13 18:28:51 +01:00
Sepalani 13e76500c2 BBA/HLE: Fix GC homebrew if_config not working 2023-11-13 19:32:03 +04:00
Tilka 87c27936fc
Merge pull request #12238 from AdmiralCurtiss/achievementheaderwidget-unused-variables
DolphinQt/AchievementHeaderWidget: Remove unused member variables.
2023-11-12 21:24:17 +00:00
Tilka aa1311cd78
Merge pull request #12268 from JosJuice/fastmem-terminology
Jit: Define new terms related to fastmem
2023-11-12 19:44:45 +00:00
Tilka 166423ad61
Merge pull request #12273 from Dentomologist/dolphinqt_remove_unnecessary_qoverloads
DolphinQt: Remove unnecessary qOverloads
2023-11-12 19:43:05 +00:00
Tilka 4b38560323
Merge pull request #12282 from Wack0/mmu-tlb-patch
MMU: Use VSID in segment register as additional TLB lookup key
2023-11-12 19:41:23 +00:00
Tilka 15a3200b70
Merge pull request #12288 from Pokechu22/bp-stride-scale-fallthrough
Fix accidental fallthrough in BPStructs
2023-11-12 19:35:37 +00:00
Tilka 4285e9d8aa
Merge pull request #12276 from Tilka/ax_volume
AX: make volume field signed
2023-11-12 19:35:15 +00:00
Pokechu22 3984d1964b Fix accidental fallthrough in BPStructs
This caused us to update the indirect texture information in shaders more often than we needed to, which probably doesn't matter in practice since it's only used in ubershaders and copyyscale and stride are generally only updated before EFB/XFB copies, which generally will have other changes afterwards.
2023-11-12 10:39:56 -08:00
Tilka e7b922ee62
Merge pull request #12286 from Pokechu22/more-bp-register-descriptions
Add descriptions for more BP registers
2023-11-12 07:59:32 +00:00
Pokechu22 da8407e01c Add descriptions for more BP registers 2023-11-11 23:32:17 -08:00
Pokechu22 dfdb9a4a07 Clarify per-texture tmem information in the fifo analyzer 2023-11-11 23:32:17 -08:00
Pokechu22 ea41d0e384 Convert BPMEM_LOADTLUT1 to a struct 2023-11-11 23:32:17 -08:00
Pokechu22 2a1d445b30 Enhance description of BPMEM_PRELOAD_MODE in the fifo analyzer 2023-11-11 23:32:17 -08:00
Pokechu22 6bad17b170 Rename bpmem.copyMipMapStrideChannels to bpmem.copyDestStride
As far as I can tell, it has nothing to do with the mipmap/half_scale functionality, but does change based on the width of the destination texture (and the destination texture is half the width if half_scale is set). The comment that was there (which dates back to the initial megacommit) seems to not have accounted for the width aspect; it was first used as an actual stride in bbbe898839 (the first commit that used it at all).
2023-11-11 23:32:14 -08:00
Tillmann Karras ac9079f2ca VideoCommon: copy software renderer logic for blend mode priorities
I've not tested this on hardware, but it fixes issue 12271 (shadow
people in Deal or No Deal - Special Edition).
2023-11-12 05:51:28 +00:00
Pokechu22 9543555bfe Fix typo in comment for bpmem.texcoords 2023-11-11 16:13:37 -08:00
Rairii 2333fc2701 MMU: Use VSID in segment register as additional TLB lookup key 2023-11-11 15:59:47 +00:00
Admiral H. Curtiss f35ee22755
Merge pull request #12283 from Dentomologist/wiisocket_delete_move_assignment_operator
WiiSocket: Explicitly delete move assignment operator
2023-11-11 13:31:16 +01:00
Dentomologist 9ebd257206 WiiSocket: Explicitly delete move operators
The move assignment operator for a class is implicitly deleted when the
class has a non-static reference data member, which is true of
WiiSocket's m_socket_manager member.

Explicitly declaring the operator as default generates a
-Wdefaulted-function-deleted warning on Clang.

Delete the move constructor as well for consistency.
2023-11-10 12:56:00 -08:00
Admiral H. Curtiss 4345980b25
Merge pull request #12284 from Dentomologist/sdl_add_default_case_to_switch_statement
SDL: Add default case to switch statement
2023-11-10 21:25:40 +01:00
Dentomologist 2d3bae9c79 SDL: Add default case to switch statement
Fix -WSwitch warning about unhandled enum value SDL_NUM_LOG_PRIORITIES.

log_level is initialized to LNOTICE right before the switch statement so
this doesn't cause any behavior changes.
2023-11-10 12:05:20 -08:00
Dentomologist 1dff22d576 Movie: Fix crash when starting input recording on OpenGL single-core
Use RunOnCPUThread instead of RunAsCPUThread in BeginRecordingInput.

Most OpenGL functions require an OpenGL context to have been created on
that thread before calling the function; when that isn't the case they
return invalid results which can cause crashes when passed into other
functions.

Dolphin creates the OpenGL context in the EmuThread which then becomes
either the CPU-GPU thread or the Video thread for single and dual core
respectively. OpenGL functions must therefore be called from that
thread.

Movie::BeginRecordingInput is called from the Host thread and runs a
block of code which ultimately creates a savestate, which in turn embeds
the framebuffer which requires calling various OpenGL functions.

In single core the use of RunAsCPUThread leads to this all happening on
the Host thread, eventually leading to invalid OpenGL calls and a crash.

In Dual core the crash is avoided because VideoBackendBase::DoState uses
the AsyncRequests::DO_SAVE_STATE event which causes VideoCommon_DoState
and its subsequent OpenGL calls to safely run on the Video thread.

This commit uses RunOnCPUThread instead of RunAsCPUThread, which causes
the subsequent code to run on the CPU-GPU thread in single core which
has the valid OpenGL context and so doesn't crash.
2023-11-08 19:14:54 -08:00
Admiral H. Curtiss 620fbcdfb7
Merge pull request #12274 from JosJuice/jitarm64-non-dirty-immediates
JitArm64: Fix some oddities with non-dirty immediates
2023-11-08 20:44:32 +01:00
Rairii 18d777095b
MMU: on DSI exception, don't set store bit on read 2023-11-08 16:06:11 +00:00
JosJuice aec5238aa6
Merge pull request #12237 from AdmiralCurtiss/hard-label
DolphinQt/AchievementHeaderWidget: Fix wrong label for hard unlock count.
2023-11-06 20:22:23 +01:00
Admiral H. Curtiss 40bf452ac8
Merge pull request #12182 from JosJuice/jit64-ps-sum1
Jit64: Use MOVSD in ps_sum1 and ps_merge01
2023-11-06 14:50:33 +01:00
Tillmann Karras b8bc391d27 AX: make volume field signed
This fixes overly loud sounds in Freestyle Metal X (issue 13120).
2023-11-05 21:21:07 +00:00
Admiral H. Curtiss ec69ed2173
Merge pull request #12133 from mandar1jn/skylanders-improved-generation
Skylanders: Improve figure data view and generation
2023-11-05 18:29:19 +01:00
Admiral H. Curtiss 1748e6416f
Merge pull request #12272 from AdmiralCurtiss/dark-mode-gui
DolphinQt: Allow forcing light or dark style on Windows.
2023-11-05 18:28:59 +01:00
Admiral H. Curtiss 2f9e98b77b
DolphinQt: Check theme instead of system for when to apply dark title bars on Windows. 2023-11-05 18:13:00 +01:00
Mandar1jn afdf6de041
Skylanders: Improve figure data view and generation
Co-authored-by: deReeperJosh <joshua@dereeper.co.nz>
2023-11-05 18:06:10 +01:00
JosJuice 9a342af857
Merge pull request #12275 from JosJuice/directoryblob-comma
DiscIO: Remove unintentional use of comma operator
2023-11-05 14:40:25 +01:00
Admiral H. Curtiss ed6014ddb5
DolphinQt/InterfacePane: Rework style dropdown so the built-in light/dark style can be manually selected. 2023-11-05 12:59:32 +01:00
Admiral H. Curtiss 8f55c28472
DolphinQt/Settings: Add option to force the light or dark style on Windows. 2023-11-05 12:59:32 +01:00
Admiral H. Curtiss 6d585b6eb6
DolphinQt/Settings: Split setting of the user style into two functions.
This makes it so that if you just want to reload the current style (eg. on program start, or in response to a system event), you don't need to know the name of the currently selected user style. It's also more consistent with the way the 'userstyle/enabled' flag works.
2023-11-05 12:58:11 +01:00
Admiral H. Curtiss 9d08c8a45d
Merge pull request #12271 from TryTwo/Qt_Display_Fixes
UI, CodeDiffDialog: Fix table widget display issues, including dark style.
2023-11-05 12:53:45 +01:00
JosJuice 9c53c110f8 DiscIO: Remove unintentional use of comma operator 2023-11-05 09:24:49 +01:00
JosJuice f9dd13a309 JitArm64: Preserve dirty flag when materializing immediate
Before dbf5dca, the dirty flag had no meaning for an immediate value,
so we made sure to always set the dirty flag when switching a register
from Immediate to Register. But after dbf5dca, that is no longer the
case. If an immediate is marked as not dirty, we can keep the register
marked as not dirty after materializing the value. This way we skip
having to write it back to ppcState later.
2023-11-05 09:21:58 +01:00
JosJuice 1b7bd32ac1 JitArm64: Correctly flush non-dirty immediates
Without this change, non-dirty immediates don't actually get flushed.
This can be a problem if we for instance are flushing all registers in
order to execute an interpreter fallback. If that interpreter fallback
writes to a register that contained a non-dirty immediate, the JIT will
keep using the old value instead of loading the updated value.
2023-11-05 09:15:08 +01:00
TryTwo 2a5147a19b Dark style: add QTableCornerButton. Fix padding for tables.
CodeDiffDialog: Fix QTableWidget UI issues
2023-11-04 15:00:07 -07:00
Dentomologist 43e69d3e6a DolphinQt: Remove unnecessary qOverloads
qOverload is used to disambiguate pointers to overloaded functions, but
most of the usages in the code base were with non-overloaded functions.
2023-11-04 14:14:14 -07:00
Tilka b7b8f46832
Merge pull request #12259 from Sintendo/frsqrte-unit-test
UnitTests: Test frsqrte against known values
2023-11-04 20:10:23 +00:00
JosJuice 9cc1df6c14 JitArm64: Optimize frsqrte denormal path (in an "interesting" way) 2023-11-04 11:58:03 +01:00
JosJuice 9b21046dfc JitArm64: Read X1 instead of X3 in frsqrte denormal path
If we hit the denormal path, the sign and exponent are guaranteed to be
0, which means X1 and X3 have the same value.
2023-11-04 11:58:03 +01:00
JosJuice 9807cf0b82 JitArm64: Stop using X4 in frsqrte
This required a change in the denormal path where, instead of
subtracting 11 before shifting left, we shift left immediately and then
shift right by 11. This shouldn't affect performance.
2023-11-04 11:58:03 +01:00
JosJuice 4b2f73774f JitArm64: Optimize frsqrte denormal path
Now that the normal path is no longer reading X2 and X3, it doesn't
matter what the denormal path writes to them.
2023-11-04 11:58:03 +01:00
JosJuice e5bd8019f6 JitArm64: Read X1 instead of X3 in frsqrte normal path
With this, the normal path is no longer reading the value in X3,
which opens up for the next commit.
2023-11-04 11:57:59 +01:00
JosJuice 31d751b6da JitArm64: Read X1 in frsqrte normal path
Instead of combining X2 (the exponent) and X3 (the mantissa) using an
ORR instruction, we can read X1, which already contains both.

This requires us to reconstruct X1 in the denormal path, but that's
an acceptable price.
2023-11-04 11:56:15 +01:00
Admiral H. Curtiss b181842092
Netplay: Fix building on clang 17. 2023-11-03 16:15:04 +01:00
Admiral H. Curtiss 7dae4dd3d2
Merge pull request #12266 from noahpistilli/kd-junk-data
IOS/KD: Disable download and mail when files are invalid
2023-11-03 15:27:44 +01:00
Sketch ad2044993d IOS/KD: Disable download and mail when files are invalid 2023-11-02 22:05:56 -04:00
JosJuice 482da7975b Jit: Define new terms related to fastmem
Dolphin's JITs have a minor terminology problem: The term "fastmem" can
refer to either the system of switching between a fast path and a slow
path using backpatching, or to the fast path itself. To hopefully make
things clearer, I'm adding some new terms, defining the old and new
terms as follows:

Fastmem: The system of switching from a fast path to a slow path by
backpatching when an invalid memory access occurs.

Fast access: A code path that accesses guest memory without calling C++
code.

Slow access: A code path that accesses guest memory by calling C++ code.
2023-11-02 21:30:12 +01:00
Admiral H. Curtiss b4c0da30bd
Merge pull request #12244 from DacoTaco/feature/crypto
IOS: implement /dev/aes & /dev/sha
2023-11-02 19:36:40 +01:00
DacoTaco 2241aaf168 IOS: implement /dev/aes 2023-11-01 22:08:39 +01:00
DacoTaco d4c18f3f31 IOS: implement /dev/sha 2023-11-01 22:08:39 +01:00
JosJuice 13c70eeb31
Merge pull request #12257 from Wack0/patch-1
JIT64 (Jit_Integer): for twx instructions, raise exception with correct SRR0
2023-11-01 21:10:39 +01:00
JosJuice c248a69268 JitArm64: Add utility for calling a function with arguments
With this, situations where multiple arguments need to be moved
from multiple registers become easy to handle, and we also get
compile-time checking that the number of arguments is correct.
2023-11-01 19:01:58 +01:00
Admiral H. Curtiss 17122f171a
Merge pull request #12260 from Pokechu22/multiple-fifo-recording-regression
Fix regression when recording multiple fifologs
2023-11-01 12:01:52 +01:00
Admiral H. Curtiss ff009dd8b5
Merge pull request #12258 from skyfloogle/traversal-logging
Netplay: Don't log skippable events as errors
2023-11-01 11:56:39 +01:00
Dentomologist 9230266529 CheatSearchWidget: Add checkbox to toggle Current Value autoupdate 2023-10-31 17:35:14 -07:00
Dentomologist fdb7328c73 CheatSearch: Update Current Values at end of frame
At the end of each frame automatically update the Current Value for
visible table rows in the selected and visible CheatSearchWidget (if
any). Also update all Current Values in all CheatSearchWidgets when the
State changes to Paused.

Only updating visible table rows serves to minimize the performance cost
of this feature. If the user scrolls to an un-updated cell it will
promptly be updated by either the next VIEndFieldEvent or the State
transitioning to Paused.
2023-10-31 17:34:31 -07:00
JosJuice d04e67be3d Add fastmem arena setting
Just for debugging.
2023-10-31 19:43:49 +01:00
JosJuice 8686536d7d Jit: Always initialize fastmem arena
If dcache is enabled when the game starts, initializing the fastmem
arena is still useful in case the user changes the dcache setting.
And initializing it doesn't really cost anything.
2023-10-31 19:43:49 +01:00
JosJuice 0606433404 JitArm64: Check fastmem instead of fastmem_arena
Preparation for the next commit.

JitArm64 has been conflating these two flags. Most of the stuff that's
been guarded by fastmem_arena checks in fact requires fastmem.

When we have fastmem_arena without fastmem, it would be possible to do
things a bit more efficiently than what this commit does, but it's
non-trivial and therefore I will leave it out of this PR. With this
commit, we effectively have the same behavior as before this PR - plus
the added ability to toggle fastmem with a cache clear.
2023-10-31 19:43:49 +01:00
JosJuice b3bfcc5d7f PowerPC: Allow toggling write-back cache during emulation
Now that PR 10575 is merged, the JIT automatically clears its cache
when this setting is changed, making this reasonable to implement.
2023-10-31 19:43:49 +01:00
JosJuice 899d61bc7d Jit64: Recompile asm routines on cache clear
This is needed so that the checks added in the previous commit will be
reevaluated if the value of m_enable_dcache changes.

JitArm64 was already recompiling its asm routines on cache clear by
necessity. It doesn't have the same setup as Jit64 where the asm
routines are in a separate region, so clearing the JitArm64 cache
results in the asm routines being cleared too.
2023-10-31 19:43:49 +01:00
JosJuice 5e74a8b850 Jit64: Don't make use of fastmem arena when dcache is enabled
Some code paths in EmuCodeBlock.cpp that were checking fastmem_arena
should really also be checking m_enable_dcache.

Because JitArm64 centralizes more or less all memory access to the
EmitBackpatchRoutine function and because that function already
contained a check, JitArm64 works fine without the additional checks
added by this commit. Regardless, I added the checks to MMU.cpp instead
of EmuCodeBlock.cpp where applicable so they would be available to
JitArm64. Maybe one day JitArm64 will need them if its code gets
restructured.
2023-10-31 19:43:40 +01:00
JosJuice b32ac9353e
Merge pull request #12262 from AdmiralCurtiss/last-state-order-refactor
Core/State: Refactor logic for determining the relative age of existing savestates.
2023-10-31 19:39:47 +01:00
Dentomologist 74d3ba7c46 Cheats Manager: Fix factory widget spacing
Add stretch to bottom of factory widget to prevent the Data Type
QGroupBox from getting stretched out awkwardly.
2023-10-30 17:44:39 -07:00
Dentomologist 7dfb23d38c CheatSearchWidget: Don't recreate table when refreshing values
The table only needs to be recreated when the displayed addresses might
change. If we're just refreshing the current values then update those
table cells and leave the rest of the table alone.
2023-10-30 17:18:18 -07:00
Sintendo ef7f3b5bac UnitTests: Test ApproximateReciprocalSquareRoot 2023-10-30 22:39:12 +01:00
Dentomologist fa7c969e15 CheatSearch: Use index range for ClonePartial
Specify the begin and end indices instead of filling a vector with all
the indices which are continuous anyway.
2023-10-30 12:58:38 -07:00
Admiral H. Curtiss 437946fb1a
Core/State: Refactor logic for determining the relative age of existing savestates.
The code previously did this indirectly via `std::map<double, int>`, the key being the timestamp, which required a questionable workaround for the case where multiple states have the same timestamp. By having a particular combination of timestamps in the on-disk savestates, you could cause this workaround to infinitely loop, locking up Dolphin. This avoids this completely by refactoring the logic and just using `std::vector` instead.
2023-10-30 19:19:01 +01:00
Admiral H. Curtiss 99a3bbc055
Core/State: Return an empty string on invalid input to SystemTimeAsDoubleToString(). 2023-10-30 19:19:01 +01:00
Admiral H. Curtiss 03f8ec09eb
Merge pull request #12261 from TryTwo/Bugfix_GetAddress
PPCDebugInterface:  Tweak regex in GetMemoryAddressFromInstruction to fix bugs
2023-10-30 10:49:13 +01:00
Admiral H. Curtiss 045868bbb4
Merge pull request #12256 from malleoz/savestate_read_header_fix
Core: Fix UI slowdown for savestate timestamp reads
2023-10-30 10:45:14 +01:00
TryTwo 490e4b78a7 Bugfixes for PPCDebugInterface::GetMemoryAddressFromInstruction
FromChars cannot return a value prefixed with 0x.
Possible regex failures on rX, rY, rZ
2023-10-29 22:54:45 -07:00
Pokechu22 35831f342e Fix regression when recording multiple fifologs
Since ccf92a3e56, recording fifologs multiple times after launching dolphin caused all initial state to not be saved (the initial contents of bpmem, cpmem, etc were all zeroed out). For some games, this was not noticeable, as most registers were set each frame, but for others, this resulted in completely broken fifologs. (Note that recording fifologs also required 05181f6b88 and 9e0755a598 to be cherry-picked due to other, since fixed, regressions.)

This was because previously, `Renderer::CheckFifoRecording` was called every frame, but ccf92a3e56 changed it into a callback (`m_end_of_frame_event`) that was removed when recording ended. Thus, before, `OpcodeDecoder::g_record_fifo_data = IsRecording()` was called when `IsRecording()` returned false, but after that commit `g_record_fifo_data` never got changed back to false, so the check for `was_recording` only ever passed on the first fifolog recorded (even after stopping and starting a game).

There may still be another issue lurking, as I'm not sure if all broken fifologs were caused by recording multiple fifologs (for instance, on https://bugs.dolphin-emu.org/issues/13377, only one fifolog was initially uploaded, but it was affected by an issue with the same symptoms as this).
2023-10-29 15:23:31 -07:00
Floogle bee6d5bfb6 Netplay: Don't log skippable events as errors 2023-10-28 18:06:07 +02:00
Tilka 2ccc2bfb2e
Merge pull request #12250 from Sintendo/dcbx-nit
Jit_LoadStore: Minor dcbx register optimizations
2023-10-28 02:33:51 +01:00
Tilka 9bea807732
Merge pull request #12249 from Sintendo/frsqrte-nit
PowerPC: Negate m_dec values in frsqrte table
2023-10-28 02:15:05 +01:00
Tilka 2212a5b225
Merge pull request #12254 from AdmiralCurtiss/savestate-no-xfb-stride
VideoCommon: Don't swap on state load when there's no XFB.
2023-10-28 02:14:30 +01:00
Tilka 7c243a110a
Merge pull request #12253 from TellowKrinkle/AsahiGL
Fix shader compiles on Asahi Linux
2023-10-28 02:12:40 +01:00
Tilka ef447bb40b
Merge pull request #12248 from Dentomologist/cheatsearch_use_std_comparison_functions
CheatSearch: Use std comparison function objects
2023-10-28 02:11:18 +01:00
Tilka ce895f1205
Merge pull request #12255 from jordan-woyak/sdl-360
ControllerInterface/SDL: Remove Xbox 360 controller disabling hack.
2023-10-28 02:10:46 +01:00
Rairii c9cd0b626b
JIT64: for twx instruction, raise exception with correct SRR0 2023-10-27 13:27:36 +01:00
sowens99 cddc75c28b Core: Fix UI slowdown for savestate timestamp reads 2023-10-26 22:32:47 -04:00
Jordan Woyak 30ce1f2ec2 ControllerInterface/SDL: Remove Xbox 360 controller disabling hack. 2023-10-26 18:04:11 -05:00
Admiral H. Curtiss 4f0c8b1657
VideoCommon: Don't swap on state load when there's no XFB.
This triggers an assert in TCacheEntry::SetXfbCopy() otherwise if you load a savestate that was made before the first XFB has been rendered.
2023-10-25 18:24:42 +02:00
TellowKrinkle 4f2a79058a VideoBackends:OGL: Handle when SSBOs are only supported in some shader stages 2023-10-25 17:47:04 +02:00
TellowKrinkle 323aea60d6 VideoCommon: Fix VS point/line on older GLSL 2023-10-24 23:18:01 -05:00
Sintendo 171f76ae07 Jit_LoadStore: Another minor dcbx optimization
The multiplication needs the value from RSCRATCH2, but shouldn't
overwrite it as it is still needed later. The original code solved this
by copying RSCRATCH2 to another register first.

As it turns out, the other register involved in the multiplication can
safely be overwritten, so we can swap the operands around and use
RSCRATCH2 directly without making a copy.

Before:
33 D2                xor         edx,edx
8B 45 64             mov         eax,dword ptr [rbp+64h]
85 C0                test        eax,eax
7E 30                jle         000002D4DF373F6B
44 8B B5 D4 02 00 00 mov         r14d,dword ptr [rbp+2D4h]
44 8B E8             mov         r13d,eax
BF 07 00 00 00       mov         edi,7
F7 F7                div         eax,edi
41 8D 56 FF          lea         edx,[r14-1]
3B C2                cmp         eax,edx
0F 42 D0             cmovb       edx,eax
44 2B F2             sub         r14d,edx
44 89 B5 D4 02 00 00 mov         dword ptr [rbp+2D4h],r14d
8B C2                mov         eax,edx
0F AF C7             imul        eax,edi
44 2B E8             sub         r13d,eax
44 89 6D 64          mov         dword ptr [rbp+64h],r13d
44 8D 72 01          lea         r14d,[rdx+1]

After:
33 D2                xor         edx,edx
8B 45 64             mov         eax,dword ptr [rbp+64h]
85 C0                test        eax,eax
7E 2E                jle         0000021C01013F69
44 8B B5 D4 02 00 00 mov         r14d,dword ptr [rbp+2D4h]
44 8B E8             mov         r13d,eax
BF 07 00 00 00       mov         edi,7
F7 F7                div         eax,edi
41 8D 56 FF          lea         edx,[r14-1]
3B C2                cmp         eax,edx
0F 42 D0             cmovb       edx,eax
44 2B F2             sub         r14d,edx
44 89 B5 D4 02 00 00 mov         dword ptr [rbp+2D4h],r14d
0F AF FA             imul        edi,edx
44 2B EF             sub         r13d,edi
44 89 6D 64          mov         dword ptr [rbp+64h],r13d
44 8D 72 01          lea         r14d,[rdx+1]
2023-10-24 00:42:35 +02:00
Dentomologist 3ba5cd30ff SkylanderPortal: Make protected variables private
SkylanderPortal is final, so having member variables be protected
instead of private is just misleading.
2023-10-22 12:00:49 -07:00
Sintendo dd58a8d65e Jit_LoadStore: Minor dcbx register optimization
Instructions referencing registers r8-r15 take an additional byte to
encode. `reg_downcount` may be assigned to one of these registers, so it
is a small size win to store the downcount value in `RSCRATCH` first.

Before:
33 D2                xor         edx,edx
44 8B 6D 64          mov         r13d,dword ptr [rbp+64h]
45 85 ED             test        r13d,r13d
7E 30                jle         0000023546B43F6D
44 8B B5 D4 02 00 00 mov         r14d,dword ptr [rbp+2D4h]
41 8B C5             mov         eax,r13d
BF 07 00 00 00       mov         edi,7
F7 F7                div         eax,edi

After:
33 D2                xor         edx,edx
8B 45 64             mov         eax,dword ptr [rbp+64h]
85 C0                test        eax,eax
7E 30                jle         000001AFBBAE359D
44 8B B5 D4 02 00 00 mov         r14d,dword ptr [rbp+2D4h]
44 8B E8             mov         r13d,eax
BF 07 00 00 00       mov         edi,7
F7 F7                div         eax,edi
2023-10-22 15:13:52 +02:00
Sintendo 3c3168706c PowerPC: Negate m_dec values in frsqrte table
This value is used in a multiplication. The result of this
multiplication is then subtracted from m_base. By negating m_dec, we are
free to use an addition instead.

On x64, this saves an instruction.
2023-10-21 21:08:21 +02:00
Dentomologist c5a8a3fd4a CheatSearch: Use std comparison function objects 2023-10-20 16:05:47 -07:00
LillyJadeKatrin db78437498
Refactored welcome message to render after game start
Split the "welcome" messages letting players know achievements are active into a separate method that gets called (currently) after a number of frames to ensure that the emulator has started properly and has somewhere to display the messages.
2023-10-19 19:21:12 +02:00
LillyJadeKatrin a3d561fdff
Add badges to achievement messages
Updated OSD::AddMessage calls for achievements and game start to pass in the badges intended to be shown.
2023-10-19 19:13:20 +02:00
Admiral H. Curtiss c87b2e46b4
Merge pull request #12242 from AdmiralCurtiss/osd-icons
VideoCommon: Add support for icons in OSD messages.
2023-10-17 12:46:36 +02:00
Admiral H. Curtiss 53ea7aee1b
Merge pull request #12239 from AdmiralCurtiss/achievementprogresswidget-clearlayout
DolphinQt/AchievementProgressWidget: Use ClearLayoutRecursively() to clear layout.
2023-10-17 12:45:40 +02:00
Admiral H. Curtiss cb13ad7a5f
VideoCommon: Add support for icons in OSD messages. 2023-10-17 02:47:29 +02:00
iwubcode b292022bc7 VideoCommon: use ToLower function in assets when parsing json, for proper locale independent behavior 2023-10-16 19:23:00 -05:00
iwubcode fec2a8af8c VideoCommon: add additional properties to ShaderAsset to support custom shader uniforms 2023-10-16 19:02:27 -05:00
Admiral H. Curtiss 3873664143
DolphinQt/AchievementProgressWidget: Use ClearLayoutRecursively() to clear layout. 2023-10-15 22:54:40 +02:00
LillyJadeKatrin b824d55093
Add Leaderboards tab to Achievement dialog
A new tab is added to the Achievements dialog to chart out the leaderboards in a table. Each row of the table contains the leaderboard information and up to four relevant entries, varying based on how many entries are in the leaderboard, whether or not the player has a submitted score, and where in the leaderboard the player's score is.
2023-10-15 21:28:40 +02:00
LillyJadeKatrin 04df930e0d
Added FetchBoardInfo to AchievementManager
FetchBoardInfo is called (via the work queue asynchronously) on a leaderboard every time it is activated or submitted to. It makes two calls to the RetroAchievements API for fetching leaderboard info, one that requests the top four entries in the leaderboard and another that requests the player's entry, the two entries above the player and the two entries below. All of these are inserted into a single map (resolving any overlaps) so the result can be exposed to the UI.
2023-10-15 21:28:40 +02:00
LillyJadeKatrin 61dded7043
Added Leaderboard info map to AchievementManager
The leaderboard map created here contains information useful to displaying leaderboard stats in the Achievement dialog, including each leaderboard's name and description and a partial list of entries for display. The entire map is exposed to the UI in a single call for simplicity.
2023-10-15 21:28:40 +02:00
Admiral H. Curtiss daf9ff012a
Merge pull request #12229 from AdmiralCurtiss/achievement-load-async-lock
AchievementManager: Call ActivateDeactivateLeaderboards() and ActivateDeactivateRichPresence() under lock.
2023-10-15 21:27:41 +02:00
Admiral H. Curtiss 1645b1ed62
AchievementManager: Call ActivateDeactivateLeaderboards() and ActivateDeactivateRichPresence() under lock.
Both of these functions access `m_game_data` and don't lock themselves, so they must be called in a way that guarantees that `m_game_data` is not modified during the call.
2023-10-15 18:59:36 +02:00
Admiral H. Curtiss ab562553f6
DolphinQt/AchievementHeaderWidget: Remove unused member variables. 2023-10-15 18:56:28 +02:00
Admiral H. Curtiss 923fc00777
DolphinQt/AchievementHeaderWidget: Fix wrong label for hard unlock count. 2023-10-15 18:42:03 +02:00
Admiral H. Curtiss 4b2dad074a
DolphinQt: Move GraphicsModListWidget::ClearLayoutRecursively() to QtUtils. 2023-10-15 18:39:05 +02:00
Admiral H. Curtiss 2677fd9a8e
Merge pull request #12185 from iwubcode/custom_shader_uniform_backend_support
VideoBackends / VideoCommon: add support for custom shader uniforms to D3D, Vulkan, OGL
2023-10-15 00:21:56 +02:00
Dentomologist b2a8f7e276 IOS: Convert ObjectSubType to enum class 2023-10-11 14:21:29 -07:00
Admiral H. Curtiss 111c1ab531
AchievementManager: Don't store pointer to rc_runtime_event_t in lambda.
Scope issue in the event callback from `rc_runtime_do_frame()`. The pointer points to a variable on the stack from inside `rc_runtime_do_frame()`, so that's a race condition between the thread calling `rc_runtime_do_frame()` and the event queue thread.
2023-10-11 10:32:11 +02:00
iwubcode b251194a7e VideoCommon: wait for the GPU to be finished doing any work before invalidating pipelines when graphic config changes 2023-10-10 18:17:24 -05:00
Admiral H. Curtiss 6aadfd522b
Merge pull request #12225 from AdmiralCurtiss/resolution-dropdown-fix
Qt/EnhancementsWidget: Fix size of resolution dropdown.
2023-10-10 19:29:22 +02:00
iwubcode 0e8f8ea930 VideoCommon: instead of using 'CustomTextureData' directly, use 'TextureData' for texture assets, this allows us to provide additional metadata for textures. Such as a sampler or type information (to distinguish cube maps) 2023-10-10 09:58:14 -05:00
Admiral H. Curtiss 7b32530de6
Qt/EnhancementsWidget: Fix size of resolution dropdown. 2023-10-10 15:03:49 +02:00
Admiral H. Curtiss 1b7a590b4b
Merge pull request #12209 from JosJuice/frsqrte-exp-lsb
PowerPC: Flip the order of frsqrte_expected
2023-10-10 10:38:07 +02:00
Admiral H. Curtiss 410ec83575
Merge pull request #12213 from dreamsyntax/128_CODE_SIZE_AND_FARCODE_SIZE
Jit64: Increase farcode & nearcode cache size
2023-10-10 10:35:23 +02:00
Admiral H. Curtiss 9ebb52537e
Merge pull request #12217 from malleoz/savestate_lz4
Savestates: Use LZ4 algorithm for faster decompression
2023-10-10 10:34:38 +02:00
sowens99 1eaa9380dd Savestates: Use LZ4 algorithm for faster decompression 2023-10-08 20:45:49 -04:00
Nicola Vella b506bdc401
Fix heap buffer overflow in GCMemcardRaw 2023-10-08 15:13:41 +02:00
Nicola Vella 31dfb53152 Fix heap buffer overflow in GCMemcardRaw 2023-10-06 19:30:03 +02:00
iwubcode 713454b7d7 Metal: update binding mapping for SPRV due to change for custom shader uniforms in other backends (Metal is still not supported)
Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
2023-10-06 02:17:43 -05:00
iwubcode a099f4f41b VideoCommon: given the changes to pipeline interaction, update the global version variable to reflect those changes and force pipelines to be rebuilt 2023-10-06 02:17:43 -05:00
iwubcode 751356af47 VideoCommon: avoid Vulkan validation errors when custom shader ubo isn't set up
Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
2023-10-06 02:17:43 -05:00
iwubcode b6d321bfb1 VideoBackends / VideoCommon: add new uniform buffer object for custom shader materials (slot 3, geometry shader buffer moves to slot 4 if available) 2023-10-06 02:17:42 -05:00
iwubcode 92accc3ef7 VideoCommon: add custom pixel shader constants as a buffer of data to be passed to all backends 2023-10-05 21:20:16 -05:00
Filoppi 8027c88e58 Video: add support for 12x resolution multiplier 2023-10-06 01:12:10 +03:00
dreamsyntax 219610d8a0 Jit64: Increase nearcode/farcode size 2023-10-04 13:05:09 -07:00
Admiral H. Curtiss beebe0a200
Core/BBA/BuiltIn: Replace IP_PROTOCOL with IPV4_ETHERTYPE to avoid conflict with Linux headers. 2023-10-04 16:13:16 +02:00
Admiral H. Curtiss 68c9362449
Merge pull request #12089 from stblr/gamecube-zelda-hle-in-wii-mode
GameCube Zelda HLE in Wii mode
2023-10-04 06:57:01 +02:00
sowens99 69ec239a1f Add lz4 submodule 2023-10-02 17:28:23 -04:00
Admiral H. Curtiss da6339a722
Merge pull request #12026 from LillyJadeKatrin/retroachievements-measured
RetroAchievements - Progress Notifications
2023-10-01 19:25:02 +02:00
JosJuice d811c12196 Android: Add more GameCube controller types
For all your PSO needs.
2023-10-01 18:47:49 +02:00
JosJuice d6c0f8e749 Android: Get profile name from core
To avoid duplicating information between Kotlin and C++.
2023-10-01 18:47:49 +02:00
JMC47 cd366c4f46
Merge pull request #12036 from LillyJadeKatrin/deep-copy-volume
Added CopyReader to BlobReader and all subclasses
2023-10-01 11:39:37 -04:00
LillyJadeKatrin 6b110bb6fe Added Progress switch to Achievements dialog
Added a switch for the progress messages to the settings tab of the Achievements dialog.
2023-10-01 11:24:48 -04:00
LillyJadeKatrin 6d96b7173e Handle Achievement Progress Event
Added handling to Achievement Progress Events, which are generated when an achievement with a Measured field updates in value. For example, an achievement for collecting 120 stars will throw this event when the player collects each star, and with this handling, the player will get a message on screen informing them of this progress. This message will only appear if the newly added RA_PROGRESS_ENABLED setting is true.
2023-10-01 11:24:48 -04:00
LillyJadeKatrin c8b1379113 Added error checking and logging to AchievementManager::GetAchievementProgress. 2023-10-01 10:27:57 -04:00
Admiral H. Curtiss b2e016f012
Merge pull request #12214 from JosJuice/android-backtick
Android: Remove a stray backtick
2023-10-01 16:05:02 +02:00
Admiral H. Curtiss 404a47af77
Merge pull request #12025 from LillyJadeKatrin/retroachievements-badges
RetroAchievements - Badges
2023-10-01 15:55:13 +02:00
LillyJadeKatrin 335cf4f2db Added CopyReader to BlobReader and all subclasses
A deep-copy method CopyReader has been added to BlobReader (virtual) and all of its subclasses (override). This should create a second BlobReader to open the same set of data but with an independent read pointer so that it doesn't interfere with any reads done on the original Reader.

As part of this, IOFile has added code to create a deep copy IOFile pointer onto the same file, with code based on the platform in question to find the file ID from the file pointer and open a new one. There has also been a small piece added to FileInfo to enable a deep copy, but its only subclass at this time already had a copy constructor so this was relatively minor.
2023-10-01 09:04:06 -04:00
JosJuice d8e00c98e8 Android: Remove a stray backtick 2023-10-01 13:37:04 +02:00
LillyJadeKatrin 63c407ad7c Add toggle button for badges to achievement settings
Button toggles whether badges are downloaded. When turned on, makes a call to AchievementManager to download badges.
2023-09-30 23:29:02 -04:00
LillyJadeKatrin 80d77cfdad Added colored borders to badges in achievements dialog
The achievement badges will now have a blue or gold border to identify whether they have been unlocked in softcore or hardcore mode. Similarly, the game badge will have a blue border if all achievements have been unlocked in either mode or a gold border if all achievements have been unlocked in hardcore mode.
2023-09-30 23:29:02 -04:00
LillyJadeKatrin ba83efded6 Added badges to achievement progress tab
Provided the badges are turned on in the settings, each achievement will have a badge next to it on the progress tab. There are different badges for locked and unlocked (usually locked is grayscale while unlocked is in color but not necessarily) and the badge chosen depends on the player's current unlock and hardcore status.
2023-09-30 23:29:02 -04:00
LillyJadeKatrin 0715da2d68 Added player and game badges to Achievements dialog header
Provided badges are turned on, if there's a player logged in their RetroAchievements icon will appear next to their player info in the header of the Achievements dialog. If they're playing a game, so will the icon for the game. Also performed some refactoring and reorganizing to the header as a whole so that it looks consistent whether a game is running or not.
2023-09-30 23:29:02 -04:00
LillyJadeKatrin fd50b1fda6 Added FetchBadges to AchievementManager
FetchBadges fetches all available badges (player, game, achievements) and stores them in AchievementManager's memory. New fields and accessors have been added as necessary. Badges for individual achievements are stored in the UnlockStatus map. The method is public so that the settings dialog can call it if badges are turned on after a game is started. Badges are deleted at game close and logout.
2023-09-30 14:18:15 -04:00
JosJuice 02d76ba2a0 Jit: Fix fastmem initialization order
When evaluating whether jo.fastmem should be set to true, we check the
value of jo.fastmem_arena. However, due to a change made in 28e8117b90,
jo.fastmem_arena wasn't set until after the first time we set
jo.fastmem, so jo.fastmem would end up always being false until the next
time RefreshConfig was called.

Fixes https://bugs.dolphin-emu.org/issues/13364.
2023-09-30 16:16:54 +02:00
JosJuice 9e0fea8fc7 PowerPC: Flip the order of frsqrte_expected
This makes the the frsqrte routines one instruction shorter.
2023-09-30 11:41:27 +02:00
Pablo Stebler cc403c1044
DSPHLE: handle offsets to a different memory region 2023-09-29 20:48:10 +02:00
Pablo Stebler 8cdad9ce8c
DSPHLE: map memory based on console mode 2023-09-29 20:48:10 +02:00
Admiral H. Curtiss 7c995000ae
Merge pull request #12206 from malleoz/ppc_reg_location_assert_improvement
PowerPC: reduce location assert cost
2023-09-29 20:08:05 +02:00
LillyJadeKatrin 6541aa206d Added RequestImage to AchievementManager
Image requests from RetroAchievements have a slightly different format from other requests, on account of being GET calls that return strings of image data, so this is a separate function that makes such calls. To handle this, I create a BadgeStatus object that ties each badge to a boolean flag for whether it is loaded and thus usable.
2023-09-28 22:47:15 -04:00
sowens99 60e331e2e1 PowerPC: reduce location assert cost 2023-09-28 19:57:03 -04:00
Admiral H. Curtiss a310b32525
Merge pull request #12207 from malleoz/decrease_emulation_speed_rollover_fix
DolphinQt: Fix decrease emulation speed hotkey rollover
2023-09-28 21:55:15 +02:00
Admiral H. Curtiss 908f90191d
Merge pull request #12204 from LillyJadeKatrin/retroachievements-bugfix
Retroachievements bugfix
2023-09-28 21:31:43 +02:00
LillyJadeKatrin 50f04ea456 Refactored FetchGameData to incorporate the request directly instead of a different method, so that game_data can be processed directly under a lock. 2023-09-28 00:57:22 -04:00
LillyJadeKatrin 6036a6db55 Updated AchievementManager StartRASession to properly lock inputs and outputs without locking during the network call. 2023-09-28 00:55:58 -04:00
LillyJadeKatrin 7153284e9f Updated AchievementManager ResolveHash to properly lock inputs and outputs without locking during the network call. 2023-09-28 00:55:58 -04:00
LillyJadeKatrin a29ec7d956 Updated AchievementManager VerifyCredentials to properly lock inputs and outputs without locking during the network call. 2023-09-28 00:55:58 -04:00
LillyJadeKatrin 3c564078cd Added AchievementManager ResponseType EXPIRED_CONTEXT for when operation inputs change between when an operation is queued and executed, and MALFORMED_OBJECT for when an rcheevos process method goes wrong. 2023-09-28 00:55:58 -04:00
LillyJadeKatrin 31091fc975 Added GameLoaded check to AchievementProgressWidget. 2023-09-28 00:55:58 -04:00
LillyJadeKatrin b53962fd23 Cleaned up some issues with AchievementManager::CloseGame. 2023-09-28 00:55:57 -04:00
Admiral H. Curtiss 45c8597082
Merge pull request #12201 from fabricecaruso/master
SaveStates : Fix MainWindow.m_state_slot is not restored from Qt.ini Emulation/StateSlot.
2023-09-28 05:30:48 +02:00
Admiral H. Curtiss 5b6844901f
Merge pull request #12205 from LillyJadeKatrin/retroachievements-bugfix-2
AchievementsWindow: Fix rapid popups on initial opening.
2023-09-28 04:21:48 +02:00
Admiral H. Curtiss a7c5f2fd14
Merge pull request #12200 from itsmattkc/pipe-fifo-fix
FileUtil: Don't try to retrieve size for FIFO pipe
2023-09-28 04:14:41 +02:00
Fabrice CARUSO 2b2fd4217e
SaveStates: Fix MainWindow.m_state_slot is not restored from Qt.ini Emulation/StateSlot.
Select slot 2 and exit & launch Dolphin again. Slot 2 is selected in the menu, but saving from selected slot saves to slot 1.
2023-09-28 04:12:49 +02:00
Admiral H. Curtiss 53df01f7d8
Merge pull request #12172 from ArcaneNibble/sd
Steam Deck: Periodically reenable gyro
2023-09-28 04:10:27 +02:00
sowens99 eac318a1d8 DolphinQt: Fix decrease emulation speed hotkey rollover 2023-09-27 21:40:16 -04:00
LillyJadeKatrin 2a9121b66f Reorganized the first-round AchievementsWindow startup to prevent items from being visible before their parents, thus getting rid of the rapid popups. 2023-09-26 23:31:04 -04:00
deReeperJosh d0de837efd HIDv4: Check Device Not Null Before Attaching 2023-09-26 18:10:29 +01:00
MattKC e16753472c
FileUtil: Don't try to retrieve size for FIFO pipe 2023-09-24 19:36:15 -07:00
Sketch def6cb0155 IOS/KD: Fix crash with KD Scheduler 2023-09-24 20:37:20 -04:00
Admiral H. Curtiss 15f42eb5d8
Merge pull request #12195 from LillyJadeKatrin/retroachievements-logging
Added log statements across AchievementManager.
2023-09-24 17:13:36 +02:00
JosJuice 117bfd326d
Merge pull request #12197 from t895/double-numeric-settings-fix
Android: Float slider settings fix
2023-09-24 15:33:24 +02:00
Admiral H. Curtiss c67cd65b53
Merge pull request #12190 from AdmiralCurtiss/fmt10
Update fmt to 10.1.1
2023-09-24 00:05:00 +02:00
Admiral H. Curtiss c0f690b780
Merge pull request #12193 from malleoz/malleo/mem2_search
Debugger/Memory: Fix mem2 search
2023-09-24 00:02:18 +02:00
Charles Lombardo fa37336ba3 Android: Adjust settings slider dialog
Move text above slider
2023-09-23 10:58:29 -04:00
Charles Lombardo f205a20d3f Android: Use 0.5 unit step size and show decimal for numeric settings
In some settings where the default value could not be evenly divided by the step size for the slider, there would be a crash. This increases the precision of all double numeric settings to 0.5 and now shows the decimal that you couldn't see before.
2023-09-23 10:48:23 -04:00
LillyJadeKatrin da00191eb6 Added log statements across AchievementManager. 2023-09-23 01:32:43 -04:00
sowens99 98dd10a716 Debugger/Memory: Fix unable to search mem2 2023-09-21 23:54:07 -04:00
JosJuice 24950ce0e0 JitArm64: Check packed NaNs without using extra register
A small optimization for AccurateNaNs.
2023-09-21 18:19:12 +02:00
JosJuice 8dbbae76de Jit64: Optimize ps_merge01 with Rd == Rb 2023-09-21 18:03:39 +02:00
get 63467559b2
fmt 10.0.0-10.1.1 compile fixes
Implicit conversion operators and enums was removed for parity with std::format (fce74caa15).
2023-09-21 01:19:23 +02:00
Charles Lombardo f13b29196d Android: Use custom image loader for game covers
This fixes a bug where custom cover loading was initiated but would finish by the time another image view would be in the place of the previous one.
2023-09-20 14:36:58 -04:00
Admiral H. Curtiss 579ccb0710
Merge pull request #12160 from AdmiralCurtiss/achievement-log
Common/LogManager: Add logging category for Achievements.
2023-09-19 22:01:15 +02:00
JosJuice 9862ba4548
Merge pull request #12155 from krnlyng/jit_block_map_msr_fast
JitArm64/Jit64: Extend the fast lookup mmap-ed segment further to avoid needing to check the msr bits.
2023-09-17 15:13:53 +02:00
JosJuice a79fe768e3 Jit64: Simplify ps_sum1 2023-09-17 11:04:37 +02:00
Admiral H. Curtiss cc7fadfa4b
Merge pull request #12181 from JosJuice/curl-response-code-long
Common: Fix HttpRequest::GetLastResponseCode stack corruption
2023-09-16 16:48:47 +02:00
JosJuice aa4de6516f Common: Fix HttpRequest::GetLastResponseCode stack corruption
Should fix https://bugs.dolphin-emu.org/issues/13353.
2023-09-16 16:01:28 +02:00
Frajo Haider fd9c970621 JitArm64/Jit64: Extend the fast lookup mmap-ed segment further to avoid needing to check the msr bits.
And in order to avoid a double dereference in the dispatcher, directly store
the normalEntry in the map.

The index to the block map becomes ((((DR<<1) | IR) << 30) | (address >> 2)).
This has been chosen since the msr bits change less often than the address,
thus we keep nearby entries together.

Also do not call the C dispatcher in case the assembly dispatcher didn't
find a block, since it wouldn't find a block either due to the 1:1 mapping,
except when falling back to the non shm segment lookup table.
2023-09-15 19:46:15 +03:00
Admiral H. Curtiss 1a821465f4
Merge pull request #12166 from iwubcode/cubemap_shader_texture_integration
VideoCommon: add cubemap to ShaderAsset and TextureAsset
2023-09-12 16:56:26 +02:00
Admiral H. Curtiss 308a52a782
Merge pull request #12165 from noahpistilli/scheduler-downloader
IOS/KD: Implement Download Scheduler
2023-09-12 16:22:23 +02:00
Admiral H. Curtiss 3dada564bf
Merge pull request #12177 from AdmiralCurtiss/noreserve
Common/MemArena: Set MAP_NORESERVE in LazyMemoryRegion on Linux.
2023-09-12 16:21:59 +02:00
JosJuice 392dfbe05f JitArm64: Deduplicate the gather pipe exception check
We had two nearly identical copies of the gather pipe exception checking
code right next to each other, with the only difference being the
register used. Let's unify them, like in Jit64.
2023-09-10 16:34:10 +02:00
Admiral H. Curtiss d16bedd5c4
Merge pull request #12178 from JosJuice/jit-gp-pc
Jit: Use correct address when checking fifoWriteAddresses
2023-09-10 15:58:23 +02:00
Admiral H. Curtiss 92d67df4e9
Merge pull request #12138 from JosJuice/jit-gp-check-discard
Jit: Don't discard before gather pipe interrupt check
2023-09-10 15:10:37 +02:00
Admiral H. Curtiss 7869abf0e6
Common/MemArena: Set MAP_NORESERVE in LazyMemoryRegion on Linux. 2023-09-10 14:52:34 +02:00
Sketch 3f6a976e0f IOS/KD: Implement Download Scheduler 2023-09-10 07:47:15 -04:00
JosJuice 34b0a6ea90 Jit: Check for discarded registers when flushing
This adds a check for the bug addressed by the previous commit.
2023-09-10 12:54:52 +02:00
JosJuice 5902b5b113 PPCAnalyst: Don't discard before gather pipe interrupt check
This bug has been lurking in the code ever since I added the discard
functionality. It doesn't seem to be triggered all that often,
and on top of that the emitted code only runs conditionally, so I'm not
sure if people have been affected by this bug in practice or not.
2023-09-10 12:54:52 +02:00
JosJuice f7f4da2be8 Jit: Use correct address when checking fifoWriteAddresses
We need to check for the address of the *previous* instruction, because
checking fifoWriteAddresses happens not at the end of the instruction
that triggered it but at the start of the next instruction.
2023-09-10 12:54:18 +02:00
Admiral H. Curtiss 1a0f0e7e96
Merge pull request #12081 from JosJuice/jitarm64-debug-exit-pc
JitArm64: Store PC on debug exit
2023-09-10 02:10:29 +02:00
Admiral H. Curtiss 5e0cf795e3
Merge pull request #12169 from jordan-woyak/widescreen-heuristic-gameini
VideoCommon: Expose the widescreen heuristic's standard and widescreen values in onion config.
2023-09-09 16:51:11 +02:00
Admiral H. Curtiss 911c469cf5
Common/LogManager: Add logging category for Achievements. 2023-09-09 14:47:20 +02:00
R 860acfb15d Steam Deck: Periodically reenable gyro 2023-09-07 19:56:58 +01:00
JosJuice 57e56f4bc2
Merge pull request #12174 from AdmiralCurtiss/jitcache-32bit
Core/JitCache: Don't try to allocate the fast block map on 32-bit builds.
2023-09-07 19:29:04 +02:00
Admiral H. Curtiss cf2a1f29b7
Core/JitCache: Don't try to allocate the fast block map on 32-bit builds. 2023-09-07 14:48:57 +02:00
Admiral H. Curtiss 422bc7a627
Common/MemArena: A zero-byte allocation is invalid. 2023-09-07 14:41:24 +02:00
Admiral H. Curtiss c14bc6ea4c
Common/MemArena: mmap returns MAP_FAILED on error, not nullptr. 2023-09-07 13:59:33 +02:00
Admiral H. Curtiss a20bb3e05b
Common/MemArena: Assert return value of LazyMemoryRegion::Clear()'s mmap() call. 2023-09-07 04:00:22 +02:00
Jordan Woyak 7cc4304918 VideoCommon: Expose the widescreen heuristic's standard and widescreen ratio values in onion config. 2023-09-06 18:45:28 -05:00
JMC47 c0440df288
Merge pull request #12029 from LillyJadeKatrin/retroachievements-bugfix-2
RetroAchievements - Rearranged startup process
2023-09-06 12:23:52 -04:00
JMC47 3b5b9e0fc0
Merge pull request #12028 from LillyJadeKatrin/retroachievements-bugfix
RetroAchievements - Add Rich Presence to Achievement Dialog Header
2023-09-06 12:20:20 -04:00
LillyJadeKatrin 38bd04c439 Add Rich Presence to Achievement Dialog Header
This refactors the Rich Presence generation to store to a member field that can be exposed to the UI to display the Rich Presence in the achievement header. It still updates at its original rate of once per two minutes, but calls an update on the dialog when that ticks.
2023-09-06 10:01:33 -04:00
iwubcode 589834f562 VideoCommon: add cubemap as a sampler target for shaders, add cubemap as a valid texture asset 2023-09-05 21:11:19 -05:00