Commit Graph

268 Commits

Author SHA1 Message Date
Léo Lam 049b92b7ef
Merge pull request #9417 from Filoppi/input-1
Fix FPS counter and Game Window speed % breaking on pause/unpause
2021-05-07 15:08:01 +02:00
Filoppi 818672b585 Fix FPS counter and Game Window speed % breaking on pause/unpause
-Add pause state to FPSCounter.
-Add ability to have more than one "OnStateChanged" callback in core.
-Add GetActualEmulationSpeed() to Core. Returns 1 by default. It's used by my input PRs.
2021-05-06 01:10:04 +03:00
Scott Mansell a4796e512a Implement EFB Peeks for compressed z16 formats
This fixes an issue in RS3 where engine lens flares would shine
though ships during cutscenes
2021-05-05 11:32:29 +12:00
Pokechu22 70f9fc4e75 Convert BPMemory to BitField and enum class
Additional changes:
- For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare.  (Shift has also been renamed to scale)
- In TexMode0, min_filter has been split into min_mip and min_filter.
- In TexImage1, image_type is now cache_manually_managed.
- The unused bit in GenMode is now exposed.
- LPSize's lineaspect is now named adjust_for_aspect_ratio.
2021-03-06 19:27:19 -08:00
Pokechu22 f2bea67709 Fix typo with ztex2 op in UseVertexDepthRange 2021-03-06 19:27:17 -08:00
Shawn Hoffman 07fd02f207 rename Core/Analytics to Core/DolphinAnalytics 2021-01-27 14:29:47 -08:00
Filippo Tarpini a5a6ef8512
Fix a couple of typos
[committer note: fixed commit message style]
2021-01-05 15:24:21 +01:00
iwubcode 16dc2fa379 VideoCommon: Fix crash that occurs on loading a fifo log due to uninitialized Free Look control type 2020-12-26 17:26:21 -06:00
iwubcode c7b24d6213 VideoCommon: Update active config when we check for config changes, this ensures Free Look settings are copied at the start of the frame. Also update the camera's controller type at this time 2020-12-24 13:51:46 -06:00
iwubcode f6ab9a9b6f Core / VideoCommon: Remove old Free Look config 2020-12-24 13:49:25 -06:00
Léo Lam 0ad2f3da45
Core: Remove ImageWrite and get rid of -Wmissing-declarations warnings 2020-12-16 16:04:19 +01:00
JosJuice d69f243c32 FrameDump: Start timing at 0 ticks when starting from boot 2020-11-27 17:54:08 +01:00
JosJuice e63b00e562 Fix translatable strings which contain non-positional arguments 2020-11-20 20:24:30 +01:00
Lioncash 3d9b2aa005 VideoCommon: Migrate over to fmt
Migrates off the printf-based formatting where applicable.
2020-11-17 21:23:58 -05:00
Jordan Woyak 4807a5e157 VideoCommon: FrameDump fixes/cleanups. 2020-10-22 12:17:26 -05:00
iwubcode fd3af4c5d3 InputCommon: Introducing the "Dynamic Input Texture". Configuration links an emulated input action to an image based on what host key is defined for that emulated input. Specific regions are called out in configuration that mark where to replace an input button with a host key image. 2020-10-03 17:10:35 -05:00
JosJuice 7385e9129c Remove wait_for_completion parameter from Renderer::SaveScreenshot
This is now unused. Seems like it was an improper fix
(there would be a race if saving the screenshot took longer
than 2 seconds) back when it was used too.
2020-08-06 21:57:12 +02:00
Connor McLaughlin 9c12a843f8
Merge pull request #8884 from iwubcode/freelook_performance_fix
VertexShaderManager: Only look for freelook config changes if we're using freelook
2020-07-04 14:19:59 +10:00
iwubcode 0441d6aa5e VertexShaderManager: Avoid accessing freelook control type configuration each call which caused a performance hit, move check to RenderBase where it is checked when config changes 2020-07-02 12:55:08 -05:00
JosJuice 81d399a4f2 VideoCommon: Show profiler output again
This profiler was added in 94d9d13, but must've broken at some point.
2020-06-29 11:59:47 +02:00
JMC47 935b12d785
Merge pull request #8730 from JosJuice/frame-advance-duplicate-frame
Core: Skip duplicate frames when using frame advance
2020-04-16 18:29:16 -04:00
JosJuice 1a42355f96 Core: Clarify Callback_VideoCopiedToXFB and FrameUpdate 2020-04-09 00:21:04 +02:00
Jordan Woyak 7cbb9822c1 VideoCommon: Remove widescreen heuristic debug logs. 2020-02-09 13:22:27 -06:00
Jordan Woyak 10223da6a8 VideoCommon: Tweak widescreen heuristic and clean up some related Renderer logic. 2020-02-09 13:22:25 -06:00
Jordan Woyak b92f6480a0 InputCommon: Make "Cursor" inputs aware of the rendered aspect ratio. 2020-01-24 09:20:41 -06:00
Stenzek 11ba623f26 Add an option to present/skip presenting duplicate frames
Currently, we do not display every second frame in 25fps/30fps games
which run to vsync. This improves performance as there's less rendering
for the GPU to perform, but when combined with vsync, could cause frame
pacing issues.

This commit adds an option to force every frame generated by the console
to be displayed to the host, which may improve pacing for these games.
2020-01-14 10:57:35 +10:00
Lioncash b2a9c36501 VideoCommon/OpcodeDecoding: Move g_bRecordFifoData into namespace
Keeps the global localized with the code that it's primarily related to.

