Commit Graph

30504 Commits

Author SHA1 Message Date
Filoppi 24004af814 Video: polish aspect ratio related code comments to make it clearer 2023-12-18 00:28:14 +02:00
Mai de8bc32dc5
Merge pull request #12362 from CasualPokePlayer/sysconf_widescreen
Add SYSCONF widescreen setting to dtm header
2023-12-17 15:19:02 -05:00
Mai 51a44aa5d2
Merge pull request #12431 from JosJuice/jitarm64-rlwnmx-call-rlwinmx
JitArm64: Call rlwinmx implementation from rlwnmx with imm b
2023-12-17 15:18:00 -05:00
Mai bcd74a81a9
Merge pull request #12370 from iwubcode/more_samplers
VideoBackends / VideoCommon: update max pixel shader samplers from 8 to 16
2023-12-17 14:50:23 -05:00
Mai 559ea0593c
Merge pull request #12432 from JosJuice/jitarm64-logic-i2r-opt
JitArm64: Add additional optimized cases to ANDI2R and friends
2023-12-17 14:45:55 -05:00
Mai f0f0f97554
Merge pull request #12433 from mitaclaw/windows-arm-debug-fix
Fix Windows ARM64 debug build errors
2023-12-17 14:43:55 -05:00
Mai 0125b5182f
Merge pull request #12409 from iwubcode/custom_material_graphics_mod_action_data
VideoCommon: prepare graphics mods for custom shader material data
2023-12-17 14:42:34 -05:00
Mai b27c15fab6
Merge pull request #12382 from iwubcode/shader_asset_default_value
VideoCommon: update shader asset to provide a variant default value
2023-12-17 14:41:55 -05:00
Mai f589c04aa7
Merge pull request #12372 from iwubcode/texture_usage_flag
VideoBackends / VideoCommon: add type enum to dictate how the texture is used; support texture 2d
2023-12-17 14:40:39 -05:00
mitaclaw ca443d7f89 Fix Windows ARM64 debug build errors
Jit.cpp : Potentially uninitialized local pointer variable 'host_address_after_return' used in a DEBUG_ASSERT on line 470.
dolphin-emu.sln : A copy-paste error.
2023-12-17 11:31:28 -08:00
JosJuice dc60bc5f1e JitArm64: Improve codegen in ANDI2R and friends
The codegen for the functions themselves, not for the emitted code.

This seems to save 32 bytes per function. We also get rid of the oddity
we had before where ANDI2R would do masking for 32-bit operations but
the other functions wouldn't.
2023-12-17 18:13:32 +01:00
JosJuice a8e1e1ae48 JitArm64: Optimize additional cases of ANDI2R and friends
Now we'll never need a scratch register for values that are all zeroes
or all ones.
2023-12-17 18:13:32 +01:00
JosJuice 6303416201 JitArm64: Optimize ANDI2R and friends to no-ops when possible
This optimizes rlwnmx with mask == 0xFFFFFFFF.
2023-12-17 18:13:30 +01:00
JosJuice 26de2a7feb JitArm64: Call rlwinmx implementation from rlwnmx with imm b
This way we get some additional optimized cases for rlwnmx with imm b.
2023-12-17 17:00:41 +01:00
Mai e6c85bf8f0
Merge pull request #12428 from JosJuice/jitarm64-rlwinmx-shift-only
JitArm64: Add rlwinmx case for only shifting
2023-12-17 10:45:59 -05:00
Mai 519234949e
Merge pull request #12429 from JosJuice/jitarm64-mtsrin-64-bit
JitArm64: Use 64-bit register for address in mtsrin
2023-12-17 10:45:36 -05:00
Tilka 18f9b966a0
Merge pull request #12358 from rsgnz/master
VideoCommon: Fix "Post-processing shader not found" when (off) is selected.
2023-12-17 09:50:41 +00:00
Tilka 773ffd04b8
Merge pull request #11497 from vyuuui/debugger_assembler_ui
Built-in assembler for debugger interface
2023-12-16 21:15:31 +00:00
JosJuice f5951c9f45 JitArm64: Use 64-bit register for address in mtsrin
Fixes a regression from d34d3bd513 that, depending on the host memory
layout, could cause either a host crash or a guest crash when running
F-Zero GX.
2023-12-16 20:27:58 +01:00
JosJuice b5a95b7804 JitArm64: Add rlwinmx case for only shifting
Small optimization.
2023-12-16 17:34:33 +01:00
Admiral H. Curtiss 190c4e8cda
Merge pull request #12427 from JosJuice/jitarm64-msr-updated-logical-imm
JitArm64: Fix MSRUpdated(ARM64Reg) with FEATURE_FLAG_PERFMON set
2023-12-16 17:22:23 +01:00
JosJuice e0eb4ef5bc JitArm64: Use enum class for LogicalImm size parameter
This should prevent issues like the one fixed in the previous commit
from happening again.
2023-12-16 16:48:26 +01:00
Admiral H. Curtiss 36cb8110f4
Merge pull request #12346 from iwubcode/arb_mipmaps_default_off
Core: disable arbitrary mipmap detection by default
2023-12-16 16:23:10 +01:00
JosJuice 064b23b25b JitArm64: Fix MSRUpdated(ARM64Reg) with FEATURE_FLAG_PERFMON set
The second parameter of the LogicalImm constructor is the size, not the
first.
2023-12-16 12:07:11 +01:00
Admiral H. Curtiss 4b459294b0
Merge pull request #12414 from LillyJadeKatrin/retroachievements-bugfix
Retroachievements - Fixed Login Checks
2023-12-16 05:33:43 +01:00
Admiral H. Curtiss 1daaaf8c26
Merge pull request #12425 from Naim2000/no-install-wad
Disable installing WADs and importing/exporting Wii saves while emulation is running
2023-12-16 05:09:26 +01:00
Naim2000 8f9102f5e5 Disable importing/exporting Wii saves while emulation is running 2023-12-15 19:48:06 -05:00
OatmealDome c159e4fb7a
Merge pull request #12420 from OatmealDome/mtl-oob
MTLStateTracker: Increase fragment buffer array size to 3
2023-12-15 17:12:31 -05:00
iwubcode 12dd15c8dd VideoBackends / VideoCommon: add type enum to dictate whether a texture is a 2D texture, a texture array, or a cube map; support 2D texture type across backends
Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
2023-12-15 11:06:02 -06:00
Naim2000 efd0c5b07e Disable "Install WAD" while emulation is running
The "(Un)install to/from the NAND" options in the context menu for WAD files has always been disabled, don't know what happened to this one
2023-12-15 10:14:44 -05:00
Tillmann Karras c8c9928eb1 DolphinQt/Assembler: improve translatability
Also, don't show error line numbers in the instruction patch dialog. The
input text field only accepts one line anyway.
2023-12-15 00:37:42 +00:00
Admiral H. Curtiss 370474a7cb
Merge pull request #12422 from lioncash/global
WiiNetConfig: Eliminate usages of the global system accessor
2023-12-14 23:27:10 +01:00
Tilka f777a584c1
Merge pull request #12423 from lioncash/mios
IOS/MIOS: Eliminate global system accessors
2023-12-14 22:19:11 +00:00
Lioncash 27806d8d7b WiiNetConfig: Eliminate usages of the global system accessor
We can pass in the existing memory manager instance into the functions
instead of using the global accessor to access it.
2023-12-14 16:46:52 -05:00
Lioncash 1573b50bb3 HW/CPU: Remove remaining global system accessors
We can just pass in the m_system member instead.
2023-12-14 16:14:59 -05:00
Lioncash 5e9763c0fa IOS/MIOS: Eliminate global system accessors
We can pass the system instance through the EmulationKernel instance.
2023-12-14 16:05:59 -05:00
JosJuice 84ac561e46
Merge pull request #12421 from lioncash/fwd
WC24PatchEngine: Move IniFile header dependency into the cpp file
2023-12-14 21:21:59 +01:00
JosJuice e34bfe0f72
Merge pull request #12419 from lioncash/conf
SysConf: std::move fs pointer in constructor
2023-12-14 20:47:27 +01:00
Lioncash 88431cfbca WC24PatchEngine: Make GetNetworkPatch() take a std::string_view
Makes it consistent with GetNetworkPatchByPayload()
2023-12-14 14:24:49 -05:00
Lioncash fa70a8fd01 WC24PatchEngine: Make a few functions internally linked
These are only used within this translation unit, so we can remove the
IniFile dependency from the header.
2023-12-14 14:23:41 -05:00
OatmealDome 438c48912b MTLStateTracker: Increase fragment buffer array size to 3 2023-12-14 14:17:07 -05:00
Lioncash 14abdab314 SysConf: std::move fs pointer in constructor
Just gets rid of a trivial atomic reference count increment and
decrement. Not a super heavyweight thing, but it is essentially "free"
to get rid of.
2023-12-14 14:01:17 -05:00
JosJuice 38752c91af
Merge pull request #12418 from lioncash/fifo
DolphinQt/Host: Convert inclusion of Fifo.cpp to Fifo.h
2023-12-14 19:56:32 +01:00
Lioncash a20b4b5669 DolphinQt/Host: Convert inclusion of Fifo.cpp to Fifo.h
Quite a bizarre include.

