Commit Graph

44 Commits

Author SHA1 Message Date
Stenzek 66b6e72c5e Vulkan: Submit fewer command buffers in deferred EFB copies mode 2018-11-07 16:25:01 +10:00
Stenzek 3323265d91 FramebufferManager: Dynamic selection of EFB depth format 2018-07-19 21:47:42 +10:00
spycrab 40bb9974f2 Reformat all the things! 2018-04-12 21:28:39 +02:00
Lioncash 50a476c371 Assert: Uppercase assertion macros
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00
Stenzek 6374a4c4a8 AbstractTexture: Support multisampled abstract texture 2018-03-01 17:31:24 +10:00
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 0525726338 Vulkan: Move pipeline barrier outside render pass for EFB peeks 2018-01-11 15:36:01 +10:00
Stenzek 48a8063cd5 Vulkan: Fix FramebufferManagerBase::m_EFBLayers being set out-of-range 2018-01-11 15:30:27 +10:00
Stenzek 173a33886c Vulkan: Move render pass management to ObjectCache 2018-01-11 15:21:34 +10:00
Stenzek 0e50b2c9f2 Vulkan: Add missing layout transition when resolving MSAA depth buffers 2018-01-11 15:21:33 +10:00
Stenzek 7f217a8bb2 Vulkan: Drop StagingTexture2D class as it is now duplicated functionality 2017-11-22 18:49:33 +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
iwubcode 33bc286baa Remove old XFB logic 2017-11-17 22:11:29 -06:00
iwubcode 79387dddb2 Add support for hybrid XFB 2017-11-17 19:47:56 -06:00
Stenzek 340aabbb06 VideoCommon: Add helpers for generating common render states 2017-09-11 20:01:52 +10:00
Stenzek b7a099814a Vulkan: Clear contents of EFB convert framebuffer at create time
Fixes a validation layer warning when converting pixel formats.
2017-09-11 20:01:50 +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 aff44684a4 Vulkan: Move shader/pipeline-related methods to ShaderCache 2017-07-30 12:38:49 +10:00
Stenzek d9a3b29a07 Vulkan: Emit input/output locations for EFB poke geometry shader 2017-07-20 17:46:59 +10:00
iwubcode 2cdc93f4ab Video Backends: Split texture cache code out into separate files, introduce 'AbstractTexture' 2017-06-13 00:41:51 -05: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 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 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 277829d842 VideoCommon: Eliminate static state in Renderer 2017-03-04 16:39:50 +10: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 273ace7bb7 LightingShaderGen: Remove unnecessary includes 2017-02-01 01:06:00 -05:00
Stenzek e6249619a0 Vulkan/GL: Set the alpha channel to 0 when creating the EFB framebuffer 2016-12-27 13:06:08 +10:00
Stenzek 9736198c3b Vulkan: Use explicit barriers instead of dependancies
At least on NV, some of these don't seem to have the intended effect. One
known instance of this is in texture conversion.
2016-12-04 20:10:13 +10:00
Stenzek 804cd0ff03 Vulkan: Move XFB encoding/decoding to TextureConverter 2016-12-04 20:10:13 +10:00
Stenzek e241ec6666 Vulkan: Implement StagingTexture2D on top of StagingBuffer
Greatly simplifies things, and we weren't using the linear texture
implementation anyway.
2016-12-04 20:10:13 +10:00
Stenzek 4bc0e14995 Vulkan: Use an enumeration to index pipeline layouts 2016-12-04 20:10:13 +10:00
Stenzek 6a4eba1153 Vulkan: Replace explicit command buffer submits with wrapper function
Should we ever introduce anything else that has to be done when a command
buffer is executed (e.g. invalidating constants from previous commit), we
don't have to update all the callers.
2016-11-30 23:14:36 +10:00
Stenzek 6b88a854a7 Vulkan: Handle strided XFB copies
Where src_rect.width * 2 != dst_stride.
2016-11-19 20:29:47 +10:00
Stenzek bd67adb362 Vulkan: Use correct sample count for EFB pokes with MSAA enabled 2016-11-14 20:24:16 +10:00
Stenzek 89176fe2ab Vulkan: Fix crash on EFB poke 2016-11-14 20:19:59 +10:00
Stenzek 5182e6b549 Vulkan: Implement virtual/real XFB support 2016-11-03 22:33:24 +10:00
Stenzek b066d51dfa Vulkan: Remove parameters/members of single-instance classes
There's not a lot of point in passing these around or storing them
(texture cache/state tracker mainly) as there will only ever be a single
instance of the class.

Also adds downcast helpers such as Vulkan::Renderer::GetInstance().
2016-11-03 22:01:54 +10:00
Stenzek 4a8766cec4 Vulkan: Fix resource leaks present at shutdown and mode changes
Infrequent, but still happened.
2016-10-03 19:11:47 +10:00
Lioncash 9395b8efa9 Vulkan: Amend header includes
Adds headers where necessary to eliminate indirect includes.
Also adds headers to ensure certain standard constructs always
resolve correctly
2016-09-30 23:26:03 -04:00
Stenzek f6cdc38c8b Vulkan: Use render-pass based clears where possible 2016-10-01 02:40:02 +10:00
Stenzek 77a128ab87 Implement experimental Vulkan backend 2016-10-01 02:40:01 +10:00