Commit Graph

169 Commits

Author SHA1 Message Date
00a0a91513 VideoCommon: Move last EFB scale handling to CalculateTargetSize 2017-03-04 16:53:07 +10:00
afc25fdca0 VideoCommon: Rename Renderer s_ prefixes to m_ 2017-03-04 16:42:21 +10:00
238a70b006 VideoCommon: Move some common initialization logic to RenderBase 2017-03-04 16:42:16 +10:00
277829d842 VideoCommon: Eliminate static state in Renderer 2017-03-04 16:39:50 +10:00
a15555fe03 VideoBackends: Use vertex shader depth range if ztexture is used. 2017-02-26 11:34:48 +01:00
c85e0a2586 FramebufferManagerBase: Return a std::pair from GetTargetSize
Keeps associated data together. It also eliminates the possibility of out
parameters not being initialized properly. For example, consider the
following example:

-- some FramebufferManager implementation --

void FBMgrImpl::GetTargetSize(u32* width, u32* height) override
{
  // Do nothing
}

-- somewhere else where the function is used --

u32 width, height;
framebuffer_manager_instance->GetTargetSize(&width, &height);

if (texture_width != width) <-- Uninitialized variable usage
{
  ...
}

It makes it much more obvious to spot any initialization issues, because
it requires something to be returned, as opposed to allowing an
implementation to just not do anything.
2017-02-03 15:27:53 -05:00
1f24cf2a2d RenderBase: Get rid of unnecessary casts 2017-01-31 20:25:50 -05:00
b2c40bf4c4 RenderBase: Let the Auto Adjust Window Size option request the final image size rather than the raw framebuffer size. 2017-01-28 11:40:53 +01:00
e1fa6c374f RenderBase: Extract the framebuffer size to display size code into function. 2017-01-28 11:40:53 +01:00
5f3c878ba2 FifoPlayer: Save/restore texture memory state for fifo logs 2017-01-03 21:16:05 +10:00
58a5395173 TextureCacheBase: Eliminate static state 2016-12-09 16:50:37 -05:00
adc22a5e20 VideoCommon: Add method for calculating full-scale framedump rectangles 2016-11-28 21:54:54 +10:00
6db0ee9561 VideoCommon: Remove backbuffer size parameters from methods
We have the s_backbuffer_{width,height} fields to represent this, so
there's no point in passing them as parameters every time.
2016-11-28 20:14:59 +10:00
6d0b9b816f VideoCommon: Support dumping frames to images
This is mainly for potential Android fifoci usage, and thus is not
exposed anywhere in the UI. To enable, set DumpFramesAsImages under
Settings in GFX.ini.
2016-11-23 12:07:49 +10:00
193dd97759 VideoCommon: Drop FlipImageData.
This function isn't used any more, and good code shouldn't use it at all. Use negative strides instead.
2016-11-10 12:59:22 +01:00
52caa4f2f5 VideoCommon/Render: Inplace frame dump encoding.
This increase the performance of good backends a bit, but slows down the bads one a lot.
Let's fix those backends instead of forcing stupid memcpy in the common code.
2016-11-10 12:59:19 +01:00
a47332bf8a VideoCommon/Render: Use a flag for screenshot. 2016-11-07 22:16:34 +01:00
d79840078f Renderer: Threaded frame dumping. 2016-11-07 22:11:13 +01:00
be29090aae AVIDump: Add a struct for the state.
So AddFrame use no global state and can be threaded well.
2016-11-04 18:35:42 +01:00
dad5041737 AVIDump: Inline OSD error handling.
This fixes a review feedback in PR #4345.
2016-11-04 18:03:14 +01:00
1cc1876002 Revert "Merge pull request #4286 from shuffle2/Aestek-clean-osd"
This reverts commit 5c0fa4db4f, reversing
changes made to b8731eb818.
2016-10-15 12:44:37 +02:00
b8a1611f4a Revert "Merge pull request #4287 from shuffle2/typo-fix"
This reverts commit 6bff97ea30, reversing
changes made to 5c0fa4db4f.
2016-10-15 12:33:27 +02:00
9f264c0872 AVIDump: Move CoreTiming into caller. 2016-10-10 12:03:18 +02:00
64927a2f81 Renderer: Merge screenshot logic into VideoCommon. 2016-10-08 19:38:57 +02:00
21e42c68c4 Renderer: Remove write-only variable.
Sorry, merge failure.
2016-10-08 18:26:43 +02:00
db0509560e AVIDump: Hard code rgba. 2016-10-08 18:16:32 +02:00
0864ef4352 VideoCommon: Add custom stride for framedumping. 2016-10-08 15:44:54 +02:00
b5a91e1dfa Framedumps: Add finish() function to limit memory lifetime. 2016-10-08 15:39:22 +02:00
ebc617882b VideoCommon: Drop RepeatFrameDumpFrame helper.
This was needed with fixed framerate dumping. As we now synchronize the frames, the last one will just get padded.
2016-10-08 15:39:21 +02:00
8c999f9ee8 VideoCommon: Mark framedump variables as private.
And rename them to the new naming scheme.
2016-10-07 23:17:21 +02:00
f45ddddf1c VideoCommon: Add shared framedumping code. 2016-10-07 23:07:40 +02:00
55af20a439 Remove '\n' from OSD messages; they would be converted to '?' 2016-10-04 03:52:13 -07:00
c11aba296c Follow-up for OSD cleanup:
people probably want to see decimal instead of hex...
2016-10-03 20:42:04 -07:00
fa5fa8e094 Clean OSD messages code
Some OSD messages were displayed in RenderBase.cpp using global variables and some code duplicated
in OnScreeDisplay.cpp.
Now all messages are displayed using functions in the OSD namepace.

