Commit Graph

330 Commits

Author SHA1 Message Date
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
0a7395bfba Merge pull request #8128 from altimumdelta/FrameDumpUpgradePrep1
Code: Rename AVIDump to FrameDump
2019-06-30 21:13:19 +10:00
1df655e376 VideoCommon: Rename AVIDump to FrameDump 2019-06-30 13:02:39 +02:00
e388f01e11 Merge pull request #8215 from CookiePLMonster/appverifier-sanitize
Fixed various errors spotted with Application Verifier
2019-06-30 01:27:25 +10:00
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
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
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
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
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
ab9ece9bca Replace MathUtil::Clamp with std::clamp 2019-05-04 23:12:17 +02:00
32359bf2bb Renderer: Adjust target rectangle in the base class 2019-04-28 23:33:24 +10:00
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
f8c1ba409c Replace EFBRectangle/TargetRectangle with MathUtil::Rectangle 2019-04-21 14:28:14 +10:00
708bd3d9f7 TextureCache: Simplify XFB reconstruction
This also better handles in-memory interlaced XFB data placed by the CPU
by considering the stride from the VI.
2019-04-21 12:41:15 +10:00
6c393f9ff4 Add imgui golf mode overlay 2019-04-05 07:01:03 -04:00
7dd9d74eec RenderBase: Add EFBHasAlphaChannel() helper 2019-03-28 20:35:02 +10:00
7cfb626a83 Add imgui-based Netplay Chat 2019-03-23 20:13:24 +01:00
8cfbbbe9dc VideoCommon/RenderBase: Disable backculling for ImGui 2019-03-21 13:16:21 +01:00
6bc4bfd26a FramebufferManager: Implement EFB tile cache
The new tile cache is dynamic in size and can be turned on/off.
2019-03-09 12:23:33 +10:00
9ca394bbea VideoCommon/RenderBase: Don't destroy pipelines that are in use 2019-03-07 01:59:46 +01:00
f039149198 Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
b01df8670f Renderer: Fix throttle-disable (TAB) hotkey when vsync is enabled 2019-01-27 12:31:12 +10:00
e4b205c769 Decouple XFB scanout from presentation 2019-01-25 11:15:57 +10:00
f1e7fb505b Renderer: Scale all imgui fonts by the backbuffer scale 2019-01-25 11:15:57 +10:00
c9c0b85056 VideoBackends: Store a backbuffer 'scale'
This is a scaling factor, used for hi-dpi configurations.
2019-01-25 11:15:57 +10:00
36ce47635b RenderWidget: Hook up to ImGui 2019-01-25 11:15:57 +10:00
600d1fc0bc Renderer: Use imgui for drawing debug text and OSD 2019-01-25 11:15:57 +10:00
d1868d9475 RenderBase: Implement imgui rendering 2019-01-25 11:10:49 +10:00
0da5929226 Merge pull request #7626 from weihuoya/vulkan-oom
Always clean cache on render swap
2019-01-08 21:57:25 +10:00
66a7db3850 Always flush on swap 2019-01-08 18:28:59 +08:00
a8e5f2b922 Merge pull request #7230 from ligfx/remove_clamp_draw_size
RenderBase: don't clamp draw size to window
2019-01-03 18:26:41 +01:00
2644e920cc Renderer: Add backbuffer format to base class 2018-12-04 17:36:08 +10:00
1adcd47dcb Renderer: Add a base Initialize() method to match Shutdown() 2018-12-04 17:36:08 +10:00
38479dd783 RenderBase: Force a pipeline flush when drawing the XFB to the host
Since we use the common pipelines here and draw vertices if a batch is
currently being built by the vertex loader, we end up trampling over its
pointer, as we share the buffer with the loader, and it has not been
unmapped yet. Force a pipeline flush to avoid this.
2018-12-04 17:36:08 +10:00
a42432cae4 RenderBase: Set m_aspect_wide on start
It doesn't feel great to let the value from a previous emulation session
linger around considering that the GC aspect ratio heuristic can use
the previous value of m_aspect_wide when calculating m_aspect_wide.
2018-11-07 19:01:45 +01:00
b93b7ec419 Fix the widescreen hack for Wii games with 4:3 forced in game INI 2018-11-07 19:00:24 +01:00
8e2c063d62 TextureCache: Implement deferred/batched EFB copies 2018-11-07 16:25:01 +10:00
83c3370c2a RenderBase: send performance sample at every end of frame
Not the best integration point, but couldn't think of something better.
This implementation has the benefit to be super simple.
2018-10-27 17:39:54 +02:00
1d827a5223 Renderer: Pull dimensions from GLInterface/Swapchain 2018-10-20 21:11:34 +10:00
a3961750a7 Drop Host_GetRenderSurface and pass display to backend 2018-10-20 21:11:34 +10:00
d97bc0d359 Correctly adjust the rendered XFB region at non-native internal resolutions when XFB was loaded from console RAM.
If, for whatever reason, the XFB has to be loaded from console memory, it's possible that the texture is returned at native resolution instead of EFB-scaled resolution. In this case, our xfb_rect.right adjustment must also happen at native resolution instead of scaled resolution.
2018-09-13 19:39:49 +02:00
2a30e64974 RenderBase: don't clamp draw size to window
It distorts the aspect ratio when cropping, rather than actually cropping.
2018-07-07 13:32:10 -07:00
25bfee2233 VideoCommon: Fix auto IR being very overzealous 2018-06-25 00:48:57 -04:00
7a90ea2752 Add OSD message for Volume Hotkeys
This pr adds an OnScreenDisplay message when you use the Volume hotkeys.
Just to have visual feedback.
2018-06-06 17:11:43 +02:00
c267262a66 Merge pull request #6786 from stenzek/crop-negative-y
RenderBase: Ensure the draw size does not exceed the window size
2018-05-13 08:55:59 +02:00
16e2ac9257 VideoCommon/RenderBase: Refactor OSD messages 2018-05-11 18:24:08 +02:00
fd5aaa096c RenderBase: Ensure the draw size does not exceed the window size
This was happening when crop was enabled, causing blank outputs for some
Vulkan drivers (namely radv), as the draw rectangle is used as the
viewport.
2018-05-08 23:19:38 +10:00
9e798eec94 Implement EFB copy filter and gamma in hardware backends
Also makes y_scale a dynamic parameter for EFB copies, as it doesn't
make sense to keep it as part of the uid, otherwise we're generating
redundant shaders.
2018-04-29 19:05:20 +10:00
2687c55cf6 Renderer: Only recreate frame dump texture if dimensions differ
This was a typo, been around for a while. == should be !=. May improve
frame dumping performnace slightly, but I doubt much if any.
2018-04-02 01:15:48 +10:00
50a476c371 Assert: Uppercase assertion macros
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00