Also resolves an indirect include (lol), since this TU was
including the system header that way.
2023-12-14 05:24:51 -05:00
Lioncash 6bbdf36a7b GameListModel: Remove fallthrough in data()
A harmless case of it, but this can still cause warnings.
2023-12-14 04:25:40 -05:00
Tilka cdf4193e67
Merge pull request #12410 from lioncash/ignored
Common/Crypto: Resolve -Wignored-attributes warnings
2023-12-13 18:39:22 +00:00
Lioncash dbc792a3ec Common/Crypto/SHA1: Resolve -Wignored-attributes warnings
See commit 417d1310d22b11d5d724625721b5fec09eda099a for an explanation
on why we do this.
2023-12-13 13:04:53 -05:00
Lioncash bced5fac18 Common/Crypto/AES: Resolve -Wignored-attributes warnings
The alias for __m128i is typically something like:

typedef long long __m128i __attribute__((__vector_size__(16), __may_alias__));

and the part that ends up not getting preserved is the __may_alias__
attribute specifier.

So, in order to preserve that, we can just use a wrapper struct, so the
data type itself isn't being passed through the template.
2023-12-13 13:02:51 -05:00
Tilka b5d8498346
Merge pull request #12415 from lioncash/buffer
GBAWidget: Use std::span with SetVideoBuffer()
2023-12-13 15:57:40 +00:00
Tilka df922afdbb
Merge pull request #12412 from lioncash/maybe
DSPInterpreter: Mark IsProperlySignExtended() as [[maybe_unused]]
2023-12-13 15:52:32 +00:00
Tilka 52a144745d
Merge pull request #12408 from lioncash/enums
General: Resolve -Wswitch warnings
2023-12-13 15:48:12 +00:00
Lioncash dfb2783c25 GBAWidget: Add missing override specifiers 2023-12-13 10:12:18 -05:00
Lioncash 67a06d17b1 GBAWidget: Use std::span with SetVideoBuffer()
Previously we were always taking the buffer by value, even if it wasn't
being stored anywhere and only read from.

We can use a std::span for the same thing.
2023-12-13 10:11:52 -05:00
LillyJadeKatrin aa3e1e2324 Retroachievements - Fixed Login Checks
Two fixes: verify that there's an API token before attempting to automatically log in, and don't attempt to hash a game and load it unless achievements are enabled and the player is logged in. This prevents multiple API requests that we already know will fail, one of which will display an unnecessary error message to the player.
2023-12-13 09:00:25 -05:00
vyuuui feb831a781 Added assembler files to windows build 2023-12-13 05:33:04 -08:00
vyuuui 38c15df464 Parser and Assembler implementations 2023-12-13 05:32:20 -08:00
Lioncash ecd7fa4380 DSPInterpreter: Mark IsProperlySignExtended() as [[maybe_unused]]
This function is used in debug asserts, so in release builds this will
go unused and otherwise generate a warning
2023-12-12 21:02:15 -05:00
Lioncash e06480a8ab Software/SWGfx: Default destructor in cpp file
Fixes a build failure with clang 17.

