Commit Graph

118 Commits

Author SHA1 Message Date
Stenzek 4997fbce44 Vulkan: Fix possible mismatch between EFB framebuffer and render pass
This could happen when changing MSAA settings or internal resolution at
runtime.
2018-01-11 16:02:31 +10:00
Stenzek cd68b3606c
Merge pull request #6193 from stenzek/readbacks
Abstract Staging Textures - VideoCommon interface for texture readbacks/uploads
2017-12-01 14:24:06 +10:00
Stenzek 32125cf181 OGL: Fix headless frame dumping
Also skips swapping the window system buffers in headless mode, as there
may not be a surface which can be swapped in the first place. Instead,
we call glFlush() at the end of a frame in this case.
2017-11-23 16:53:55 +10:00
Stenzek 6577365851 VideoCommon: Re-implement asynchronous frame dumping
This was lost as a result of hybrid XFB, now it is back, and ~10%
faster in very brief testing.
2017-11-22 18:49:33 +10:00
Stenzek f43d85921d VideoBackends: Add AbstractStagingTexture class
Can be used for asynchronous readback or upload of textures.
2017-11-22 18:47:04 +10:00
Stenzek 49a9c33bd7 VideoCommon: Move abstract texture creation function to Renderer 2017-11-22 18:47:04 +10:00
Leo Lam 80bcc0d58d
Merge pull request #6186 from lioncash/enum-class
VideoConfig: Make AspectMode and StereoMode enum classes
2017-11-19 15:08:16 +01:00
Lioncash 364eaadfe5 VideoBackends: Remove header inclusions made unnecessary with Hybrid XFB
Just some inclusions that weren't removed in the initial Hybrid XFB PR.
2017-11-19 00:53:10 -05:00
Lioncash 5337e58284 VideoConfig: Make StereoMode an enum class
Makes for more strongly-typed identifiers (and doesn't pollute
surrounding namespaces)
2017-11-18 23:19:53 -05:00
Lioncash 10697bcbe3 VideoConfig: Make AspectMode an enum class
Makes for more strongly-typed identifiers (and doesn't pollute
surrounding namespaces)
2017-11-18 23:17:56 -05:00
iwubcode 7248dd47d5 Hybrid XFB: Fix lint errors 2017-11-17 22:11:32 -06:00
iwubcode 4964fc87ae Video Backends: Remove the right of the xfb region for games where the
VI stride does not match the VI width
2017-11-17 22:11:32 -06:00
iwubcode 33bc286baa Remove old XFB logic 2017-11-17 22:11:29 -06:00
iwubcode 65cd085f9b Add new GUI option to skip XFBToRam and remove old XFB options 2017-11-17 22:11:28 -06:00
iwubcode 198d3b69b4 Add ability to dump xfb copies to texture for debugging purposes 2017-11-17 22:11:28 -06:00
iwubcode a9f0d1783b Support frame and video dumping from VideoCommon 2017-11-17 22:11:23 -06:00
iwubcode 79387dddb2 Add support for hybrid XFB 2017-11-17 19:47:56 -06:00
Stenzek 4301b8538d Vulkan: Only use oldSwapchain in response to VK_ERROR_OUT_OF_DATE_KHR
Seems to be required on the latest NV driver, otherwise the presented
images are never shown.
2017-10-10 23:21:40 +10:00
Stenzek cdf34a79f7 Vulkan: Set a flag to resize the swap chain when presenting fails
Drivers can return VK_ERROR_OUT_OF_DATE_KHR from vkQueuePresentKHR, and
we should resize the image in this case, as well as when getting it back
from vkAcquireNextImageKHR.
2017-10-10 23:21:40 +10:00
Stenzek 80593f502e Vulkan: Fix bug where command buffer wouldn't be started after resize 2017-10-10 23:21:40 +10:00
Stenzek 24ddea04ce VideoBackends: Move SamplerState to common 2017-09-11 20:01:54 +10:00
Stenzek 340aabbb06 VideoCommon: Add helpers for generating common render states 2017-09-11 20:01:52 +10:00
Stenzek 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
Stenzek 2869c570f1 Renderer: Move depth state to VideoCommon and seperate from bpmem 2017-09-11 19:40:26 +10:00
Stenzek 134daf3b00 Vulkan: Extend the NVIDIA MSAA bug to render-pass based clears
Calling vkCmdClearAttachments with a partial rect, or specifying a
render area in a render pass with the load op set to clear can cause the
GPU to lock up, or raise a bounds violation. This only occurs on MSAA
framebuffers, and it seems when there are multiple clears in a single
command buffer. Worked around by back to the slow path (drawing quads)
when MSAA is enabled.
2017-09-07 17:05:43 +10:00
Stenzek 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
Jonathan Hamilton 62e8d25cd1 Add Bug to Disable "LoadOp" clear renderpass in vulkan
This optimisation doesn't work on PowerVR's Vulkan implementation. We
(incorrectly) disallow Framebuffer objects to be used with a different
load or store op than that which they were created with, despite the
spec allowing such.

