Commit Graph

29733 Commits

Author SHA1 Message Date
JMC47 1b2d0c0507
Merge pull request #10575 from JosJuice/jitbase-auto-clear
Jit: Automatically clear cache when JIT settings are updated
2023-08-29 15:56:25 -04:00
Admiral H. Curtiss 69db8a615f
Merge pull request #12145 from JosJuice/ubershaderpixel-uint
VideoCommon: Fix GLSL uint handling in UberShaderPixel
2023-08-29 12:33:54 +02:00
Admiral H. Curtiss df120b0630
Merge pull request #12000 from Filoppi/window_res_fix
Video: Fix issues with the window presentation
2023-08-28 23:50:50 +02:00
Admiral H. Curtiss 357db03fc8
Merge pull request #12030 from LillyJadeKatrin/retroachievements-bugfix-3
RetroAchievements - Fixed Leaderboard Scored message format
2023-08-28 23:28:37 +02:00
JosJuice 5b112dbf2c VideoCommon: Fix GLSL uint handling in UberShaderPixel 2023-08-28 21:17:01 +02:00
JosJuice 58f247290f Use latest resolution value for resolution hotkey OSD
Because CPU thread config changed callbacks are no longer instant,
g_Config.iEFBScale doesn't yet contain the new value when the hotkey OSD
code tries to read it.

Should fix https://bugs.dolphin-emu.org/issues/13343.
2023-08-27 15:38:00 +02:00
Frajo Haider 7daa19f40d JitArm64: Avoid loading compilerPC multiple times if it's already in a register. 2023-08-26 18:14:07 +03:00
JosJuice 85281e76ee Jit: Remove unnecessary member variables 2023-08-26 17:05:04 +02:00
JosJuice 07d70db46b DolphinQt: Allow toggling most JIT debug settings at any time
There's no reason not to allow this now that these settings are
cleanly integrated into the new config system. (Actually, maybe
we could even have done this before the previous commit...)
2023-08-26 17:05:04 +02:00
JosJuice 28e8117b90 Jit: Automatically clear cache when JIT settings are updated
This fixes a problem where changing the JIT debug settings on
Android while a game was running wouldn't cause the changed settings
to apply to code blocks that already had been compiled.
2023-08-26 17:04:56 +02:00
JosJuice cd31da97d6
Merge pull request #11191 from JosJuice/jitarm64-no-checked-entry
JitArm64: Never check downcount on block entry
2023-08-26 17:00:08 +02:00
Admiral H. Curtiss 799ce0dc9d
Merge pull request #12097 from Dentomologist/ios_remove_unused_member_variables
IOS: Remove unused member variable from SharedContentMap and UIDSys
2023-08-26 16:41:45 +02:00
Admiral H. Curtiss 2502e412b3
Merge pull request #12117 from JosJuice/config-callback-cpu
Don't call RunAsCPUThread in config callbacks
2023-08-26 16:34:46 +02:00
Admiral H. Curtiss d8e35438bd
Merge pull request #12127 from sepalani/ascii_
MemoryViewWidget: Fix some characters being truncated
2023-08-26 14:56:26 +02:00
Admiral H. Curtiss 65a9be581f
Merge pull request #12121 from JosJuice/discscrubber-volume-ptr
DiscIO: Don't keep volume pointer in DiscScrubber
2023-08-26 14:31:15 +02:00
Admiral H. Curtiss dec2990053
Merge pull request #12128 from Dentomologist/gcc_suppress_ppcstate_off_warning_spam
GCC: Suppress PPCSTATE_OFF invalid-offsetof warnings
2023-08-26 14:22:04 +02:00
Admiral H. Curtiss e876045e56
Merge pull request #12135 from Dentomologist/jitarm64_resolve_deprecated_enum_conversion_warning
JitArm64: Resolve deprecated enum conversion warning
2023-08-26 14:18:58 +02:00
Admiral H. Curtiss 5c4671f573
Merge pull request #12126 from JosJuice/small-vector
Move SmallVector to Common
2023-08-26 14:15:18 +02:00
Dentomologist a650a16f4c JitArm64: Resolve deprecated enum conversion warning
Resolve warning caused by using values from two different enums in a
conditional expression which was deprecated in c++20.

