Commit Graph

38917 Commits

Author SHA1 Message Date
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 3ae78b8e76 Also use events for config changed 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 2a18b34a73 Wire up frame before/after events 2023-01-31 19:41:24 +13:00
Scott Mansell 154cb4f722 Introduce an Event system to VideoCommon
A lot of the remaining complexity in Renderer is the massive Swap function
which tries to handle a bunch of FrameBegin/FrameEnd events.

Rather than create a new place for it. This event system will try
to distribute it all over the place
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 35a69cb1bb Fix missing include 2023-01-31 19:41:24 +13:00
Scott Mansell 8ad59f8ccf Add AbstractGfx for DX12 2023-01-31 19:41:24 +13:00
Scott Mansell 5a2d119bda Implement AbstractGfx for Dx11 2023-01-31 19:41:24 +13:00
Scott Mansell 8bc8e43dd6 Add virtual Initialize() to PerfQueryBase
Both DX12 and Vulkan already had one.
2023-01-31 19:41:24 +13:00
Scott Mansell 3c73707dfe Fix dead code. 2023-01-31 19:41:24 +13:00
Scott Mansell eaae5b4a45 Implement AbstactGfx for Metal 2023-01-31 19:41:24 +13:00
Scott Mansell 89d9ec0a84 Fix warning 2023-01-31 19:41:24 +13:00
Scott Mansell b007b8e104 Replace BeginUI/EndUI 2023-01-31 19:41:24 +13:00
Scott Mansell 18c799f0b6 Present: Set surface info before initializing ImGui
Otherwise you get subtle bugs in vulkan that take hours to track down.
2023-01-31 19:41:24 +13:00
Scott Mansell 06ae08ca8b Fix misnamed local variable 2023-01-31 19:41:24 +13:00
Scott Mansell f158ff300b Handle VideoSoftware's present fallback better
Not a good idea to abuse bSupportsPostProcessing
2023-01-31 19:41:24 +13:00
Scott Mansell 26e00c3bb4 Fix warning about using & with bools 2023-01-31 19:41:23 +13:00
Scott Mansell 74d3b3443a Fix warning about compare sign mismatch 2023-01-31 19:41:23 +13:00
Scott Mansell 8f5b196019 Minimise include polution from RenderState 2023-01-31 19:41:23 +13:00
Scott Mansell 2a2014af09 Implement AbstractGfx for Vulkan 2023-01-31 19:41:23 +13:00
Scott Mansell 58b70b2fb2 Don't set common globals from Video Backends 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 f0336a3129 Implement AbstractGfx for OpenGL
Mostly involves moving contents of OGLRender
to OGLGfx and OGLConfig
2023-01-31 18:46:04 +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 e57eb04ed3 Rename FrameDump.{cpp,h} to FrameDumpFFMpeg.{cpp,h}
The name kind of conflicts with a new FrameDumper class
2023-01-31 18:45:29 +13:00
Scott Mansell 0d4537d60f Move Presenting, Dumping and ImGui out of Renderer 2023-01-31 18:45:21 +13:00
Scott Mansell c38c76abad Refactor to remove virtual from RenderXFBToScreen
Slightly simplifies the upcoming refactor
2023-01-31 18:29:47 +13:00
Scott Mansell a01d5283ec TextureCache: Add content locking
Texture cache occasionally mutates textures for efficiency.
Which is awkward if we want to borrow those textures from texture cache
to do something else, such as a graphics debugger, or async presentation
on another thread.

Content locking provides a way to signal that the contents of a texture
cache entry should not change. Texture cache will be forced to use
alternative strategies.
2023-01-31 18:29:47 +13:00
Scott Mansell 606c18210d TextureCache: Refactor with smart pointers
The whole ownership model was getting a bit of a mess, with a some
of special cases to deal with. And I'm planning to make it even more
complex in the future.
So here is some upfront work to convert it over to reference counted
pointers.
2023-01-31 18:29:47 +13:00
Scott Mansell c1fd4a2013 Move TCacheEntry out of TextureCacheBase
Allows for fowards declaration
2023-01-31 18:29:47 +13:00
Pierre Bourdon 2843cd10a8
Merge pull request #11492 from mandar1jn/file-improvements
Improve the data in the first data block of the skylanders figures
2023-01-31 03:02:39 +01:00
JosJuice c63eb75435
Merge pull request #11520 from lioncash/undefined
Common/Network: Resolve -Wexpansion-to-defined warning
2023-01-30 21:17:11 +01:00
JosJuice 43194b2742
Merge pull request #11519 from lioncash/android
AndroidCommon: Make use of std::string_view where applicable
2023-01-30 20:21:44 +01:00
Lioncash cdd3e636e1 Common/Network: Resolve -Wexpansion-to-defined warning
Macros that expand to include the standard define macro are undefined.
This is pretty trivial to fix. We can just do the test and then define
the name itself if it's true, rather than making the set of definition
checks the macro itself.
2023-01-30 14:20:56 -05:00
JosJuice f0b833a639
Merge pull request #11518 from t895/deprecated-setting
Android: Remove unused force filtering setting
2023-01-30 19:56:44 +01:00
Charles Lombardo 96bc0a3063 Android: Remove unused force filtering setting 2023-01-30 13:38:39 -05:00
JosJuice 65c782b3b9
Merge pull request #11517 from t895/slider-setting-adjustment
Android: Set each slider step size manually
2023-01-30 19:32:18 +01:00
Lioncash 5c1954c843 AndroidCommon: Make use of std::string_view where applicable
Several of these can take a string_view rather than needing to
specifically use std::string.
2023-01-30 13:30:52 -05:00
Charles Lombardo 26c8440ae1 Android: Set each slider step size manually 2023-01-30 13:17:02 -05:00
Admiral H. Curtiss 8960f6f07c
Merge pull request #11516 from lioncash/spans
ActionReplay/GeckoCode: Make use of std::span where applicable
2023-01-30 19:14:41 +01:00
Lioncash f20790370a Core/ActionReplay: Make use of std::span where applicable
Generifies the interface a little by not strictly requiring the use of
std::vector.
2023-01-30 13:02:09 -05:00
Lioncash adb4c0492d Core/GeckoCode: Make use of std::span where applicable
Generifies the interface a little by not strictly requiring the use of
std::vector.
2023-01-30 12:53:50 -05:00
Mandar1jn c8a91abadc Improve the data in the first data block of the skylanders figures
* Added NUID
* Added BCC
* Added ATQA
* Added SAK
2023-01-30 16:29:20 +01:00