The destructor needs to be in the cpp file, since we have a forward
declared std::unique_ptr type as part of the class. So technically the
default inline destructor could invoke without seeing the full data type
definition.
2023-12-12 20:33:43 -05:00
iwubcode b1d9e13d75 VideoCommon: prepare graphics mods for custom shader material data 2023-12-12 17:56:26 -06:00
Tilka 7b57a4a37d
Merge pull request #12407 from lioncash/unused2
CPUThreadConfigCallback: Mark static ID as [[maybe_unused]]
2023-12-12 23:38:47 +00:00
Mai ea3033731d
Merge pull request #12240 from iwubcode/material_asset_additional_properties
VideoCommon: add additional data types to material asset
2023-12-12 18:38:20 -05:00
Lioncash 91f691296c IOS/Crypto/Sha: Handle ShaCommandUnknown in IOCtlV
Resolves a -Wswitch warning.
2023-12-12 17:42:36 -05:00
Tillmann Karras 5b4b8dba61 VideoCommon: add message to XF load assert 2023-12-12 22:35:02 +00:00
Lioncash c14b3539c9 CPUThreadConfigCallback: Mark static ID as [[maybe_unused]]
This isn't used, but is likely kept around so the one-timed execution of
a magic static is taken advantage of.
2023-12-12 17:30:37 -05:00
Tilka 53a51a6f1b
Merge pull request #12405 from lioncash/shadow2
General: Resolve lingering -Wshadow warnings
2023-12-12 22:20:23 +00:00
Tilka 8c99198251
Merge pull request #12404 from lioncash/guard
CheatSearchWidget: Make use of CPUThreadGuard parameter in UpdateTableRows()
2023-12-12 22:18:26 +00:00
Lioncash e883bbc57a ConfigFloatSlider: Resolve -Wshadow warning
Fairly straightforward variable shadowing.
2023-12-12 17:07:37 -05:00
Lioncash 79c84c98ed WC24PatchEngine: Resolve -Wshadow warning
While not captured, we're definitely shadowing the result variable
outside the lambda.
2023-12-12 17:03:42 -05:00
Lioncash 81d5370141 HLE_OS: Resolve -Wshadow warnings
We get a warning about shadowing the va_list type and just
run-of-the-mill variable shadowing, which we can easily fix.
2023-12-12 17:01:32 -05:00
Lioncash a812a1f938 LightingShaderGen: Resolve -Wshadow warnings
Given how the lambda doesn't capture anything, we can move this to a
internally linked function, which prevents any name shadowing.
2023-12-12 16:55:06 -05:00
Tilka 6184ec655e
Merge pull request #12403 from lioncash/uninit
PPCDebugInterface: Silence trivial -Wmaybe-uninitialized warning
2023-12-12 21:49:01 +00:00
Tilka 995eb779fa
Merge pull request #12402 from lioncash/shadow
AchievementManager: Resolve -Wshadow warnings
2023-12-12 21:42:21 +00:00
Lioncash 915e43dfba CheatSearchWidget: Make use of CPUThreadGuard parameter in UpdateTableRows
Previously, the parameter wasn't being used, because it was being
shadowed by another CPUThreadGuard at its only would-be usage point.
2023-12-12 16:41:00 -05:00
Tilka b4bfc4feba
Merge pull request #12401 from AdmiralCurtiss/feature-flag-fix
JitCommon: Fix feature_flags truncation in index calculation.
2023-12-12 20:56:04 +00:00
Tilka 8cbb2c2e44
Merge pull request #12399 from lioncash/erasing
General: Make use of std::erase_if/std::erase where applicable
2023-12-12 20:54:52 +00:00
Tilka 99959944eb
Merge pull request #12376 from lioncash/span2
VFFUtil: Use std::span with WriteToVFF
2023-12-12 20:50:17 +00:00
Tilka 4d98c237c7
Merge pull request #12371 from lioncash/span
VideoCommon: Use std::span for BoundingBox::Write()
2023-12-12 20:47:08 +00:00
Lioncash b0b1308160 PPCDebugInterface: Silence trivial -Wmaybe-uninitialized warning
We can just initialize register_index, even if it gets overwritten later
on via Common::FromChars.
2023-12-12 15:42:28 -05:00
Lioncash 18032f19a5 AchievementManager: Resolve -Wshadow warnings
Renames some variables to avoid shadowing warnings on gcc.