The warning in question is clang -Wdeprecated-anon-enum-enum-conversion
and gcc -Wenum-compare.
2023-08-23 14:38:52 -07:00
JosJuice ba99d17ac0 VideoCommon: Fix custom shader constants on GLES 2023-08-22 19:38:18 +02:00
Admiral H. Curtiss 4223cd0264
Merge pull request #12130 from JosJuice/translation-fixes
Fixes to translatable strings
2023-08-22 16:44:36 +02:00
JosJuice 6e88c44d5d Move SmallVector to Common
We had one implementation of this type of data structure in Arm64Emitter
and one in VideoCommon. This moves the Arm64Emitter implementation to
its own file and adds begin and end functions to it, so that VideoCommon
can use it.

You may notice that the license header for the new file is CC0. I wrote
the Arm64Emitter implementation of SmallVector, so this should be no
problem.
2023-08-22 13:19:49 +02:00
iwubcode 55fba7c0ed
VideoCommon/GraphicsModAsset: Error out if config key is not a string. 2023-08-22 02:40:08 +02:00
Dentomologist 58ab94c30c GCC: Suppress PPCSTATE_OFF invalid-offsetof warnings
Modify PPCSTATE_OFF and PPCSTATE_OFF_ARRAY macros when using GCC to
avoid useless log spam. Specifically, use a consteval lambda with gcc
_Pragma statements to disable the -Winvalid-offsetof warning inside the
macros.

Each successful build (and many failing ones) on the Android buildbot
generates almost 300 cases of -Winvalid-offsetof, resulting in thousands
of lines of log spam per build. In addition to bloating the log filesize
these spurious warnings make it harder to find actual warnings.

These warnings are generated by calls to the macros PPCSTATE_OFF and
PPCSTATE_OFF_ARRAY, which in turn are used by many other macros used by
the JIT. The ultimate cause is that offsetof is only conditionally
supported on non-standard-layout types, which includes the PowerPCState
struct.

To address potential questions of whether there's a better way to handle
this:

The obvious solution would be to modify PowerPCState so that it does
have a standard layout. This is unfortunately impractical.

To have a standard layout a type can only contain other types with
standard layouts. None of the stl containers are guaranteed to have
standard layouts, and PowerPCState contains a std::tuple and std::array.
PowerPCState also contains a PowerPC::Cache and InstructionCache which
themselves contain std:arrays and std::vectors.

Furthermore InstructionCache derives from Cache, and a derived class can
only have standard layout if at most one class in its hierarchy has a
non-static data member, but both classes have such members. Making
InstructionCache have a standard layout would require duplicating all
the functionality of Cache so it no longer derived from it, as well as
replacing the stl containers. This might require having a raw pointer to
said containers, with the manual memory management that implies.

All of that would be much more disruptive than would be justified to get
rid of some warnings (however annoying they might be). This is
compounded by the fact that PowerPCState hasn't had a standard layout
for a long time, if ever, and if the PPCSTATE_OFF macros weren't working
reliably it would have become obvious a long time ago.

As to why I picked the lambda solution over other potential changes:

- Keeping the define as-is and wrapping some gcc #pragmas around it
  doesn't work because the pragmas don't get included when the define is
  substituted to the call site.

- Keeping the define as a non-lambda expression and using inline
  _Pragma() statements would ideally be better and works fine for msvc,
  but fails for GCC with "'#pragma' is not allowed here".

- Turning off -Winvalid-offsetof globally for gcc would work, but there
  might be other contexts where offsetof is problematic and GCC seems to
  be the only compiler warning about it.
