Commit Graph

84 Commits

Author SHA1 Message Date
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
fc1fe0672b OGL: Add some basic state tracking
We would want to improve the granularity here in the future, but for
now, this should avoid any performance loss from switching to the
VideoCommon shader cache.
2018-03-10 15:56:37 +10:00
f9c829c7f7 OGL: Re-implement async shader compiling 2018-03-10 15:56:34 +10:00
dec0c3bce8 Move shader caches to VideoCommon 2018-03-10 15:56:30 +10:00
4c24a69710 VideoCommon: Add support for Abstract Framebuffers 2018-03-02 20:20:48 +10:00
fec6bb4d56 VideoBackends: Add AbstractShader and AbstractPipeline classes 2018-02-22 22:02:34 +10:00
de632fc9c8 Renderer: Handle resize events on-demand instead of polling
We now differentiate between a resize event and surface change/destroyed
event, reducing the overhead for resizes in the Vulkan backend. It is
also now now safe to change the surface multiple times if the video thread
is lagging behind.
2018-02-20 01:15:55 +10:00
c1b39ecc58 BPFunctions: Move upscaling of scissor rect to VideoCommon 2018-02-20 00:49:32 +10:00
5359396099 BPFunctions: Move GX viewport conversion to VideoCommon 2018-02-20 00:49:32 +10:00
d96e8c9d76 VideoBackends: Combine Initialize/Prepare and Cleanup/Shutdown methods
Also allows the work previously done in Prepare to return a failure
status.
2018-01-27 13:53:55 +10:00
38e0b6e2ab AbstractTexture: Move Bind() method to Renderer
This makes state tracking simpler, and enables easier porting to command
lists later on.
2018-01-22 13:22:09 +10:00
c709f3c2d1 Standardise some enums from ALL_CAPS to CamelCase 2018-01-05 10:03:58 -08:00
29a9ed043b Implement dual-source blending in shader
For some GLES drivers that don't support dual-source blending, but do
support GL_EXT_shader_framebuffer_fetch, this might be useful.
2018-01-05 09:56:46 -08:00
f43d85921d VideoBackends: Add AbstractStagingTexture class
Can be used for asynchronous readback or upload of textures.
2017-11-22 18:47:04 +10:00
49a9c33bd7 VideoCommon: Move abstract texture creation function to Renderer 2017-11-22 18:47:04 +10:00
53684701fa HybridXFB: Fix lint errors 2017-11-17 22:11:31 -06:00
33bc286baa Remove old XFB logic 2017-11-17 22:11:29 -06:00
a9f0d1783b Support frame and video dumping from VideoCommon 2017-11-17 22:11:23 -06:00
79387dddb2 Add support for hybrid XFB 2017-11-17 19:47:56 -06:00
24ddea04ce VideoBackends: Move SamplerState to common 2017-09-11 20:01:54 +10:00
836b9b9acb Renderer: Move cull mode to a rasterization state object
Also moves logic for primitive handling to VideoCommon.
2017-09-11 20:01:45 +10:00
2869c570f1 Renderer: Move depth state to VideoCommon and seperate from bpmem 2017-09-11 19:40:26 +10:00
3dd675e613 Renderer: Change SetBlendState to accept a BlendingState
This decouples the state generation (from the emulated GPU) from the
management of internal backend state.
2017-09-03 14:14:54 +10:00
cd502990fa OGL: Uber shader support 2017-07-30 17:43:59 +10:00
abc662d69c OGL: Support compute shaders and emitting GLSL 4.3
This also changes bSupportsEarlyFragmentTests to
bSupportsImageLoadStore, as it is used for both.
2017-04-01 12:31:41 +10:00
a8876a29fe OGL: Use ARB_texture_storage to allocate TextureCache entries
This ensures that they are complete textures by decoding time, as when
using compute shaders we write directly to the destination texture.
2017-04-01 12:31:41 +10:00
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
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
70cf774a5c RenderBase: Forward declare EFBAccessType 2017-01-23 12:41:26 -05:00
23b0faeba5 OGL: Use VideoCommon blend state for framebuffer configuration. 2017-01-06 14:01:39 +01:00
607ce40f0b OGL: Fix black screen when MSAA is enabled 2016-12-12 17:51:19 +10:00
b81dee8b9a OGL: Support full-resolution frame dumping 2016-11-28 21:54:56 +10:00
93221e7f48 OGL: Move frame rendering procedures to seperate methods 2016-11-28 21:54:56 +10:00
741debe229 OGL: Avoid reallocation of frame dumping PBO. 2016-11-07 22:32:54 +01:00
f6a6cc9c67 OGL: Use PBO for framedump, with async readback. 2016-11-07 22:17:32 +01: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
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
da0204a85c Fix a really stupid GLSL version parsing bug 2016-08-19 08:53:27 -04:00
3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
c34fb3edf0 Use ffmpeg for Windows Video Dumping instead of VFW 2016-01-07 18:37:58 -05:00
b4e9bbb551 Merge pull request #3336 from Sonicadvance1/improve_glextensions
[GLExtensions] Improve the extension loader.
2016-01-01 13:01:51 -05:00
a61fc372bb VideoCommon: Change PokeEFB to take a pointer rather than a vector
This saves allocating a vector for the pass-through path.
2015-12-20 14:42:14 +10:00
78dda1cf79 [OGL] Update extension checks in Render.
This was relying on behaviour that GLExtensions was adding fake extensions to the supported list with ES.
This no longer happens so it needed to be changed.
2015-12-13 11:39:45 -06:00
df799dd124 VideoCommon: Create default implementation for state setters
It's fine to pull those within the backends, so there is no need to enforce them to implement this interface.
2015-11-24 22:39:10 +01:00
ed5e3c054e Enable Anisotropic filtering in ES.
This adds a check to make sure the vendor supports anisotropic filtering.
Pretty much all vendors support this, even the mobile ones.
2015-11-19 02:00:43 -06:00
51c984dde3 Remove the "Show EFB Copy Regions" debug option.
It was only implemented in OpenGL, though the option was visible in both
backends, leading to memory leaks if you enabled it in DirectX.

And it wasn't particularly useful as a debug feature as it only showed
where in the EFB the copies were taken from, not what format it was, or
what the copy was used for, or what content was in the EFB at that point
in time.

Also, it stretched the copy regions relative to the window, so the
on-screen regions don't even line up with the window unless the game used
the full EFB (some pal games) and you game image stretched to the full
window.
2015-11-05 18:15:46 +13:00
e7b2a22225 Support Conservative Depth as a fallback for EarlyZ
Allows Mesa based drivers to support ZCompLoc
2015-10-18 01:46:54 +13:00