Also gets rid of a FilereaderState struct, since one is already defined
in the declaration of the AchievementManager class.
2023-12-12 15:37:20 -05:00
Admiral H. Curtiss c1957ac169
JitCommon: Fix feature_flags truncation in index calculation. 2023-12-12 21:16:29 +01:00
Tilka c92e402454
Merge pull request #12398 from lioncash/parse
RiivolutionParser: Make use of std::span where applicable
2023-12-12 20:07:44 +00:00
Tilka 198a53e7df
Merge pull request #12397 from lioncash/asset
CustomAssetLibrary: Remove unused GetAssetSize() function
2023-12-12 20:02:44 +00:00
Lioncash ded2d55438 ExpressionParser: Avoid some miscellaneous copies
Just some trivial copies that can be eliminated or turned into moves.
2023-12-12 14:03:41 -05:00
Lioncash a5bbeb721a ExpressionParser: Mark constructors explicit where applicable
Makes for consistency with the surrounding code.
2023-12-12 14:00:27 -05:00
Lioncash ea71a76ea9 ExpressionParser: Pass control qualifiers by const reference
These aren't necessarily cheap to copy, since a control qualifier will
have around 3 std::strings inside of it, so passing by value can churn
allocations a little bit.
2023-12-12 13:50:46 -05:00
Lioncash 9aea481e59 ExpressionParser: Make use of std::erase_if 2023-12-12 13:31:58 -05:00
Lioncash 196f8e5123 MappingCommon: Make use of std::erase_if 2023-12-12 13:31:18 -05:00
Lioncash 888a8692b4 SysConf: Make use of std::erase_if 2023-12-12 13:30:39 -05:00
Lioncash 01d15994fe PatchEngine: Make use of std::erase 2023-12-12 13:30:08 -05:00
Lioncash e69ac2d43e Socket: Make use of std::erase_if 2023-12-12 13:29:33 -05:00
Lioncash 96eac73d11 NetKDRequest: Make use of std::erase 2023-12-12 13:27:54 -05:00
Lioncash e7f7dde546 Formats: Make use of std::erase_if 2023-12-12 13:27:17 -05:00
Lioncash df227aa03c I2CBus: Make use of std::erase_if 2023-12-12 13:26:47 -05:00
Lioncash ff0e7fbf08 GeckoCodeConfig: Make use of std::erase_if 2023-12-12 13:26:16 -05:00
Lioncash 84ae0c1c7e ActionReplay: Make use of std::erase_if 2023-12-12 13:25:26 -05:00
Lioncash 50e4dc5dba Watches: Make use of std::erase_if 2023-12-12 13:24:40 -05:00
Lioncash b728e37086 RiivolutionParser: Remove usages of global system accessor
We can retrieve the encompassing system instance through the
CPUThreadGuard instance instead.
2023-12-12 12:48:40 -05:00
Lioncash c2e39e0d68 RiivolutionParser: Make use of std::span where applicable
The main interface for these only take in patches and iterate over them
in a contiguous sequence, so we can reasonably generify the interface.
2023-12-12 12:38:43 -05:00
iwubcode b69d336838 VideoCommon: update shader asset to provide a variant default value 2023-12-12 00:01:22 -06:00
Lioncash 4c7a4831cb CustomAssetLibrary: Remove unused GetAssetSize() function
There's a direct analogue of this function within
DirectFilesystemAssetLibrary that *is* used, however, so we can get rid
of this one.
2023-12-11 22:00:52 -05:00
Admiral H. Curtiss 2c6bf2d224
Merge pull request #12394 from lioncash/compare
General: Resolve -Wsign-compare warnings
2023-12-12 03:43:12 +01:00
Lioncash e011c3b383 Core/SyncIdentifier: Default operator==
Lets us remove a bunch of code and a dependency on the <tuple> header.
2023-12-11 19:39:55 -05:00
Tilka 6699acf10c
Merge pull request #12386 from lioncash/setting
Common/SettingsHandler: Minor convenience changes
2023-12-12 00:02:21 +00:00
Admiral H. Curtiss f04d834e8f
Merge pull request #12393 from lioncash/tls
DolphinQT/Host: Remove unused TLS variable tls_is_host_thread
2023-12-12 00:29:21 +01:00
Lioncash 0e51c0f8fc JitArm64_RegCache: Resolve -Wsign-compare warning 2023-12-11 18:15:50 -05:00
Lioncash 4c3a5eb1c5 JitArm64_SystemRegisters: Resolve -Wsign-compare warning 2023-12-11 18:11:34 -05:00
Lioncash f97316a1e6 TraversalClient: Resolve -Wsign-compare warning 2023-12-11 18:01:29 -05:00
Lioncash 49f44c1334 VertexManagerBase: Resolve -Wsign-compare warning 2023-12-11 18:00:34 -05:00
Admiral H. Curtiss b48af86148
Merge pull request #12390 from lioncash/string
GraphicsModListWidget: Add string specifier to By and Description fields
2023-12-11 23:47:53 +01:00
Admiral H. Curtiss 4f02f526b8
Merge pull request #12392 from lioncash/decl
General: Resolve -Wmissing-declaration warnings
2023-12-11 23:39:23 +01:00
Admiral H. Curtiss 54301d709a
Merge pull request #12389 from lioncash/cheeve
AchievementManager: Make GetInstance() and GetLock() return a reference
2023-12-11 23:37:29 +01:00
Lioncash f490b990f5 DolphinQT/Host: Remove unimplemented prototypes
Remnants of prior existing code.
2023-12-11 17:30:56 -05:00
Lioncash d705c31d1a DolphinQT/Host: Remove unused TLS variable tls_is_host_thread
This is never accessed or read from.
2023-12-11 17:27:57 -05:00
Admiral H. Curtiss 16ba56a34b
Merge pull request #12388 from lioncash/compare
GameFile: Default GameBanner operator==
2023-12-11 23:25:27 +01:00
Lioncash e8b4796273 PostProcessing: Mark helper functions as static
These didn't have any prototypes and were generating
-Wmissing-declaration warnings.
2023-12-11 17:07:59 -05:00
Lioncash abb5cc3a3a ShaderAsset: Mark ParseShaderProperties() as static
This had no function prototype, so this can be internally linked.

Resolves a -Wmissing-declaration warning.
2023-12-11 17:05:06 -05:00
Lioncash b4b624b97b WC24PatchEngine: Mark LoadPatches() as static
Resolves a -Wmissing-declaration warning, since no prototype existed for
the function.
2023-12-11 17:02:15 -05:00
Lioncash 2b2ee61e79 CustomShaderCache: Resolve -Wreorder warnings
Lays out the initializer lists to be in the same order that
initialization would occur in.
2023-12-11 16:59:03 -05:00
Lioncash 9472da788d ConfigFloatSlider: Resolve -Wreorder warnings
Orders the initializer list the way that the members would actually be
initialized in.

Resolves some -Wreorder warnings
2023-12-11 16:15:48 -05:00
Lioncash 5d1514418e GraphicsModListWidget: Add string specifier to By and Description fields
Translators should always know where text is going to be appended and
have the ability to move things around to fit the language better.
2023-12-11 15:43:41 -05:00
Lioncash d90537cc18 AchievementManager: Return by reference from GetLock()
This makes the API a little nicer to use, since you don't need to do
a mandatory dereference when passing the lock into any kind of scope
guard.
2023-12-11 13:51:50 -05:00
Lioncash 3c7fa0738c AchievementsWindow: Add missing override specifier 2023-12-11 13:47:59 -05:00
Lioncash dbf28df64c DolphinQT: Remove unnecessary includes from achievement files
Reduces the amount of dependencies being pulled in on both local and
external headers.
2023-12-11 13:40:55 -05:00
Lioncash e55f9ed102 AchievementManager: Make GetInstance() return a reference
The internal static member will always have a valid lifetime. Makes this
consistent with other instance based objects in our code.
2023-12-11 13:36:39 -05:00
Lioncash cdf8849e17 GameFile: Default GameBanner operator==
Same behavior, but less code.
2023-12-11 11:36:35 -05:00
Lioncash ff38362216 GameFileCache: Use std::span with Update()
All we're really doing is iterating over a sequence of strings, so we
don't need to tie this specifically to std::vector.
2023-12-11 11:12:09 -05:00
Lioncash 2ca80adeb2 GameFileCache: Pass std::function by reference rather than by value
std::function is internally allowed to allocate, and these functions
aren't being stored anywhere (only called), so we can freely get rid
of some minor overhead here by passing by reference.