2023-08-21 14:01:11 -07:00
Sepalani 573863703a MemoryViewWidget: Fix some characters being truncated 2023-08-21 22:02:44 +04:00
JosJuice e7c2133160 Fixes to translatable strings 2023-08-21 16:29:52 +02:00
iwubcode 5506121685 VideoCommon: add support to graphics mod manager to load in assets and pass it to graphics actions 2023-08-20 18:53:27 -05:00
iwubcode 6ea0d17802 VideoCommon: when graphics settings change, trigger a reload of all custom shaders 2023-08-20 18:53:27 -05:00
iwubcode 931a8aa413 VideoCommon: add milliseconds elapsed time value to pixel shaders as a uniform to be able to support animation effects in custom shaders 2023-08-20 18:53:27 -05:00
iwubcode c7191382be VideoCommon: add custom pipeline action 2023-08-20 18:53:27 -05:00
iwubcode d320366954 VideoCommon: add custom shader cache to VertexManagerBase, supporting custom pixel shaders by replacing the existing pipeline with a modified one 2023-08-20 18:53:27 -05:00
iwubcode bedbf2b8c6 VideoCommon: add custom shader cache 2023-08-20 18:53:27 -05:00
iwubcode dbaf24ef09 VideoCommon: add data needed to support custom pixel shaders to graphics mod actions 2023-08-20 18:53:27 -05:00
iwubcode 4283d76718 VideoCommon: uber pixel shader gen changes needed to support custom pixel shaders in graphics mods 2023-08-20 18:53:27 -05:00
iwubcode e704385fce VideoCommon: pixel shader gen changes needed to support custom pixel shaders in graphics mods 2023-08-20 18:53:27 -05:00
iwubcode c3a370839a VideoCommon: add helper functions to handle generating custom lighting code for a custom pixel shader 2023-08-20 18:53:27 -05:00
iwubcode 0da5cf60a8 VideoCommon: add custom pixel shader definition and custom shader header to shadergen common as it will be used by both the special and uber shader variant of pixel shaders 2023-08-20 18:53:27 -05:00
Admiral H. Curtiss f19651e49b
Merge pull request #11025 from AdmiralCurtiss/hle-printf
HLE_OS: Manually handle printfs from emulated software to prevent emulated software from crashing Dolphin with an invalid printf formatting string.
2023-08-20 01:31:49 +02:00
JosJuice 0f64df3e3e DiscIO: Don't keep volume pointer in DiscScrubber
Keeping the pointer creates use-after-free opportunities, and we don't
have much reason to keep it around anyway.
2023-08-19 17:30:22 +02:00
Admiral H. Curtiss d36f0fff4c
Jit64: Actually update membase register after GlobalAdvance(). 2023-08-19 17:00:01 +02:00
JosJuice ed7894924c
Merge pull request #12048 from krnlyng/someothertest
Jit: Load the memory register only when the msr bits have changed and do not use jumps to load it.
2023-08-19 09:49:29 +02:00
Admiral H. Curtiss b6bfa10ace
Merge pull request #11996 from Dentomologist/remove_pointless_pauseandlock_functions
EXI: Remove pointless PauseAndLock functions
2023-08-18 21:35:56 +02:00
Admiral H. Curtiss bb4ed1c450
Merge pull request #12118 from AdmiralCurtiss/tas-window-translatable
DolphinQt/TASInputWindow: Make 'Enable Controller Input' translatable.
2023-08-18 21:33:23 +02:00
Admiral H. Curtiss 8a96ce73f6
Merge pull request #12044 from jmlee337/upnpport
Do not try portmapping when using traversal server
2023-08-18 21:28:52 +02:00
Admiral H. Curtiss 9a51215af3
Merge pull request #12083 from JosJuice/android-controlled-by-gamepad
InputConfig: Update IsControllerControlledByGamepadDevice for Android input overhaul
2023-08-18 21:27:26 +02:00
xujibbs b3902397cb
DolphinQt/TASInputWindow: Make 'Enable Controller Input' translatable. 2023-08-18 21:02:30 +02:00
Admiral H. Curtiss 3441fe6efc
Merge pull request #11999 from Filoppi/post_process_fixes
Video: implement output resampling (upscaling/downscaling) methods
2023-08-18 20:33:09 +02:00
JosJuice a9ec2a6e41
Merge pull request #12116 from AdmiralCurtiss/log-colors
DolphinQt/LogWidget: Restore log window colors.
2023-08-18 09:00:43 +02:00
Filoppi 8bca9a864f Video: The `Auto` internal resolution scaling wasn't working correctly if the window weird aspect ratios (e.g. 32:9), beacuse it would account for the the portion of the image that will show black bars into the calcuations to find the best matching resolution 2023-08-18 02:14:00 +03:00
Filoppi 6c7f34d5da Video: The `Auto-Adjust Window Size` setting was calculating the window size based on the resolution of the window in the previous frame if we used the "stretch" aspect ratio setting, so it's result would be self influence in a loop and behave unreliably (e.g. when changing resolution between Auto/Native/2x the automatic window scaling would behave randomly) 2023-08-18 02:14:00 +03:00