Commit Graph

27130 Commits

Author SHA1 Message Date
Pokechu22 3b5faf90f3 FifoAnalyzer: Fix "enumeration value ‘NotPresent’ not handled in switch" warning 2022-02-13 14:38:59 -08:00
Pokechu22 7c91acb000
Merge pull request #10449 from Pokechu22/unknown-opcode-log
CommandProcessor: Move unknown opcode log message before the panic alert and log ignored unknown opcodes at warn level
2022-02-13 14:37:06 -08:00
JMC47 86dbf768b9
Merge pull request #10447 from JosJuice/resetcodeptr-on-decrement
Common/CodeBlock: Call ResetCodePtr when decreasing region_size
2022-02-13 17:25:11 -05:00
Pokechu22 07578d8f1d CommandProcessor: Log ignored unknown opcodes at warn level
Large amounts of logging can have an impact on performance, so moving the ones that have been determined to not matter to the warn level gives a way to hide those messages without hiding actual errors (and also gives a fast visual way of distinguishing between ignored and non-ignored ones due to the different colors).
2022-02-13 14:16:05 -08:00
Pokechu22 4ea9287a09 CommandProcessor: Move unknown opcode log message before the panic alert
This way, the extra information is already in the log by the time the panic alert appears, which is slightly more convenient for debugging.
2022-02-13 14:15:54 -08:00
Pokechu22 97482a61c6 CommandProcessor: Ignore unknown opcode for 0x3f 2022-02-12 23:38:20 -08:00
Pokechu22 68cdceb4be CommandProcessor: Log PC and LR on unknown opcodes 2022-02-12 23:38:20 -08:00
Pokechu22 095803d1e9 CommandProcessor: Move contents of second unknown opcode panic alert to the log
This way, the information is always available, and users don't have to deal with a wall of meaningless information.
2022-02-12 23:38:19 -08:00
Pokechu22 1c74867c71 GPFifo: Make s_gather_pipe size new constant GATHER_PIPE_EXTRA_SIZE 2022-02-12 23:38:19 -08:00
Pokechu22 55f8aa9921 VideoCommon/Fifo: Use GPFifo::GATHER_PIPE_SIZE instead of magic 32 2022-02-12 23:38:19 -08:00
Pokechu22 9ffe9d3dc1 CommandProcessor: Remove redundant GATHER_PIPE_SIZE constant 2022-02-12 16:17:03 -08:00
Pokechu22 ce52ea35ec Jit: Replace magic 32 with GPFifo::GATHER_PIPE_SIZE 2022-02-12 16:14:05 -08:00
Pokechu22 f2f9df7541 Remove unused includes of QButtonGroup 2022-02-12 11:40:53 -08:00
Pokechu22 0daee4fe9f CheatSearchFactoryWidget: Set QButtonGroup's parent 2022-02-12 11:40:53 -08:00
Pokechu22 99b3ac21e4 NewBreakpointDialog: Fix improperly behaving radio buttons 2022-02-12 11:40:53 -08:00
Pokechu22 a05dd6b7e6 MemoryWidget: Fix improperly behaving radio buttons 2022-02-12 11:40:53 -08:00
JosJuice 989bdb8d6d Common/CodeBlock: Call ResetCodePtr when decreasing region_size
Fixes https://bugs.dolphin-emu.org/issues/12827.

A description of what was going wrong:

JitArm64::Init first calls CodeBlock::AllocCodeSpace, after which
CodeBlock and Arm64Emitter consider us to have 96 MB of code space
available. JitArm64::Init then calls AddChildCodeSpace, which is
supposed to take 64 MiB of that space and give it to m_far_code.
CodeBlock's view of how much space there is gets updated from 96 MiB
to 32 MiB, but due to the missing call, Arm64Emitter keeps thinking
that it has 96 MiB of space available.

The last thing JitArm64::Init does is to call ResetFreeMemoryRanges.
This function asks Arm64Emitter how much code space is available and
stores a range of that size in m_free_ranges_near, meaning that
m_free_ranges_near ends up being backed by both nearcode and farcode!
This is a ticking time bomb; as soon as we grab memory from
m_free_ranges_near which is backed by farcode, we're in trouble.
The crash I ran into in my testing was caused by fastmem code being
allocated in farcode (our backpatch handler only handles accesses made
from nearcode), but you may as well get errors caused by code intended
for nearcode overwriting code intended for farcode or vice versa.