This change also creates aliases for the functions, so that there isn't
a lot of visual noise when reading the function signatures.
2023-12-11 11:09:18 -05:00
Lioncash 88a973131c Common/SettingsHandler: Use std::string_view more
We don't need to enforce the use of std::string instances with
AddSetting(). We can accept views and only construct one string,
rather than three temporaries.
2023-12-11 07:54:43 -05:00
Lioncash 04b9f6c28d Common/SettingsHandler: Use std::erase in Decrypt()
Same behavior, way less verbose code.
2023-12-11 07:49:43 -05:00
Mai d84ed054ee
Merge pull request #12374 from iwubcode/custom_texture_potential_crash_fix
VideoCommon: prevent a potential custom texture crash
2023-12-11 07:42:48 -05:00
Admiral H. Curtiss 694b3b4ea1
HW/CEXIIPL: Fix loading files at nonzero offset in LoadFileToIPL(). 2023-12-11 02:22:06 +01:00
Mai c2b642d0b7
Merge pull request #12381 from AdmiralCurtiss/re-enable-achievement-nag
AchievementManager: Only nag user about disabled achievements when they were actually enabled before.
2023-12-10 20:16:24 -05:00
Mai bdd28f1f26
Merge pull request #12378 from JosJuice/jitarm64-a-early-discard
JitArm64: Add additional condition for lmw/stmw a discard
2023-12-10 20:15:57 -05:00
iwubcode 3658d3bffe VideoCommon: add ability to serialize graphics mod to json object 2023-12-10 18:29:21 -06:00
iwubcode ac862b04ab VideoBackends / VideoCommon: update max pixel shader samplers from 8 to 16, this allows us to support more samplers than the native Wii/GC 2023-12-10 18:14:02 -06:00
Admiral H. Curtiss 70cd0040a3
AchievementManager: Only nag user about disabled achievements when they were actually enabled before. 2023-12-10 21:10:49 +01:00
JosJuice c55f21729f Add "large entry points map" setting
To aid in debugging, this makes it possible to disable the recently
added 32/64 GiB region which hasn't had a proper name so far.
2023-12-10 21:07:27 +01:00
JosJuice 0ec12f9e7e JitArm64: Add additional condition for lmw/stmw a discard
If a is one of the registers that will be loaded/stored, we must not
discard it early. Sorry for this fixup of a fixup...
2023-12-10 19:13:35 +01:00
JosJuice 13a4f1b799 JitArm64: Guard against discarding a in lmw/stmw
If a_is_addr_base_reg is true, discarding a before the end of the
instruction would result in the instruction being miscompiled.
2023-12-10 17:58:15 +01:00
Lioncash f4b1a199e8 VFFUtil: Use std::span with WriteToVFF
Same behavior, but allows different containers to be used.

In one case it also gets rid of needing to construct a std::vector.
2023-12-10 10:17:39 -05:00
Mai e2472e4f50
Merge pull request #12352 from JosJuice/jitarm64-flush-in-long-inst
JitArm64: Flush in the middle of lmw/stmw/mfcr
2023-12-10 09:15:07 -05:00
Mai f249e414ad
Merge pull request #12366 from AdmiralCurtiss/exi-ipl-fixes
HW/CEXIIPL: Various fixes.
2023-12-10 09:12:18 -05:00
Admiral H. Curtiss a0da6788a3
MMU: Use MSR.IR for instruction reads. 2023-12-10 14:18:25 +01:00
Admiral H. Curtiss c12725c916
MMU: Assert that the given XCheckTLBFlag is valid for the operation. 2023-12-10 14:18:25 +01:00
Admiral H. Curtiss 0d6a0724fd
MMU: Always use data read for the PTE lookup in TranslatePageAddress. 2023-12-10 14:18:24 +01:00
Admiral H. Curtiss 5d2fc0147e
MMU: Mark IsOpcodeFlag() and IsNoExceptionFlag() as constexpr. 2023-12-10 14:18:24 +01:00
Admiral H. Curtiss 8194b53166
HW/CEXIIPL: Check for errors when reading font. 2023-12-10 14:17:38 +01:00
Admiral H. Curtiss 57e166dbef
HW/CEXIIPL: Consider that the loaded file may not actually contain a nullterminated string. 2023-12-10 14:17:37 +01:00
Admiral H. Curtiss 7d53916466
HW/CEXIIPL: Respect bounds in LoadFileToIPL(). 2023-12-10 14:17:37 +01:00
Admiral H. Curtiss f284bfca45
Merge pull request #12336 from AdmiralCurtiss/lazymemory-ringbuffer
Common/MemArenaWin: Rewrite LazyMemoryRegion by repeatedly mapping the same block of memory for unwritten regions.
2023-12-10 13:00:09 +01:00
iwubcode 02756be381 VideoCommon: prevent a potential custom texture crash that can occur when a shared_ptr gets released while a pointer to its member data is still being used 2023-12-09 23:43:40 -06:00
Admiral H. Curtiss ccedeb4936
Merge pull request #12373 from lioncash/present
VideoCommon/Present: Remove use of g_presenter inside Presenter class
2023-12-10 03:55:30 +01:00
Lioncash 0df7908025 VideoCommon/Present: Remove use of g_presenter inside Presenter class
There's no need to self reference a global of the class itself when we
can just call the function directly.
2023-12-09 20:15:32 -05:00
Lioncash 5f6c76af51 VideoCommon: Use std::span for BoundingBox::Write()
Crosses off a lingering TODO.

Also amends a few nearby cases where a u32 cast was being repromoted to
size_t.
2023-12-09 16:33:21 -05:00
Admiral H. Curtiss 3364d571cc
Common/MemArenaWin: Rewrite LazyMemoryRegion to manually map memory blocks into the large memory region as needed.
Internal details: The large region is split into individual same-sized blocks of memory. On creation, we allocate a single block of memory that will always remain zero, and map that into the entire memory region. Then, the first time any of these blocks is written to, we swap the mapped zero block out with a newly allocated block of memory. On clear, we swap back to the zero block and deallocate the data blocks. That way we only actually allocate one zero block as well as a handful of real data blocks where the JitCache actually writes to.
2023-12-09 21:11:31 +01:00
Admiral H. Curtiss eb235d6ee3
Common/MemArenaWin: Move the advanced Windows memory function address initialization into its own struct and function so it can be reused. 2023-12-09 20:58:07 +01:00
Admiral H. Curtiss 6197902dc3
IOS/KD/Mail: Add missing includes. 2023-12-09 17:07:03 +01:00
Mai 636b892b7c
Merge pull request #12360 from TryTwo/bugfix_wiimote_signal_spam
WiimoteDevice. Bugfix. Remove signal spam while starting a game.
2023-12-08 21:07:51 -05:00
timetravelthree 3b8737d2d7
Fix out of bound write in EfbCopy::ClearEfb 2023-12-09 02:15:42 +01:00
CasualPokePlayer 13bf75b1df Add SYSCONF widescreen setting to dtm header 2023-12-08 01:27:57 -08:00
LillyJadeKatrin e992225b88 Bugfix - small square in bottom right corner
Fixed a bug in OSUI created by the challenge icons that caused a small rectangle to appear in the bottom right corner of the screen.
2023-12-08 00:33:29 -05:00
Mai 3a4cf579ff
Merge pull request #12247 from LillyJadeKatrin/retroachievements-challenges
RetroAchievements - Challenge Icons
2023-12-07 16:46:43 -05:00
LillyJadeKatrin caa729f84a Display Active Challenges On Screen
The active challenges, aka the primed achievements, are displayed on screen as a series of icons in the bottom right corner of the screen via OnScreenUI.
2023-12-07 16:02:15 -05:00
TryTwo 6bd9488e0a WiimoteDevice. bugfix. Remove signal spam while starting a game.
Emulation state changed signals also update the wiimote connection. The signal here is only needed for wiimote connects/disconnects.

