Commit graph

808 commits

Author SHA1 Message Date
Stenzek
277829d842 VideoCommon: Eliminate static state in Renderer 2017-03-04 16:39:50 +10:00
Stenzek
3390e6f258 Merge pull request #4993 from ligfx/fixsonicadventure2
OGL SetBlendMode: always set blend equation and func
2017-03-02 21:30:10 +10:00
Lioncash
ee61bd6f2e CMakeLists: Normalize whitespace
Normalizes tabs to spaces to follow our codebase's indentation style.
2017-03-01 14:53:23 -05:00
Michael Maltese
db1d826ac3 OGL SetBlendMode: always set blend equation and func
Before #4581, an invocation of `SetBlendMode` could invoke
`glBlendEquationSeparate` and `glBlendFuncSeparate` even when it was
setting `glDisable(GL_BLEND)`. I couldn't figure out how to map the old
behavior over to the new BlendingState code, so I changed it to always
call the two blend functions.

Fixes https://bugs.dolphin-emu.org/issues/10120 : "Sonic Adventure 2
Battle: graphics crash when loading first Dark level".
2017-03-01 00:49:14 -08:00
Jules Blok
21967b1f6e VideoBackends: Add a developer option to disable the shader cache.
Makes it easier to disable the cache while working on the shaders.
2017-02-19 12:05:44 +01:00
Lioncash
1fa81f24d3 VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptr
Much safer as opposed to just returning raw allocated memory.
2017-02-18 03:16:24 -05: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
468f623d27 ShaderGenCommon: Remove unnecessary includes 2017-02-01 12:19:55 -05:00
Lioncash
273ace7bb7 LightingShaderGen: Remove unnecessary includes 2017-02-01 01:06:00 -05:00
Lioncash
70cf774a5c RenderBase: Forward declare EFBAccessType 2017-01-23 12:41:26 -05:00
Lioncash
5b461f50af VideoBackendBase: Convert EFBAccessType into an enum class 2017-01-23 03:53:38 -05:00
Matthew Parlane
ad84b904e4 Merge pull request #4496 from Mystro256/master
Fix GCC build issue with Fedora (linux)
2017-01-13 23:13:08 +13:00
degasus
23b0faeba5 OGL: Use VideoCommon blend state for framebuffer configuration. 2017-01-06 14:01:39 +01:00
BhaaL
23d99f2f2c specify custom brace style to fix unions
BreakBeforeBraces: Allman apparently includes all styles,
except for AfterUnion (which is false) when using clang-format -dump-config
2017-01-05 12:55:13 +01:00
degasus
41b0c74e30 VideoCommon: Make dst_alpha state implicit. 2017-01-04 20:02:31 +01:00
degasus
b7d8bd13a6 OGL/Vulkan: Drop dual pass alpha. 2017-01-04 19:59:41 +01:00
Markus Wick
96314a0ec1 Merge pull request #4574 from stenzek/vulkan-alpha-clear
Vulkan: Clear alpha channel to 0 when pixel format has no alpha channel
2017-01-02 12:29:36 +01:00
Jules Blok
65b5765858 VideoBackends: Clamp the range to the maximum depth value supported in the z buffer. 2016-12-27 20:25:40 +01:00
Jules Blok
ef82aebb97 VideoCommon: Don't process the depth range in the vertex shader if it's not oversized. 2016-12-27 14:31:17 +01:00
Stenzek
e6249619a0 Vulkan/GL: Set the alpha channel to 0 when creating the EFB framebuffer 2016-12-27 13:06:08 +10:00
degasus
abf9bb170b TextureCache: Drop unused parameter in backend API. 2016-12-26 22:10:32 +01:00
degasus
04f319066d TextureCache: Extract BP enum check to VideoCommon.
We have TOO many video backends.
2016-12-26 22:10:21 +01:00
Mystro256
1963996dd0 Change RasterFont static const names
Fixes build issue with GCC/CPP 6.2.1 build issues on Fedora 26
2016-12-24 11:58:07 -05:00
Mat M
9160be50db Merge pull request #4224 from lioncash/tcache
TextureCacheBase: Eliminate static state
2016-12-23 04:33:42 -05:00
Stenzek
01047319f8 Merge pull request #4517 from stenzek/mp3-blotches
TextureCache: Use same color coefficients for EFB2Tex as EFB2RAM
2016-12-19 22:11:38 +10:00
Markus Wick
989cdc0929 Merge pull request #4505 from hthh/macos-likes-pbos
OpenGL: Always use a PBO in EncodeToRamUsingShader
2016-12-19 09:47:40 +01:00
Stenzek
accce4294a TextureCache: Use same color coefficients for EFB2Tex as EFB2RAM 2016-12-15 02:20:46 +10:00
hthh
801d1d1876 OpenGL: Always use a PBO in EncodeToRamUsingShader
This improves performance significantly on macOS, particularly
noticeably in the Super Mario Sunshine transition, which goes
from ~5FPS to ~17FPS.
2016-12-12 20:33:41 +11:00
Stenzek
607ce40f0b OGL: Fix black screen when MSAA is enabled 2016-12-12 17:51:19 +10:00
Lioncash
58a5395173 TextureCacheBase: Eliminate static state 2016-12-09 16:50:37 -05:00
Léo Lam
31ccfffd38 Common: Add alignment header
Gets rid of duplicated alignment code.
2016-12-06 20:33:53 +01:00
Stenzek
107e8c8ee7 OGL: Fix assertion when minimizing window
Also fixes a potential divide by zero in Renderer::RenderText.
2016-12-03 20:35:14 +10:00
Stenzek
b81dee8b9a OGL: Support full-resolution frame dumping 2016-11-28 21:54:56 +10:00
Stenzek
93221e7f48 OGL: Move frame rendering procedures to seperate methods 2016-11-28 21:54:56 +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
a0a62c0f46 VideoConfig: Add option for full-resolution frame dumping 2016-11-28 20:14:59 +10:00
Léo Lam
72e3f1ecec Remove unnecessary ConfigManager includes
Making changes to ConfigManager.h has always been a pain, because
it means rebuilding half of Dolphin, since a lot of files depend on
and include this header.

