Commit Graph

102 Commits

Author SHA1 Message Date
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
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
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 2fd77895a2 Vulkan: Fix issue where target rectangle changes weren't detected
This was causing issues when toggling the crop setting, as well as some
widescreen hacks.
2017-03-02 21:53:42 +10:00
Jules Blok a15555fe03 VideoBackends: Use vertex shader depth range if ztexture is used. 2017-02-26 11:34:48 +01:00
Jules Blok bde8126913 VideoBackends: Remove depth range clamping hacks.
Oversized depth ranges are handled correctly now, we don't need to hack around them with clamps anymore.
2017-02-24 14:54:20 +01:00
Jules Blok 28e6e259ed VideoBackends: Set the maximum range when the depth range is oversized.
The depth values generated by the vertex shader need to be clamped correctly.
2017-02-21 02:57:23 +01: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
degasus 41b0c74e30 VideoCommon: Make dst_alpha state implicit. 2017-01-04 20:02:31 +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 ee7a2edf35 Update comments 2016-12-27 21:32:52 +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