Commit Graph

95 Commits

Author SHA1 Message Date
degasus 04f319066d TextureCache: Extract BP enum check to VideoCommon.
We have TOO many video backends.
2016-12-26 22:10:21 +01:00
Mat M 9160be50db Merge pull request #4224 from lioncash/tcache
TextureCacheBase: Eliminate static state
2016-12-23 04:33:42 -05:00
Markus Wick b5fe0b5b83 Merge pull request #4528 from stenzek/vulkan-descriptor-crash
Vulkan: Fix crash where a potentially deleted buffer is referenced
2016-12-20 11:11:54 +01:00
Stenzek 9290bf5844 Vulkan: Fix crash where a potentially deleted buffer is referenced
This happened when the geometry shader was disabled, and the uniform
buffer was grown to a larger size. The update would be skipped, leaving
the old buffer to be included in the descriptor set.
2016-12-19 22:00:42 +10:00
Stenzek accce4294a TextureCache: Use same color coefficients for EFB2Tex as EFB2RAM 2016-12-15 02:20:46 +10:00
Lioncash 58a5395173 TextureCacheBase: Eliminate static state 2016-12-09 16:50:37 -05:00
Stenzek af706efaef Vulkan: Fix viewport depth when depth clamp is unsupported 2016-12-09 22:45:10 +10:00
Léo Lam 31ccfffd38 Common: Add alignment header
Gets rid of duplicated alignment code.
2016-12-06 20:33:53 +01:00
Stenzek bff394ec8a Merge pull request #4489 from stenzek/vulkan-minor-fixes
Vulkan: Minor fixes
2016-12-05 12:19:49 +10:00
Stenzek 8f97a24904 Vulkan: Enable GS instancing 2016-12-04 20:53:49 +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 a475792163 Vulkan: Fix incorrect logic in readback preemption
This could have been causing a large number of command buffer
submissions per frame, depending on when the readbacks occured.
2016-12-04 20:10:13 +10:00
Stenzek 58978c1440 Vulkan: Faster path for decoding XFB data
Using a texel buffer as the copy destination removes the need to copy to
an intermediate texture first.
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 d67463e0a7 Vulkan: Simplify palette texture conversion 2016-12-04 20:10:13 +10:00
Stenzek add638538b Vulkan: Combine PaletteTextureConverter and TextureEncoder classes 2016-12-04 20:10:13 +10:00
Stenzek 804af42ccc Vulkan: Support binding texel buffers in UtilityShaderDraw 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 cd3481fbc7 Vulkan: Differentiate between descriptor set layouts and bind points
This also moves the pipeline and descriptor set layouts used for texture
conversion (texel buffers) to ObjectCache, and shares a binding location
with the SSBO set.
2016-12-04 20:10:13 +10:00
Stenzek 4e9018049d Vulkan: Support logging debug reports without enabling validation layers
There is a caveat, Host GPU must be checked prior to starting the game, as
we can't enable the extension at runtime without recreating the instance.
2016-12-04 19:55:12 +10:00
Stenzek 1cfb0a1185 Vulkan: Fix deadlock in some resize scenarios
Only have experienced this on a few occasions when using the anv driver.
2016-12-04 19:12:33 +10:00
Stenzek 2ef884893a Vulkan: Fix map error when texture dumping is enabled 2016-12-04 00:23:34 +10:00
Stenzek 4c860ddb70 Vulkan: Fix typo in PopulateBackendInfoMultisampleModes 2016-12-04 00:23:30 +10:00
Stenzek 730ec3809a Vulkan: Remove unused variable 2016-12-04 00:23:25 +10:00
Stenzek 7b1966a680 Vulkan: Fix assertion triggering when geometry shaders are unsupported
Happened when loading the pipeline UID cache.
2016-12-02 17:37:10 +10:00
Stenzek ca691a9d95 Vulkan: Allow re-use of uniform buffers when doing per-stage uploads
This is safe now because we invalidate the pointers after submitting a
command buffer.
2016-11-30 23:34:46 +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 3adeacb78d Vulkan: Fix case where uniforms could be overwritten
If a draw caused a command buffer submission, the current uniform storage
should not be used for the new command buffer.
2016-11-30 23:14:35 +10:00
Stenzek 4c11735bd5 Vulkan: Fix case where a draw's vertices could be overwritten
This could happen because the vertex memory was already committed, if a
uniform buffer allocation failed and caused a command buffer to be
executed, it would be associated with the previous command buffer rather
than the buffer containing the draw that consumed these vertices.
2016-11-30 22:45:00 +10:00
Stenzek 37550501cc Vulkan: Fix incorrect handling of buffer wrap-around in StreamBuffer
This was happening when a fence wait happened mid-frame. The data written
between the fence being queued and the allocation occuring was incorrectly
assumed to be consumed by the GPU.
2016-11-30 22:44:52 +10:00
Stenzek 0212741574 Merge pull request #4436 from stenzek/vulkan-full-ir-framedump
VideoBackends: Internal resolution frame dumping
2016-11-28 22:05:16 +10:00
Stenzek 1c1a686f63 Vulkan: Support full resolution frame dumping 2016-11-28 21:54:55 +10:00
Stenzek 8d48319414 Vulkan: Validate the pipeline cache before using it
This ensures that if a user changes adapters or vendors we're not passing
invalid data to the driver.
2016-11-28 21:21:55 +10:00
Stenzek 9604b336c8 Vulkan: Don't destroy the device's pipeline cache on MSAA mode change
The user could switch back again, and this would mean this data would be
lost. Disk space is cheap, and it's not going to be much.
2016-11-28 21:21:54 +10:00
Stenzek aac66a1b61 Vulkan: Implement a pipeline UID cache
This stores enough information to recreate the pipeline, including the
shader UIDs, blend/depth/rasterization state, primitive and vertex format.
2016-11-28 21:21:53 +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
Stenzek e66373b7ff Merge pull request #4456 from stenzek/vulkan-framedump-fix-2
Vulkan: Fix black borders in frame dumps
2016-11-28 20:03:08 +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
Stenzek 6b88a854a7 Vulkan: Handle strided XFB copies
Where src_rect.width * 2 != dst_stride.
2016-11-19 20:29:47 +10:00
Stenzek 725ef4c5dc Vulkan: Pass target_rect to framebuffer draw methods
Fixes the black borders in frame dumps when the window was not sized to
the framebuffer aspect ratio.
2016-11-18 22:55:22 +10:00
Stenzek 3c92b35422 Vulkan: Use multiple command pools, one per frame
Instead of resetting two command buffers, now we only have to call
vkResetCommandPool once at the start of a frame.

NV's recommends using one pool per frame/thread. May offer a very small
boost in performance on some systems.
2016-11-15 00:40:15 +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
Markus Wick bc98ec77be Merge pull request #4441 from stenzek/vulkan-max-image-count
Vulkan: Handle maxImageCount of zero when creating swap chain
2016-11-13 14:12:32 +01:00
Markus Wick c723532f0d Merge pull request #4430 from stenzek/vulkan-no-relaxed-vsync
Vulkan: Don't use FIFO_RELAXED present mode for vsync.
2016-11-13 14:10:58 +01:00
Stenzek 160fee6791 Vulkan: Handle maxImageCount of zero when creating swap chain
anv seems to set this to zero, which is fine according to the spec, but
we were using it as a maximum, which was resulting in a swap chain
without any buffers being created.
2016-11-11 23:33:40 +10:00
Stenzek 38c3ca5cd4 Vulkan: Implement asynchronous frame dumping 2016-11-10 01:07:46 +10:00
Stenzek c09ce029df Vulkan: Don't use FIFO_RELAXED present mode for vsync. 2016-11-07 19:22:27 +10:00