Can fix erroneous debugger behavior during booting, as dolphin will sometimes incorrectly report the state as paused, which leads the debugger widgets to run when they shouldn't.
2023-12-07 12:15:57 -07:00
rsgnz 8c973188ef Fix "Post-processing shader not found" when (off) is selected. (2nd version) 2023-12-07 11:26:31 +01:00
Mai 2ece642cf8
Merge pull request #12357 from AdmiralCurtiss/ipl-bounds
Core/Boot: Check bounds in Load_BS2().
2023-12-06 19:57:26 -05:00
LillyJadeKatrin 8fbc5960e7 Handle Achievement Un/Primed Events
When an achievement is "primed", a challenge is active, for example completing a portion of the game in under a time limit or without taking damage or using certain items. This is stored in a map in the Achievement Manager (and removed when the achievement is unprimed) so a later commit can display it on screen.
2023-12-06 08:21:06 -05:00
Admiral H. Curtiss fff538e563
Core/Boot: Check bounds in Load_BS2(). 2023-12-05 22:34:35 +01:00
LillyJadeKatrin 2bf6ebcb90 Added achievement hash to non-disc boot paths. 2023-12-05 16:17:18 -05:00
LillyJadeKatrin ebf2ef1d82 Refactored hash process to check prior game ID
If the new game ID is a different title than the previous game ID, the achievement manager is compromised.
2023-12-05 16:17:18 -05:00
LillyJadeKatrin c8d8ca2ff7 Added Disabled flag to Achievement Manager
The Disabled state sits between Game Closed and completely Shutdown - stronger than the former, as it refuses to let a game be opened again until AchievementManager is restored (which only happens upon a fresh core boot) but it isn't completely shut down and will still allow the player to be logged in and access the achievement settings and their (global) achievement header.
2023-12-05 16:17:17 -05:00
LillyJadeKatrin 148c2f3c0d Refactored AchievementManager hash code to take a volume.
This change splits LoadGameAsync into three methods: two HashGame methods to accept either a string filepath or a volume, and a common LoadGameSync that both HashGames call to actually process the code. In the process, some minor cleanup, and the hash resolution now takes place on the work queue asynchronously.
2023-12-05 16:17:11 -05:00
Mai a65246ec3f
Merge pull request #11988 from JosJuice/jit-feature-flags
Jit: Replace "msrBits" with "featureFlags" and use for performance monitor
2023-12-05 03:13:50 -05:00
Mai 6e6695c24b
Merge pull request #11904 from LillyJadeKatrin/retroachievements-hardcore-v2
RetroAchievements - Hardcore Mode (V2)
2023-12-05 01:31:54 -05:00
Tilka 7dfea144b9
Merge pull request #12324 from Pokechu22/vertex-loader-dummy-tex-coords
VertexLoader: Fixes and cleanup related to skipped components
2023-12-04 13:06:19 +00:00
iwubcode e204b3c8ee VideoCommon: add additional data types (int, int2, float, bool, etc) as properties of materials and some helper functions to support sending the data to the GPU 2023-12-04 00:12:31 -06:00
Pokechu22 1c62ebc9fb Use ExtensionNumber in Movie.cpp 2023-12-03 11:36:54 -08:00
JosJuice 8368a397ee JitArm64: Flush in the middle of lmw/stmw/mfcr
Normally we only flush registers right at the end of each PPC
instruction. However, for PPC instructions that use a lot of registers
one at a time, it's beneficial to do this flushing work in the middle
of the instruction instead, reducing the risk of register starvation
and improving pipelining.
2023-12-03 18:42:42 +01:00
Mai 27be8c087e
Merge pull request #12295 from sepalani/arp-check
BBA/HLE: Fix GC homebrew if_config not working
2023-12-03 11:26:00 -05:00
Mai 98eda4dc9f
Merge pull request #12351 from TryTwo/bugfix_data_symbols
PPCSymbolDB. Bugfix. Fix .data symbols not loading
2023-12-03 11:17:44 -05:00
JosJuice 05864ceddd PPCAnalyst: Clear crInUse on HLE
This should have been done when rebasing 6cc4f593e5 after the merge of
3a00ff625e. There are no correctness implications as far as I know,
only very minor performance implications.
2023-12-03 14:20:45 +01:00
TryTwo 92532c8d3a PPCSymbolDB. Bugfix. Fix .data symbols not loading, unless they were aligned to 4 bytes.
.data symbols point to memory values and can be any byte or length of bytes (such as a string).
2023-12-03 00:03:28 -07:00
Pokechu22 69cf8b3470 VertexLoader: Use Common::SmallVector 2023-12-02 15:54:52 -08:00
Pokechu22 4116344785 VertexLoader: Remove unnecessary calls to VertexLoader_TextCoord::GetDummyFunction 2023-12-02 15:54:52 -08:00
Pokechu22 36796abc08 VertexLoader: Fix wrong array being used if color 1 is present but color 0 isn't
This worked correctly on the JIT vertex loaders, and for the equivalent case with texture coordinates. I'm not aware of any games this affects (but libogc does mention a semi-related scenario at 6bc0317c7d/gc/ogc/gx.h (L1855-L1857).)
2023-12-02 15:54:52 -08:00
Pokechu22 1ee6824324 VertexLoaderTest: Add test for skipped texture coordinates
Jimmie Johnson's Anything with an Engine is known to use texture coordinate 7 (and only texture coordinate 7) in some cases. There are a lot of possible edge-cases, so this test brute-forces all combinations with coordinates 0, 1, and 2.
2023-12-02 15:54:52 -08:00
Mai 4f3f208fe4
Merge pull request #12348 from JosJuice/jitarm64-imm-msr-fastmem
JitArm64: Fix updating MEM_REG with imm MSR without fastmem
2023-12-02 17:53:28 -05:00
LillyJadeKatrin 2cb14edafa Add Hardcore switch to Achievement Settings dialog
This adds the actual switch to turn on Hardcore Mode to the settings tab of the Achievements dialog. It is accompanied by a large tooltip warning explaining what it does and when it can be enabled.
The switch is only enabled to be turned on when no game is running, so that games are started in hardcore mode and can only be loaded via the console's memory card, as in the original hardware. Hardcore may be turned off while a game is running, but cannot be turned back on until the game is disabled.
The toggle trigger for hardcore mode also automatically disables the settings that are not allowed during hardcore mode.
Finally, the original flag in AchievementSettingsWidget to set whether things are enabled in hardcore mode (primarily Leaderboards) is replaced with the actual Hardcore Mode setting.
2023-12-02 16:41:17 -05:00
LillyJadeKatrin 6f7e02e201 Disable TAS recording playback in hardcore mode
Play Input Recording would potentially unlock achievements without any player input and needs to be disabled. If a recording is already playing, hardcore mode cannot be enabled.
2023-12-02 16:41:17 -05:00
LillyJadeKatrin 3aebbbb3e7 Disable cheats in hardcore mode
RetroAchievements does not allow cheats such as Action Replay or Gecko in hardcore mode, for fairness.
2023-12-02 16:41:17 -05:00
LillyJadeKatrin 0abfa94bc8 Disable Freelook in hardcore mode
The player getting a better view of their surroundings than the game would normally allow could possibly give the player an advantage over the original hardware, so Freelook is disabled in hardcore mode. To do this, I disable the config flag for Freelook when it is accessed, to make sure that it is disabled whether it was enabled before or after hardcore mode was enabled.
2023-12-02 16:41:16 -05:00
LillyJadeKatrin 1a19a92943 Disable memory patches in hardcore mode
Memory patches would be an easy way to manipulate the memory needed to calculate achievement logic, so they must be disabled. Riivolution patches that do not affect memory are allowed, as they will be hashed with the game file.
2023-12-02 16:41:16 -05:00
LillyJadeKatrin cb2fa9a1f2 Disable Debug Mode in hardcore mode
Debug Mode gives players direct read and write access to memory, which could be used to completely manipulate RetroAchievements logic and therefore is not allowed in hardcore mode.
2023-12-02 16:41:16 -05:00
LillyJadeKatrin c20258d782 Disable slowdown in hardcore mode
Slowing down the emulator would artificially improve reaction times and is therefore disallowed in hardcore mode. Speeds faster than 1x are allowed, but any speed below 1x is scaled back up to 1x.
2023-12-02 16:41:16 -05:00
LillyJadeKatrin 45105822f3 Disable frame advance in hardcore mode
Frame advancing is easily exploitable for slowing down a game and artificially improving reaction times and is not allowed in RetroAchievements hardcore mode.
2023-12-02 16:41:16 -05:00
LillyJadeKatrin 2c40d6ba31 Disable loading state in hardcore mode
While saving states is allowed (especially for the purpose of debugging), RetroAchievements does not allow loading saved states when hardcore mode is on.
2023-12-02 16:41:15 -05:00
LillyJadeKatrin 71f3039f96 Added Hardcore Warning Widget
This widget will be used in several places to notify the player that a feature has been disabled because hardcore mode is on. It includes a button to open the Achievement Settings so that Hardcore Mode may be turned off. Also included is the framework required to open AchievementsWindow specifically on the Settings tab.
2023-12-02 16:41:15 -05:00
LillyJadeKatrin 138e68ef9f Added Hardcore flag to Achievement Settings
Hardcore Mode is a RetroAchievements feature for enabling as close to original hardware as possible, to keep a fair, challenging, and competitive playing field for achievements (which get tallied differently and emphasized more in hardcore) and leaderboards (where it is mandatory) at the cost of several common emulator features that provide advantages, such as state loading and slower emulation speeds.
This commit just adds the flag to the AchievementSettings, with more to come.
2023-12-02 16:41:15 -05:00
JosJuice 253afee315 JitArm64: Fix updating MEM_REG with imm MSR without fastmem
Dolphin would crash when running with a fastmem arena but without
fastmem. This regression was caused by merging 9192128c50 without
adapting it after the merge of 0606433404.
2023-12-02 17:26:33 +01:00
Admiral H. Curtiss 85f4a460f9
Merge pull request #12184 from noahpistilli/kd-mail-send
IOS/KD: Implement Send Mail
2023-12-02 17:15:56 +01:00
Admiral H. Curtiss a753022aa7
Merge pull request #12344 from noahpistilli/kd-download-time-fix
IOS/KD: Set download span if download task not found
2023-12-02 17:13:45 +01:00
Sketch e07087e43c IOS/KD: Set download span if download task not found 2023-12-01 23:15:27 -05:00
JosJuice b1987d0187 JitArm64: Use ADDI2R for psq_lXX/psq_stXX immediate offsets
This simplifies the source code, and slightly improves the emitted code
in some cases.
2023-12-01 21:31:11 +01:00
JosJuice 67791d227c JitArm64: Add special zero case to ADDI2R
This normally doesn't reduce the instruction count, but is nonetheless
useful on CPUs that can do 0-cycle moves.
2023-12-01 21:31:11 +01:00
JosJuice 25ffb0dbfc JitArm64: Mask input to 32-bit ADDI2R
In case the input was a s32 that got sign extended as part of conversion
to u64.
2023-12-01 21:26:37 +01:00
iwubcode d57c1cbe6c Android / Core / DolphinQt: disable arbitrary mipmap detection by default, let the games that need it be enabled with a config option, there aren't many of them 2023-12-01 14:23:56 -06:00
Sketch b46fcf9032
IOS/KD: Implement Send Mail 2023-12-01 19:55:32 +01:00
Sketch 2c3d05423d
IOS/KD/VFF: Implement reading from VFF 2023-12-01 19:53:01 +01:00
Sketch 0d908a83e7
Common/HTTP: Implement Multiform 2023-12-01 19:52:21 +01:00
Mai 5f7e9d3bf1
Merge pull request #12320 from JosJuice/jitarm64-mmu-order
PowerPC: Unify "FromJit" MMU functions
2023-11-30 18:34:32 -05:00
Mai d85cb749c0
Merge pull request #11382 from skyfloogle/traversal-fix-2
Traversal: Use low TTL for probe packet
2023-11-30 18:03:50 -05:00
Mai d67f54b175
Merge pull request #12186 from TellowKrinkle/MultiTextureComputeMetal
VideoBackends:Metal: Support multiple compute textures
2023-11-30 17:46:02 -05:00
JosJuice 94b31eb4f4 Jit: Replace MSR/MMCR access with feature_flags access
This has the same effect in the end, but in my opinion, doing it this
way makes it more clear for the reader why we can read from ppcState at
JIT time, something that makes no sense for everything else in ppcState.
2023-11-30 22:40:36 +01:00
JosJuice 62787085e1 Jit: Add feature flag for performance monitor
By making the JIT cache check if the current state of MMCR0 and MMRC1
matches the state they had at the time the JIT block was compiled, we
solve a correctness issue (marked in a comment as a speed hack).