However, it turns out some includes are unnecessary. This commit
removes ConfigManager includes from files which don't contain
SConfig or GPUDeterminismMode or GPU_DETERMINISM (which means the
ConfigManager include is not used).

(I've also had to get rid of some indirect includes.)
2016-11-27 22:38:38 +01:00
degasus
3816207d7b OGL: Fix frame dump on emulation close. 2016-11-10 12:59:22 +01:00
degasus
21774bdc81 OGL: Only flush the frame dumping thread on dumping.
This fixes the screenshot stutter, as this needs more than a frame.
So we won't stall on the png writing at all until emulation stops or
a new screenshot is requested.
2016-11-10 12:59:22 +01:00
degasus
741debe229 OGL: Avoid reallocation of frame dumping PBO. 2016-11-07 22:32:54 +01:00
degasus
f6a6cc9c67 OGL: Use PBO for framedump, with async readback. 2016-11-07 22:17:32 +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
Jules Blok
086f839435 DriverDetails: Make the bug identifiers humanly readable. 2016-10-31 15:02:08 +01:00
Markus Wick
d5ca153c26 Merge pull request #4401 from JosJuice/rename-getuniqueid
DiscIO/SConfig: Rename GetUniqueID to GetGameID
2016-10-31 12:39:27 +01:00
Jules Blok
ce9f717045 OGL: Fall back to the old dual-source blending behaviour. 2016-10-29 18:00:22 +02:00
JosJuice
1081497cad DiscIO/SConfig: Rename GetUniqueID to GetGameID
We call this "game ID" everywhere else, and it's not
actually completely unique.
2016-10-29 15:24:02 +02:00
Jules Blok
afe707bc18 DriverDetails: Disable dual-source blending on AMD OGL drivers. 2016-10-27 22:03:25 +02:00
Jules Blok
2536e37ec5 Merge pull request #4194 from Armada651/efb-source-format
PixelShaderGen: Add support for RGBA6 EFB format truncation.
2016-10-21 21:45:29 +00:00
Jules Blok
ab5054c34e VideoBackends: Always enable dual-source blending if supported. 2016-10-10 17:32:51 +02:00
degasus
9f264c0872 AVIDump: Move CoreTiming into caller. 2016-10-10 12:03:18 +02:00