So why did NBA Live 2005 crash when most games had no problems,
and why was the bug bisected to the commit that increased the size
of far code from 16 MiB to 64 MiB? Well, as long as we're only
using the first 32 MiB of the big 96 MiB range, everything works.
What happens with NBA Live 2005 (I have not investigated exactly
through what mechanism this happens) is that at some point the range
in m_free_ranges_near gets split into two ranges, one which is
backed by nearcode and one which is backed by farcode. Dolphin
prefers to select the biggest range available (we don't want to
pick a tiny 1 KiB range that may not be able to fit the whole block
we're about to emit, after all), and after increasing the size of
farcode to 64 MiB, farcode is bigger than nearcode.
2022-02-12 17:51:32 +01:00
JMC47 9214174bb3
Merge pull request #10435 from AdmiralCurtiss/savestate-crash
Core/State: Add some multithreading protections.
2022-02-11 06:28:46 -05:00
JMC47 9d69ca8850
Merge pull request #10386 from JosJuice/gba-save-dir-cond
Don't create GBA saves dir when building without mGBA
2022-02-11 06:27:43 -05:00
JMC47 30a9777c5a
Merge pull request #10394 from Pokechu22/alpha-1-blend
Revert TEV alpha lerp change and special-case alpha=1 in blending
2022-02-11 06:26:35 -05:00
Admiral H. Curtiss af36b6c055
HotkeyManager: Change defaults for GBA hotkeys so they don't conflict with common keyboard mappings. 2022-02-10 17:30:23 +01:00
JMC47 a6f9dd5a83
Merge pull request #9544 from AdmiralCurtiss/fastmem-placeholder-windows
MemArena: Use memory placeholders for fastmem on Windows to ensure nothing allocates within the fastmem space.
2022-02-09 16:46:15 -05:00
Pokechu22 444f6fd0cb Treat alpha as 0 if alpha is 1 for blending
This removes the white box in fortune street again, without causing Mario Kart Wii to regress.
2022-02-08 15:15:15 -08:00
Pokechu22 0327e6acb4 Use the same logic for lerp bias for color and alpha
It doesn't make sense for alpha to add the bias ONLY when dividing by 2, while color doesn't apply the bias for divide by 2 only; hardware testing indicates that alpha should have the bias.

This fixes the menus in Mario Kart Wii (https://bugs.dolphin-emu.org/issues/11909) but reintroduces the white rectangle in Fortune Street.

This reverts commit 5aaa5141ed (and several other matching changes elsewhere).
2022-02-08 15:15:15 -08:00
OatmealDome a9b5188047 OGLMain: Set default value for bSupportsSettingObjectNames 2022-02-08 14:53:51 -05:00
OatmealDome bdc55f9557 RenderState: Set source and destination alpha factors in logic op workaround 2022-02-07 16:03:22 -05:00
Admiral H. Curtiss 79405de103
MemArena: Use placeholders on Windows. 2022-02-06 18:06:04 +01:00
Admiral H. Curtiss 73311694b0
Core/State: Guard g_save_thread with a mutex. 2022-02-05 21:50:37 +01:00
Admiral H. Curtiss 56ea1c1d74
Core/State: Guard SaveAs() and LoadAs() with a mutex. 2022-02-05 21:50:34 +01:00
Admiral H. Curtiss 09a0ba06c0
Merge pull request #10417 from jordan-woyak/libavformat-59-build-fix
VideoCommon/FrameDump: Build fix for libavformat major version 59 and newer.
2022-02-04 20:42:34 +01:00
Mai M 40cda23491
Merge pull request #10404 from iwubcode/vulkan_headers_update
Externals / Vulkan: update Vulkan headers to v1.3.204
2022-02-04 01:04:29 -05:00
JMC47 4d1e6ff76a
Merge pull request #10422 from OatmealDome/opengl-shader-crash
VideoConfig: Add flag for whether the system supports setting object names
2022-01-31 01:25:46 -05:00
OatmealDome 8be3572c83 D3D12: Assume support for setting object names 2022-01-31 01:17:40 -05:00
OatmealDome 73d957f65c D3DMain: Assume support for setting object names 2022-01-31 01:17:40 -05:00
OatmealDome 4c7fe45475 VKShader: Only set shader name if supported 2022-01-31 01:17:40 -05:00
OatmealDome 28f3cb3d97 VKTexture: Only set texture name if supported 2022-01-31 01:17:40 -05:00
OatmealDome a8ce71fcd4 VulkanContext: Set bSupportsSettingObjectNames based on extension initialization result 2022-01-31 01:17:40 -05:00
OatmealDome 801897467c VulkanEntryPoints: Make vkSetDebugUtilsObjectNameEXT an instance function 2022-01-31 01:17:40 -05:00
OatmealDome a720083a7e Revert "Vulkan: Check for vkSetDebugUtilsObjectNameEXT before using it"
This reverts commit 2ab66390f8.
2022-01-31 01:17:40 -05:00
OatmealDome b36c866398 OGLTexture: Only set texture name if supported 2022-01-31 01:17:40 -05:00
OatmealDome ea1ac73c38 OGLShader: Only set shader name if supported 2022-01-31 01:17:40 -05:00
OatmealDome 390cc13834 OGLRender: Set object name support on GL >4.3 and GL ES 3.2 2022-01-31 01:17:40 -05:00
OatmealDome 947b562e06 VideoConfig: Add flag for whether the system supports setting object names 2022-01-31 01:17:37 -05:00
JMC47 8e21495c59
Merge pull request #10419 from OatmealDome/mac-updater-rename
UpdaterCommon: Copy content file to a temporary file before renaming on macOS
2022-01-30 19:45:58 -05:00
OatmealDome 90665fbabe UpdaterCommon: Copy content file to a temporary file before renaming on macOS 2022-01-30 15:40:28 -05:00
Jordan Woyak a9a163657c VideoCommon/FrameDump: Build fix for libavformat major version 59 and newer. av_guess_format now returns a pointer to const. 2022-01-30 13:16:51 -06:00
Admiral H. Curtiss ff071f8b75
Core/BaseConfigLoader: Disallow loading the MAIN_MEMORY_CARD_SIZE from the global config INI. 2022-01-29 22:32:19 +01:00
Admiral H. Curtiss 63df67b7c8
Merge pull request #10395 from AdmiralCurtiss/memcard-size-setting
Port memory card size override setting to new config system.
2022-01-29 22:32:00 +01:00
Pokechu22 4aeef95746 Fix copy filter clamping when EFB VRAM copies are disabled 2022-01-29 12:23:32 -08:00
iwubcode 8e3dbe9671 Externals / Vulkan: update Vulkan headers to v1.3.204. Fix default present mode in Vulkan swap chain 2022-01-29 00:47:51 -06:00
Admiral H. Curtiss a336c4386c
IOFile: Rename Clear() to ClearError() for clarity. 2022-01-29 06:49:22 +01:00
Admiral H. Curtiss 36cfcb530f
IOFile: Make origin parameter to Seek() an enum class. 2022-01-29 06:49:21 +01:00
JMC47 c2d8191fbb
Merge pull request #10401 from JosJuice/adreno-primitive-restart
DriverDetails: Disable primitive restart on Adreno
2022-01-28 15:12:43 -05:00
JosJuice 4f292f5ade DriverDetails: Disable primitive restart on Adreno
Turning off primitive restart increases performance a lot on
Adreno for some reason. We're talking numbers like 50%-100% faster
in situations which are bottlenecked by rendering.
2022-01-28 20:25:18 +01:00
JMC47 f0136e0eb6
Merge pull request #10396 from Pokechu22/efb-copy-clamp
Fix copy filter clamping (again)
2022-01-27 20:12:34 -05:00
JosJuice 80771ec89e
Merge pull request #10399 from Pokechu22/ubershader-fog-typo
UberShaderPixel: Fix typo in fog calculation
2022-01-27 22:59:49 +01:00
JosJuice 90f7565fcc
Merge pull request #10385 from shuffle2/arm-buildfix
msvc/arm64: fix shadowed variable warning
2022-01-27 18:00:33 +01:00
Pokechu22 cc9ed4815d UberShaderPixel: Fix typo in fog calculation 2022-01-26 20:23:35 -08:00
Pokechu22 ab5e71abf3
Merge pull request #10387 from Pokechu22/geometry-shader-always-write-layer
GeometryShaderGen: Write the layer for every vertex
2022-01-26 13:37:40 -08:00
Pokechu22 25c547e9e5 Fix incorrect copy filter clamping
We need to clamp to the center of pixels, or else things end up working out incorrectly.  This also fixes an off-by-1 for the bottom line.
2022-01-25 19:53:25 -08:00
Admiral H. Curtiss 407aefb6b9
Netplay: Get memory card size override setting from config system instead of manually parsing INI. 2022-01-26 00:57:44 +01:00
Admiral H. Curtiss b88507a3ed
Core: Port memory card size override setting to new config system. 2022-01-25 23:50:03 +01:00
Dentomologist d3ae1bd415 [Android] Fix unused variable warning
Add [[maybe_unused]] attribute to ConsoleListener's m_use_color
2022-01-25 14:15:18 -08:00
Pokechu22 e741d4783a TextureConverterShaderGen: Add missing newline 2022-01-25 13:22:56 -08:00
JosJuice b237c7479e
Merge pull request #10371 from lynxnb/android-ir
Android: add two QoL settings to IR pointer
2022-01-24 18:25:13 +01:00
lynxnb b4edd16f24 Android: add an option to recenter IR after every pointer interaction 2022-01-24 12:03:51 +01:00
lynxnb fe9ac4ed1d Android: add IR pointer modes to InputOverlayPointer
* Disabled: disables the overlay pointer
* Follow: default behaviour, IR pointer follows touch position
* Drag: IR pointer moves relative to the initial touch event position
2022-01-24 12:03:51 +01:00
JosJuice ff5b323a56 DiscIO: Delete an unused function declaration 2022-01-23 22:15:56 +01:00
Pokechu22 8d7eff2a8a VideoCommon: Move logging/seen check for unknown opcodes into CommandProcessor
That way, they're in the same place the panic alerts are generated.
2022-01-22 22:04:15 -08:00
Pokechu22 79b2185117 OpcodeDecoding: Don't raise panic alerts for unknown opcodes 0x01-0x07
A pop-up is no longer generated for the Wiggler capsule in Mario Party 5 (https://bugs.dolphin-emu.org/issues/8104).
2022-01-22 16:49:19 -08:00
Pokechu22 6420845fcb GeometryShaderGen: Write the layer for every vertex
At least in GLSL, after calling EmitVertex() the value of all 'out' variables (including gl_Layer and ps) becomes undefined.  On OpenGL it seems like they were unchanged, but on Vulkan they became 0, resulting in bad rendering.

Fixes https://bugs.dolphin-emu.org/issues/12001
2022-01-22 12:16:48 -08:00
JMC47 237947e2f1
Merge pull request #10369 from Simonx22/android-online-system-update-2
Android: Add online system update functionality
2022-01-22 14:46:42 -05:00
JosJuice a3f5d09a54 Don't create GBA saves dir when building without mGBA
Currently, disabling mGBA when building gets rid of the ability to
change the GBA saves directory in DolphinQt, but it doesn't actually
get rid of Dolphin loading and storing the setting and creating the
folder. If the setting is set to a path you don't want to use
(perhaps you are trying to turn Dolphin portable), this is annoying.

To avoid accidentally making mistakes like this in the future,
I'm gating the existence of the setting behind an ifdef.
2022-01-22 16:05:21 +01:00
shuffle2 4ce9944cc5
remove redundant Unlock 2022-01-22 05:58:32 -08:00
Shawn Hoffman acf6e24586 msvc/arm64: fix shadowed variable warning 2022-01-22 03:31:50 -08:00
OatmealDome 19e1809cdf WiiUtils: Add function to convert UpdateResult to jint 2022-01-21 17:16:23 -05:00
JosJuice 7b8e846d0a
Merge pull request #10367 from Pokechu22/fmt-8.1.1
Update to fmt 8.1.1
2022-01-20 21:14:41 +01:00
Pokechu22 75cdcd5ac2 FifoPlayer: Add missing call to LoadSettings()
This resulted in the loop checkbox appearing unchecked, even though loop was enabled.
2022-01-17 11:00:13 -08:00
Shawn Hoffman 3175e38a2e GXPipelineUid: remove explicit shallow copy where it's the default 2022-01-16 22:34:39 -08:00
Pokechu22 43e146a1d5 GameList: Convert file extensions to lowercase
This means that dol/elf files with upercase extensions (e.g. BOOT.DOL) are properly detected.
2022-01-16 17:00:16 -08:00
Pokechu22 6e5f4125e3 Use Common::ToLower and Common::ToUpper 2022-01-16 17:00:12 -08:00
Pokechu22 aaec64501a Create Common::ToLower and Common::ToUpper 2022-01-16 16:56:53 -08:00
Léo Lam e627718560
Merge pull request #10373 from Pokechu22/cmake-tab
CMakeLists: Replace tab characters with spaces
2022-01-17 00:47:29 +01:00
Léo Lam cb19472f54
Merge pull request #10372 from Pokechu22/discio-core-dep
CMakeLists: Change DiscIO dependency from common to core
2022-01-17 00:39:55 +01:00
Pokechu22 ad9e8d97a9 CMakeLists: Replace tab characters with spaces
This commit only touches CMakeLists in Source and the main one; it doesn't touch them in Externals.
2022-01-16 15:20:40 -08:00
Pokechu22 65788290f6 Raise a panic alert if a movie is recorded with memcards but no memcards are inserted 2022-01-16 14:21:33 -08:00
Pokechu22 19ef936e27 Use Slot in GameCubePane 2022-01-16 14:21:33 -08:00
Pokechu22 9109258b85 Use Slot in GCMemcardManager 2022-01-16 14:21:32 -08:00
Pokechu22 777bb4d82c Use Slot in EXI devices 2022-01-16 14:21:28 -08:00
Pokechu22 7935e614d1 CMakeLists: Change DiscIO dependency from common to core
DiscIO depends on some IOS functions and other functions, which are in Core and not Common.  This results in link errors if using DiscIO on its own (which is why DolphinTool had a listed dependency on videocommon; videocommon has a dependency on core so adding that made things build).
2022-01-16 13:29:51 -08:00
Pokechu22 3f0b23ed2b Create Slot enum class for EXI slots 2022-01-14 20:24:53 -08:00
Pokechu22 fefde0481d Use EnumFormatter to generate names for EXI devices
This simplifies the code in GameCubePane, and allows us to use the EXIDeviceType enum in error messages.
2022-01-14 20:24:53 -08:00
Pokechu22 d354163fbe Replace TEXIDevices with an enum class 2022-01-14 20:24:53 -08:00
Léo Lam 83c5446d85
Fix static initialisation order fiasco issue for Version variables
Fixes a crash that could occur if the static constructor function for
the MainSettings.cpp TU happened to run before the variables in
Common/Version.cpp are initialised. (This is known as the static
initialisation order fiasco.)

By using wrapper functions, those variables are now guaranteed to be
constructed on first use.
2022-01-14 00:04:22 +01:00
Pokechu22 fd04f4f32d Replace use of of unsigned char* with fmt
Using unsigned char* or signed char* results in a deprecation warning, which is treated as an error.  It needs to be casted to regular char* for it to work.
2022-01-13 11:11:08 -08:00
Pokechu22 29d6dd609c Fix non-constexpr format strings 2022-01-13 11:11:08 -08:00
Pokechu22 18cf8ac767 Create EnumFormatter for WD Command enums 2022-01-13 11:11:08 -08:00
Pokechu22 1a92699455 Cast to int for enums that are not formattable 2022-01-13 11:11:08 -08:00
Pokechu22 5465775d11 Fix ambiguous uses of format_to
At least in MSVC (which is not restricted from targetting C++20), these can be resolved to either std::format_to or fmt::format_to (though I'm not sure why the std one is available).  We want the latter.
2022-01-13 11:11:08 -08:00
Pokechu22 ac46b91673 Make all fmt::formatter constructors constexpr 2022-01-13 11:11:08 -08:00