* OSDChoice and OSDTime global variables are gone
* All OSD logic is kept at the same place
* All messages are properly aligned
* Clean characters for all OSD messages

Original commit:

commit f0ec61c057
Author: Aestek <thib.gilles@gmail.com>
Date:   Sun Aug 7 16:08:41 2016 +0200
2016-10-03 19:37:18 -07:00
86112c7258 VideoCommon: Minor changes
Make Renderer::GetMaxTextureSize return u32 instead of int.
2016-10-03 06:51:46 -07:00
6a99cbd9fc VideoCommon: Call Renderer::SurfaceChanged on render parent resize
This is needed because for some reason the WSI for NV Vulkan drivers
doesn't return VK_ERROR_OUT_OF_DATE_KHR, so there is no other way to know
that a resize has occured apart from polling, which is a poor solution for
X11 (since it is blocking).
2016-10-01 01:09:12 +10:00
7078216b61 Improve documentation. 2016-08-16 21:09:58 +02:00
c1184957a5 Run clang-format on missed files
`clang-format`s files that lint missed because of the bug. Fortunately,
not much.
2016-08-11 21:14:39 +02:00
222c4ba077 Remove Global Declarations from Movie 2016-08-04 15:24:44 -04:00
8b5e94a102 FifoPlayer: const correctness 2016-08-01 18:33:46 -04:00
0ef1ee7a83 Display RTC on OSD 2016-07-22 09:58:34 -04:00
d00c013339 Remove VI count limit on Movie playback 2016-07-09 20:35:01 -04:00
3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
8c34463f14 Make integral auto IR(multiple of 640x528) work as expected
Right now, it's possible that x and y are scaled differently, if efb and xfb size are not the same.
2016-04-26 23:25:38 +02:00
d9fec92628 VideoCommon: Header cleanup
Also remedies places where the video backends and core rely on things
being indirectly included.
2016-01-17 20:11:45 -05:00
5a549ef663 [Android] Add support for rotation and minimizing the application 2016-01-10 13:00:32 -06:00
39971ec039 Merge pull request #3472 from phire/TVs_dont_have_pixels
Rework the aspect ratio calculation (Fixes 240p mode)
2016-01-09 04:27:16 +01:00
bf1c53a6e8 Merge pull request #3451 from RisingFog/libav
Use ffmpeg for Windows Video Dumping instead of VFW
2016-01-09 01:01:05 +01:00
9c0dae47ca Normalize aspect ratio calculations to 4:3
Video Interface simply isn't aware about widescreen.
Instead, the render class can multiply by 1.3333333 to get
the 16:9 aspect ratio.
2016-01-08 13:31:48 +13:00
c34fb3edf0 Use ffmpeg for Windows Video Dumping instead of VFW 2016-01-07 18:37:58 -05:00