This fixes the windwaker intro "smearing"
2017-08-28 18:01:35 -07:00
Stenzek 7f88711186 Vulkan: Add a driver bug for NV when MSAA is enabled
This causes the card to lock up when vkCmdClearAttachments is called,
when multisampling is enabled. Seems to be restricted to Maxwell and
newer?
2017-08-03 17:40:15 +10:00
Stenzek d62dcd397d VideoConfig: Drop force vertex/pixel ubershader settings
This was mainly included for debugging, but could end up being confusing
for users, as well as polluting the GL program cache with a mix of uber
and specialized shaders if the option was changed.
2017-07-31 23:21:38 +10:00
Stenzek 33f6668544 Vulkan: Multithreaded creation of UID pipeline caches
Should give a decent speedup to boot time.
2017-07-30 17:43:59 +10:00
Stenzek 81b4ed2a81 Vulkan: Uber shader support 2017-07-30 17:43:59 +10:00
Stenzek aff44684a4 Vulkan: Move shader/pipeline-related methods to ShaderCache 2017-07-30 12:38:49 +10:00
Stenzek 3ea9d86faa ShaderGen: Pass host config to shader generation functions
Also moves the host config checks to common.
2017-07-20 17:54:33 +10:00
Stenzek b380f292b4 Vulkan: Reload pipeline cache when relevant host config changes 2017-07-20 17:46:59 +10:00
Jules Blok 1f2d43c870 Vulkan: Implement Quad-Buffered stereoscopy support. 2017-07-05 22:43:39 +02:00
iwubcode 2cdc93f4ab Video Backends: Split texture cache code out into separate files, introduce 'AbstractTexture' 2017-06-13 00:41:51 -05:00
shuffle2 2b86cf02a8 Merge pull request #5589 from stenzek/vulkan-validation-fixes
Vulkan: Don't transition image layouts inside render passes
2017-06-11 16:59:02 -07:00
MerryMage a0b41c83e7 VideoConfig: Remove bRunning
Value was set but not used.
2017-06-11 15:06:12 +01:00
Stenzek 8bb6abacf8 Vulkan: Transition EFB/XFB buffers before beginning swap render pass
Image layouts shouldn't be changed within a render pass.
2017-06-10 23:52:32 +10:00
Shawn Hoffman 5480efdff2 video: change multisample/AA setting to u32 2017-06-07 20:20:25 -07:00
Stenzek 417a4ca206 Vulkan: Implement post-processing backend
No new features, just parity with OpenGL.
2017-04-25 14:27:02 +10:00
Stenzek d1dc9d5a0c Merge pull request #5284 from stenzek/vulkan-videocommon-blending-state
Vulkan: Use BlendingState from VideoCommon
2017-04-18 22:16:32 +10:00
Stenzek ddc5275071 VideoCommon: Drop SetDitherMode()
It was a no-op on all backends apart from GL anyhow.
2017-04-18 21:55:22 +10:00
Stenzek 9dc7358395 Vulkan: Use BlendingState from VideoCommon
Remove the internal BlendState union. Also fixes Kirby's Return to
Dreamland shadows.
2017-04-18 21:55:22 +10:00
Stenzek 3fd1e6c2f6 Vulkan: Ensure all frames are written before resizing framedump buffer
Prevents destroying a framebuffer that may still be in use by a previous
frame dump.
2017-04-15 20:00:40 +10:00
Stenzek 48da42b49f Vulkan: Ensure framedump texture is incorrect layout for render/readback 2017-04-15 19:57:25 +10:00
Stenzek 69b0a31938 Vulkan: Clamp framebuffer resolve rectangle to texture size
This is invalid and was causing the NVIDIA driver to throw an error.
2017-04-15 19:55:32 +10:00
Stenzek eef7b6cf7a Vulkan: Fix invalid resolve at swap time when MSAA is enabled 2017-04-15 18:35:58 +10:00
Stenzek f4bdfe3e0c Vulkan: Fix incorrect render pass area for out-of-range clears
This occured when a game set an out-of-range EFB clear region.
2017-04-14 18:29:48 +10:00
Lioncash c7ab6861c2 RenderBase: Return a tuple from ConvertStereoRectangle instead of using out parameters 2017-04-09 15:11:59 -04:00