Commit graph

315 commits

Author SHA1 Message Date
Scott Mansell
8f5b196019 Minimise include polution from RenderState 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
Scott Mansell
c38c76abad Refactor to remove virtual from RenderXFBToScreen
Slightly simplifies the upcoming refactor
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
TellowKrinkle
1119a9ba32 VideoCommon: Don't create pipelines with no render targets
Some backends don't like it when you do that
2023-01-29 14:35:23 -06: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
Admiral H. Curtiss
ec8aaf1f30
VideoCommon/PixelEngine: Refactor to class, move to Core::System. 2022-12-11 21:57:19 +01:00
Admiral H. Curtiss
8a3b8a925e
Core: Add option to force linear texture filtering. 2022-12-09 02:02:16 +01:00
Admiral H. Curtiss
6941d2e7e6
VideoCommon/CommandProcessor: Refactor to class, move to Core::System. 2022-11-29 08:15:01 +01: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
1e9b6f88e4 VideoCommon: Support hot reloading of VS expand 2022-10-22 20:18:02 -05:00
Robin Kertels
779fe13e62
VideoCommon: Update EFB peek cache on draw done and tokens
Massively improves performance in Mario Galaxy on Android.
2022-10-01 18:08:38 +02:00
Shawn Hoffman
09089eeee0 Common::Timer: use chrono::steady_clock internally 2022-08-02 22:24:06 -07:00
iwubcode
69839df1eb VideoCommon: support dynamically updating game mods at runtime 2022-06-27 18:20:52 -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
Dentomologist
f6b9acccfc Common: Refactor PointerWrap 2022-05-25 13:06:41 -07:00
Pokechu22
f3eff70e2f Implement ImGui window for scissor rectangles
This is mainly for debugging, and is only exposed by manually editing the configuration.
2022-04-16 12:35:00 -07:00
Pokechu22
076392a0f6 VideoCommon: Rework scissor handling
This increases accuracy, fixing the white rendering in Major Minor's Majestic March.  However, the hardware backends can only have one viewport and scissor rectangle at a time, while sometimes multiple are needed to accurately emulate what is happening.  If possible, this will need to be fixed later.
2022-04-16 10:26:11 -07:00
Pokechu22
8882eb040a PixelEngine: Convert to BitField and enum class 2022-03-29 15:34:43 -07:00
Pokechu22
30a34d06c1 RenderBase: Add call to IMGUI_CHECKVERSION() 2022-03-25 10:24:07 -07:00
Léo Lam
0de008da11
Merge pull request #10332 from AdmiralCurtiss/config-port-general
Config: Port remaining General settings to new config system.
2022-01-03 01:40:37 +01:00
Pokechu22
afd02b79a5 VideoCommon: Add names for textures and shaders 2022-01-01 11:38:56 -08:00
Admiral H. Curtiss
d590aa88a4
Config: Port remaining General settings to new config system. 2022-01-01 19:02:45 +01:00
Admiral H. Curtiss
aa437d9805
Config: Port Movie settings to new config system. 2021-12-30 20:16:17 +01:00
Pokechu22
27cb704466 Eliminate VarType for ComponentFormat 2021-12-18 15:21:48 -08:00
Pokechu22
b5fd35f951 Refactor OpcodeDecoding and FIFO analyzer to use callbacks 2021-12-18 15:21:36 -08:00
sowens99
e4fed7cce8 Add Rerecord Count display
Simply shows Movie::s_rerecords in the ImGui Movie window
2021-11-30 20:08:29 -05:00
Pokechu22
94ccf765af Add option for setting the PNG zlib compression level 2021-11-18 13:10:22 -08:00
Pokechu22
db54e4f2b0 Externals: Update imgui to 1.85 2021-10-26 15:07:57 -07:00
Léo Lam
ff1cb5a1c0
Merge pull request #9803 from Techjar/bbox-videocommon
VideoCommon: Abstract bounding box
2021-10-08 22:24:38 +02: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
sowens99
30dcac15fa RenderBase: Show input count on m_ShowFrameCount
Just to stay consistent, I believe it is best to show total input polls alongside the framecount.
2021-09-29 14:36:09 -04:00
sowens99
53ca2ec274 RenderBase: show total framecount on movie playback
Previously, when playing back a movie, you could not see the total frame count of a movie, only the total number of input polls.

This change simply shows the total frame count on movie playback.

Note that this change also results in the framecount and framecount total ALWAYS being displayed if show_movie_window is true, regardless of whether or not m_ShowFrameCount is true. I believe this is fine, as TASers are much more likely to reference the framecount than the input poll count.
2021-09-28 22:15:25 -04: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
e4aef0a85b VideoCommon: Move bounding box pixel quads rounding to shader
This avoids rounding values that the game writes to the bounding box
registers, especially the default values.
2021-05-28 23:30:22 -04:00
Techjar
be6b000bec VideoCommon: Account for pixel quads in bounding box calculation
The GC/Wii GPU rasterizes in 2x2 pixel groups, so bounding box values
will be rounded to the extents of these groups, rather than the exact
pixel. To account for this, we'll round the top/left down to even and
the bottom/right up to odd. I have verified that the values resulting
from this change exactly match a real Wii.
2021-05-22 05:58:52 -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
Mat M
964fed77c5
Merge pull request #9707 from JosJuice/remove-atomic-header
Remove Atomic.h
2021-05-14 14:33:24 -04:00
Scott Mansell
9f91fb6447
Merge pull request #9688 from Filoppi/input_cleanup
Input cleanup
2021-05-14 20:51:33 +12:00
JosJuice
b93983b50a Remove Atomic.h
The STL has everything we need nowadays.

I have tried to not alter any behavior or semantics with this
change wherever possible. In particular, WriteLow and WriteHigh
in CommandProcessor retain the ability to accidentally undo
another thread's write to the upper half or lower half
respectively. If that should be fixed, it should be done in a
separate commit for clarity. One thing did change: The places
where we were using += on a volatile variable (not an atomic
operation) are now using fetch_add (actually an atomic operation).

Tested with single core and dual core on x86-64 and AArch64.
2021-05-13 18:56:27 +02:00
Filoppi
f4fec42165 Add mixed comments to input code, make some tooltip clearer 2021-05-12 18:27:23 +03:00
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