Not known to affect any games.
2023-11-30 22:40:36 +01:00
JosJuice ca7e05bbc4 Jit: Replace "msrBits" with "featureFlags"
Preparation for the next commit.
2023-11-30 22:40:32 +01:00
JosJuice 4b50a38cf6 JitArm64: Fix JitAsm without entry points map
This must have broken in a rebase of one of my recently merged PRs.

Dolphin still worked correctly with this bug, for two reasons:

1. Most AArch64 users are not on Windows, and therefore normally do have
   the entry points map.
2. When the bug was triggered, Dolphin would fall back to the slower
   path rather than crashing.
2023-11-30 20:11:02 +01:00
TellowKrinkle 394dd02d0a VideoBackends:Metal: Support multiple compute textures 2023-11-29 18:45:11 -06:00
TellowKrinkle a399dc43a1 VideoBackends:Metal: Align utility uniform sizes
Prevents complaining from validation layers
2023-11-29 18:45:11 -06:00
Mai 89963c287c
Merge pull request #11958 from JosJuice/jitarm64-dispatcher-microopt
JitArm64: Dispatcher optimizations
2023-11-29 16:54:09 -05:00
JosJuice bddcf60673 PPCAnalyst: Don't discard CR before gather pipe interrupt check
This fixes a frequently occurring JitArm64 assert caused by merging
6cc4f593e5 without adapting it to the changes made in 5902b5b113.
2023-11-29 21:53:13 +01:00
JosJuice 06c7862160 JitArm64: Rearrange dispatcher instructions to improve scheduling
Loads can take a little while to complete.
2023-11-29 19:13:09 +01:00
JosJuice 9e970bcb30 JitArm64: Optiming shifting and masking PC in slow dispatcher
Instead of shifting left by 1, we can first shift right by 2 and then
left by 3. This is both faster and smaller, because we get the right
shift for free with the masking and the left shift for free with the
address calculation. It also happens to match the pseudocode more
closely, which is always nice for readability.
2023-11-29 19:13:09 +01:00
JosJuice c9347a2a19 JitArm64: Use LDP in slow dispatcher
With one LDP instruction, we can replace two LDR instructions.
2023-11-29 19:13:09 +01:00
JosJuice 4a4e7d9b8a Jit: Swap locations of effectiveAddress and msrBits
This slightly improves instruction-level parallelism in Jit64's slow
dispatcher by shifting the PC left instead of the MSR.

