Commit Graph

202 Commits

Author SHA1 Message Date
Scott Mansell
4422af1272 Cleanup headers 2023-02-09 18:36:20 +13:00
Scott Mansell
5803786beb Move UseVertexDepthRange() out of Renderer
There wasn't really a good place for it, but this will do
2023-02-09 18:36:20 +13:00
Scott Mansell
2cfc02a116 Move m_prev_efb_format into FramebufferManager 2023-02-09 18:36:20 +13:00
Scott Mansell
9b5397abdb Move WidescreenHeuristic to it's own class
It's about the only thing left in renderer
2023-02-09 18:36:20 +13:00
Scott Mansell
31cfe8250d Lint fixes 2023-02-09 18:36:20 +13:00
Scott Mansell
11de923dcb Move xfb tracking and IR scaling out of RenderBase 2023-02-09 18:36:20 +13:00
Scott Mansell
e009002411 Refactor ClearRegion
And fix bug where opengl was getting the wrong coordinates
2023-02-09 18:36:20 +13:00
Scott Mansell
b753641dd4 Add some descriptions to new classes 2023-01-31 19:41:24 +13:00
Scott Mansell
abfc75f362 Cleanup headers 2023-01-31 19:41:24 +13:00
Scott Mansell
ec8f46b02c Expose Renderer's Framecount
We don't want to move it, because we want to complete
this refactor without changing savestate version
2023-01-31 19:41:24 +13:00
Scott Mansell
3be63221c7 Renderer still needs to track swaps for savestates 2023-01-31 19:41:24 +13:00
Scott Mansell
0da69055d9 Split out everying remaining from Swap 2023-01-31 19:41:24 +13:00
Scott Mansell
d6cd8de1a7 Delete unused EFBHasAlphaChannel function 2023-01-31 19:41:24 +13:00
Scott Mansell
9d125a6e43 Move ConfigChanged out of RenderBase
There is this nice VideoConfig file that's perfect for it
2023-01-31 19:41:24 +13:00
Scott Mansell
ca5ec13e13 Move GraphicsMod out of RenderBase 2023-01-31 19:41:24 +13:00
Scott Mansell
55d15bdd6e Move utiltily drawing out of RenderBase 2023-01-31 19:41:24 +13:00
Scott Mansell
99d3e489ea Move BoundingBox out of RenderBase
They were essentially just pass-though methods
2023-01-31 19:41:24 +13:00
Scott Mansell
8f5b196019 Minimise include polution from RenderState 2023-01-31 19:41:23 +13:00
Scott Mansell
d37f83ffeb Implement AbstractGfx for Software & Null 2023-01-31 19:41:23 +13:00
Scott Mansell
8a23629345 Split AbstractGfx out of Renderer
Almost all the virtual functions in Renderer are part of dolphin's
"graphics api abstraction layer", which has slowly formed over the
last decade or two.

Most of the work was done previously with the introduction of the
various "AbstractX" classes, associated with texture cache cleanups
and implementation of newer graphics APIs (Direct3D 12, Vulkan, Metal).
We are simply taking the last step and yeeting these functions out
of Renderer.

This "AbstractGfx" class is now completely agnostic of any details
from the flipper/hollywood GPU we are emulating, though somewhat
specialized.

(Will not build, this commit only contains changes outside VideoBackends)
2023-01-31 18:46:02 +13:00
Scott Mansell
0d4537d60f Move Presenting, Dumping and ImGui out of Renderer 2023-01-31 18:45:21 +13:00
Admiral H. Curtiss
725bd64ec2
VideoCommon: De-globalize PixelShaderManager class. 2022-12-27 20:13:24 +01:00
Sam Belliveau
673f81c18a New FrameTime/VBlank Analyzer + Graph 2022-12-23 19:52:53 -05:00
Sam Belliveau
edb2c90b38
Improve FPS/VPS Counting and Revamp Appearance 2022-11-23 00:11:47 +01:00
Admiral H. Curtiss
a98df18947
VideoCommon: Hold ImGui lock while initializing and shutting down ImGui. 2022-11-06 21:48:55 +01:00
TellowKrinkle
716c0980d7 VideoBackends: Add Metal renderer 2022-07-21 20:44:19 -05:00
iwubcode
892678648e VideoCommon: trigger mod calls in TextureCacheBase (efb/xfb calls), VertexManagerBase (draw calls), and VertexShaderManager (projection calls) 2022-06-27 18:20:52 -05:00
Techjar
1161af8059 VideoCommon: Abstract bounding box
This moves much of the duplicated bounding box code into VideoCommon,
leaving only the specific buffer implementations in each backend.
2021-10-04 15:51:24 -04:00
iwubcode
1f2f505373 VideoBackends / VideoCommon: allow the ability to set debug names for shaders / textures. These names are visible in applications like RenderDoc 2021-08-30 13:47:48 -05:00
Pierre Bourdon
e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
Techjar
8cfe49295f VideoCommon: Add fallback handling for bounding box when disabled or unsupported
The SDK seems to write "default" bounding box values before every draw
(1023 0 1023 0 are the only values encountered so far, which happen to
be the extents allowed by the BP registers) to reset the registers for
comparison in the pixel engine, and presumably to detect whether GX has
updated the registers with real values. Handling these writes and
returning them on read when bounding box emulation is disabled or
unsupported, even without computing real values from rendering, seems
to prevent games from corrupting memory or crashing.

This obviously does not fix any effects that rely on bounding box
emulation, but having the game not clobber its own code/data or just
outright crash is a definite improvement.
2021-05-31 19:56:24 -04:00
Techjar
2f1b639f0a VideoCommon: Restore BBox* forwarding functions 2021-05-31 18:01:47 -04:00
Techjar
a24e78b3cf VideoCommon: Remove BBox* forwarding functions 2021-05-29 01:45:21 -04:00
Techjar
0f17990137 VideoCommon: Split BBox* functions into common and backend implementation variants
This will allow for some aspects of bounding box to be handled in
VideoCommon instead of individual backends.
2021-05-22 01:11:57 -04: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
JosJuice
d69f243c32 FrameDump: Start timing at 0 ticks when starting from boot 2020-11-27 17:54:08 +01: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
Jordan Woyak
10223da6a8 VideoCommon: Tweak widescreen heuristic and clean up some related Renderer logic. 2020-02-09 13:22:25 -06: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
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
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
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
Stenzek
32359bf2bb Renderer: Adjust target rectangle in the base class 2019-04-28 23:33:24 +10:00