Now it's obvious from a glance what the global variable is affecting.
2019-12-05 09:13:03 -05:00
Lioncash 6fbbc2683e VideoCommon: Make use of fmt outside of shader generators
Migrates most of VideoCommon over to using fmt, with the exception being
the shader generator code. The shader generators are quite large and
have more corner cases to deal with in terms of conversion (shaders have
braces in them, so we need to make sure to escape them).

Because of the large amount of code that would need to be converted, the
conversion of VideoCommon will be in two parts:

- This change (which converts over the general case string formatting),
- A follow up change that will specifically deal with converting over
  the shader generators.
2019-11-23 16:00:45 -05:00
Stenzek af849126b3 Renderer: Use interface blocks for ImGui shaders 2019-10-02 12:52:45 +10:00
Stenzek c98a5f7dfd Renderer: Draw ImGui interface to both eyes 2019-10-02 12:19:47 +10:00
Silent 37ef5a54c9
Core: Use move semantics for Renderer::SaveScreenshot 2019-08-28 19:52:35 +02:00
Lioncash 7366b4281f VideoCommon/RenderBase: Remove dependency on renderer global within renderer
There's no need to have a dependency when we can simply call the
function itself as part of the instance itself.
2019-08-04 23:01:19 -04:00
Lioncash cfdfbbff38 VideoCommon/RenderBase: Use structured bindings where applicable
Same behavior, but immediately assigns to variables, allowing them to be
const.
2019-08-04 22:59:07 -04:00
Lioncash dd5b8895fe VideoCommon/RenderBase: Make functions const where applicable 2019-08-04 22:52:00 -04:00
Stenzek 1082468133 TextureCache: Support saving cache entries, including EFB copies 2019-07-24 04:10:38 +10:00
Lioncash 2b9389202e VideoCommon: Remove unused MathUtil.h include from VideoCommon.h
This header doesn't actually make use of MathUtil.h within itself, so
this can be removed. Many other source files used VideoCommon.h as an
indirect include to include MathUtil.h, so these includes can also be
adjusted.

While we're at it, we can also migrate valid inclusions of VideoCommon.h
into cpp files where it can feasibly be done to minimize propagating it
via other headers.
2019-07-16 20:54:34 -04:00
Lioncash d4337eebde VideoCommon/Statistics: Rename stats global to g_stats
Makes the global variable follow our convention of prefixing g_ on
global variables to make it obvious in surrounding code that it's not a
local variable.
2019-07-10 23:34:54 -04:00
Lioncash 9802a5e16b VideoCommon/Statistics: Make all member functions non-static
Rather than making Statistics' member functions operate on the global
variable instance of itself, we can make these functions member
functions and operate on a by-instance state, removing the direct
dependency on the global variable itself.

This also makes for less reading, as there's no need to repeat "stats."
for all variable accesses.
2019-07-10 23:24:37 -04:00
Lioncash a99c7d01e1 VideoCommon/Statistics: Normalize statistic variable names
Normalizes all variables related to statistics so that they follow our
coding style.

These are relatively low traffic areas, so this modification isn't too
noisy.
2019-07-10 23:19:10 -04:00
Connor McLaughlin 0a7395bfba
Merge pull request #8128 from altimumdelta/FrameDumpUpgradePrep1
Code: Rename AVIDump to FrameDump
2019-06-30 21:13:19 +10:00
altimumdelta 1df655e376 VideoCommon: Rename AVIDump to FrameDump 2019-06-30 13:02:39 +02:00
Connor McLaughlin e388f01e11
Merge pull request #8215 from CookiePLMonster/appverifier-sanitize
Fixed various errors spotted with Application Verifier
2019-06-30 01:27:25 +10:00
Silent 6c21811090
Make DolphinAnalytics a true singleton - static local variables are initialized in a thread safe manner since C++11
Also works around a Visual Studio 2017 bug where static inline class fields are destructed multiple times
2019-06-23 21:43:47 +02:00
Techjar 08421db52f VideoCommon/RenderBase: Fix crop
This fixes some mistakes from #8049 that caused crop to behave like
stretch and have a funny offset.
2019-06-18 18:34:13 -04:00
Techjar 56c818b3d8 VideoCommon/RenderBase: Reset scissor rectangle after ImGui rendering
This fixes the problem where OBS game capture only grabs the region
inside an ImGui window whenever one is open, when using the OpenGL
backend. Shouldn't have any negative effects, as the scissor would've
been something completely arbitrary anyways.

This may affect other capture software that uses the same hooking
method, but I've only tested OBS.
2019-06-15 07:12:17 -04:00
Connor McLaughlin 951b66e4ac
Merge pull request #8049 from stenzek/crop
Renderer: Adjust source rectangle when crop would draw off screen
2019-06-08 20:57:52 +10:00
Lioncash e60268bd42 VideoCommon/RenderBase: Use a std::string_view with CreateShaderFromSource()
Greatly simplifies the overall interface when it comes to compiling
shaders. Also allows getting rid of a std::string overload of the same
name. Now std::string and const char* both go through the same function.
2019-05-30 03:29:35 -04:00
Léo Lam ab9ece9bca Replace MathUtil::Clamp with std::clamp 2019-05-04 23:12:17 +02:00
Stenzek 32359bf2bb Renderer: Adjust target rectangle in the base class 2019-04-28 23:33:24 +10:00
Stenzek 3c64f0c616 Renderer: Adjust source rectangle when crop would draw off screen
This prevents us from requiring an oversized and/or negative viewport by
shrinking the source rectangle instead.
2019-04-28 23:31:57 +10:00