In the past, this also enabled an optimization in JitArm64's fast path
where we could use LDP to load normalEntry and msrBits in one
instruction, but this was superseded by fd9c970.
2023-11-29 19:13:09 +01:00
JosJuice 3df09f349d JitArm64: Prefer X8 and up for temporary registers in JitAsm
Just to make the code easier to understand at a glance. I especially
found it a bit annoying to reason about whether callee-saved registers
like W28 were being used because we needed a callee-saved register or
just for no reason in particular.

X8 and up is what compilers normally use when they're not register
starved.
2023-11-29 19:13:03 +01:00
Mai 0a62b30cd4
Merge pull request #11906 from noahpistilli/request-register-user-id
IOS/KD: Implement Request Register User ID
2023-11-29 03:31:59 -05:00
Mai 02de58eb2c
Merge pull request #12337 from Tilka/imm16
Jit64: fix invalid instruction encoding
2023-11-29 01:10:22 -05:00
Tillmann Karras f6131e9703 Jit64: fix invalid instruction encoding
This is a recent regression introduced in
c70dcf99dd.
2023-11-29 05:49:02 +00:00
Mai a7216a3035
Merge pull request #9857 from JosJuice/jitarm64-cr-analysis
PPCAnalyst: Allow more reordering of CR operations
2023-11-28 21:01:07 -05:00
Sketch f2607cdd74 IOS/KD: Implement Request Register User ID 2023-11-28 20:40:15 -05:00
Mai b7435be90a
Merge pull request #12298 from Shoegzer/master
Update default IP for HLE BBA
2023-11-28 22:45:17 +01:00
Mai d095bddbe7
Merge pull request #12141 from JosJuice/jit-blr-msr
Jit: Check MSR state in BLR optimization
2023-11-28 22:35:35 +01:00
JosJuice fc95d59805 JitArm64: Further optimize NaN handling in ps_sumX
So short that using farcode is pointless!
2023-11-28 21:45:44 +01:00
JosJuice 8274dcbfe4 JitArm64: Skip checking last input for NaN for non-SIMD operations
AArch64's handling of NaNs in arithmetic instructions matches PowerPC's
as long as no more than one of the operands is NaN. If we know that all
inputs except the last input are non-NaN, we can therefore skip checking
the last input. This is an optimization that in principle only works for
non-SIMD operations, but ps_sumX effectively is non-SIMD as far as the
arithmetic part of it is concerned, so we can use it there too.
2023-11-28 21:45:40 +01:00
Mai 95f06ef231
Merge pull request #12122 from JosJuice/jit-imm-msr
Jit: Handle imm msr in EmitStoreMembase
2023-11-28 21:34:23 +01:00
Mai 8cf0597d5f
Merge pull request #12091 from JosJuice/jitarm64-skip-quiet-bit
JitArm64: Use one instruction for making NaNs quiet
2023-11-28 21:33:25 +01:00
Mai e99ead0a68
Merge pull request #12124 from JosJuice/jitarm64-mfsrin-mtsrin-addr
JitArm64: Optimize mfsrin/mtsrin address calculations
2023-11-28 21:30:30 +01:00
Mai b53ecd73fb
Merge pull request #12143 from JosJuice/jitarm64-loadstore-pc
JitArm64: Write PC when calling MMU.cpp
2023-11-28 21:29:37 +01:00
Mai 1df685b2d7
Merge pull request #12123 from JosJuice/jit-mcrxr
Jit: Some mcrxr optimizations
2023-11-28 19:32:47 +01:00
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