Commit Graph

126 Commits

Author SHA1 Message Date
Jules Blok 0a2b58c896 OGL: Remove support for NV_depth_buffer_float.
We can't clamp the depth values to the 24-bit range while this extension is active.
2017-03-14 01:02:13 +01:00
Markus Wick e99cd57eb3 Merge pull request #4935 from Armada651/depth-range-fix
VideoBackends: Set the maximum range when the depth range is oversized.
2017-03-10 18:05:52 +01:00
Jules Blok 3f41e6d4cf RenderBase: Check if early ztest is enabled before falling back to vertex depth range. 2017-03-10 15:43:32 +01:00
Stenzek 2cd240af0d VideoBackends: Move max texture size to VideoConfig
This stops the virtual method call from within the Renderer constructor.

The initialization here for GL had to be moved to VideoBackend, as the
Renderer constructor will not have been executed before the value is
required.
2017-03-10 00:04:13 +10:00
Stenzek 4012166085 VideoCommon: Fix crash at startup with virtual XFB enabled 2017-03-09 23:39:48 +10:00
Stenzek 459a5ab554 Android: Move screenshot waiting logic to Renderer 2017-03-04 16:53:16 +10:00
Stenzek 811eafda57 VideoCommon: Store last window request width/height
This avoids the need to send a window resize event every frame.
2017-03-04 16:53:12 +10:00
Stenzek 00a0a91513 VideoCommon: Move last EFB scale handling to CalculateTargetSize 2017-03-04 16:53:07 +10:00
Stenzek afc25fdca0 VideoCommon: Rename Renderer s_ prefixes to m_ 2017-03-04 16:42:21 +10:00
Stenzek 238a70b006 VideoCommon: Move some common initialization logic to RenderBase 2017-03-04 16:42:16 +10:00
Stenzek 277829d842 VideoCommon: Eliminate static state in Renderer 2017-03-04 16:39:50 +10:00
Jules Blok a15555fe03 VideoBackends: Use vertex shader depth range if ztexture is used. 2017-02-26 11:34:48 +01:00
Lioncash 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
Lioncash 1f24cf2a2d RenderBase: Get rid of unnecessary casts 2017-01-31 20:25:50 -05:00
Admiral H. Curtiss 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
Admiral H. Curtiss e1fa6c374f RenderBase: Extract the framebuffer size to display size code into function. 2017-01-28 11:40:53 +01:00
Stenzek 5f3c878ba2 FifoPlayer: Save/restore texture memory state for fifo logs 2017-01-03 21:16:05 +10:00
Lioncash 58a5395173 TextureCacheBase: Eliminate static state 2016-12-09 16:50:37 -05:00
Stenzek adc22a5e20 VideoCommon: Add method for calculating full-scale framedump rectangles 2016-11-28 21:54:54 +10:00
Stenzek 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
Stenzek 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
degasus 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
degasus 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
degasus a47332bf8a VideoCommon/Render: Use a flag for screenshot. 2016-11-07 22:16:34 +01:00
degasus d79840078f Renderer: Threaded frame dumping. 2016-11-07 22:11:13 +01:00
degasus 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
degasus dad5041737 AVIDump: Inline OSD error handling.
This fixes a review feedback in PR #4345.
2016-11-04 18:03:14 +01:00
degasus 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
degasus 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
degasus 9f264c0872 AVIDump: Move CoreTiming into caller. 2016-10-10 12:03:18 +02:00
degasus 64927a2f81 Renderer: Merge screenshot logic into VideoCommon. 2016-10-08 19:38:57 +02:00
degasus 21e42c68c4 Renderer: Remove write-only variable.
Sorry, merge failure.
2016-10-08 18:26:43 +02:00
degasus db0509560e AVIDump: Hard code rgba. 2016-10-08 18:16:32 +02:00
degasus 0864ef4352 VideoCommon: Add custom stride for framedumping. 2016-10-08 15:44:54 +02:00
degasus b5a91e1dfa Framedumps: Add finish() function to limit memory lifetime. 2016-10-08 15:39:22 +02:00
degasus 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
degasus 8c999f9ee8 VideoCommon: Mark framedump variables as private.
And rename them to the new naming scheme.
2016-10-07 23:17:21 +02:00
degasus f45ddddf1c VideoCommon: Add shared framedumping code. 2016-10-07 23:07:40 +02:00
Shawn Hoffman 55af20a439 Remove '\n' from OSD messages; they would be converted to '?' 2016-10-04 03:52:13 -07:00
Shawn Hoffman c11aba296c Follow-up for OSD cleanup:
people probably want to see decimal instead of hex...
2016-10-03 20:42:04 -07:00
Shawn Hoffman 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
Shawn Hoffman 86112c7258 VideoCommon: Minor changes
Make Renderer::GetMaxTextureSize return u32 instead of int.
2016-10-03 06:51:46 -07:00
Stenzek 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
Jules Blok 7078216b61 Improve documentation. 2016-08-16 21:09:58 +02:00
Léo Lam 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
Chris Burgener 222c4ba077 Remove Global Declarations from Movie 2016-08-04 15:24:44 -04:00
Lioncash 8b5e94a102 FifoPlayer: const correctness 2016-08-01 18:33:46 -04:00
Chris Burgener 0ef1ee7a83 Display RTC on OSD 2016-07-22 09:58:34 -04:00
Chris Burgener d00c013339 Remove VI count limit on Movie playback 2016-07-09 20:35:01 -04:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00