Commit graph

90 commits

Author SHA1 Message Date
Henrik Rydgård
9b7061b383 Vulkan: Apply Themaister's patch, removing illegal pre-transitions of swapchain images. Fixes #11417 2018-10-03 21:39:16 +02:00
Unknown W. Brackets
81f74e4287 Vulkan: Assert on some creates failing.
Before was only checking in debug builds.
2018-06-24 07:35:19 -07:00
Unknown W. Brackets
5028486630 thin3d: Cleanup some unused/uninitialized warnings. 2018-06-24 07:34:07 -07:00
Unknown W. Brackets
469d8a6a41 GPU: Screenshot output in BGRA if that's native.
This is a decent chunk faster.
2018-06-16 13:48:50 -07:00
Henrik Rydgård
b037efdb55 If there are multiple Vulkan devices, show a setting to allow the user to choose. 2018-06-06 10:20:12 +02:00
Unknown W. Brackets
423309da50 Vulkan: Don't merge render passes if read from.
In the future, we might actually track dependencies so we can smartly
sort the render passes instead.

See #11079 - screen got brighter because a cleared framebuffer was used as
a texture.
2018-05-27 14:15:54 -07:00
Henrik Rydgård
3f7602227c Windows: If neither OpenGL nor D3D9 is available, offer an escape route into D3D11.
This does happen on some fresh Win10 installations.

We really should do something much nicer and more automatic, but that's for later.
2018-05-03 22:19:07 +02:00
Unknown W. Brackets
ec5d1a8722 Vulkan: Leave removed commands in render passes.
We'll just need to not check commands.empty(), which we do in a couple
places but not in important ways so far.
2018-05-03 08:04:57 -07:00
Unknown W. Brackets
954f93046f Vulkan: Keep state on Clear cmds when used later.
This also removes duplicate state - for example our UI has some duplicate
Scissor commands.
2018-05-03 07:18:40 -07:00
Unknown W. Brackets
844015b7f8
Vulkan: Discard draws immediately before clear.
Fixes #10163, a crash on Adreno when a clear is the last thing in a render pass.
2018-05-02 19:23:49 -07:00
Henrik Rydgård
ca0fb77080 Assorted cleanups. Don't assert on no clear mask. 2018-04-06 23:29:44 +02:00
Henrik Rydgård
1dabccb453 Vulkan: Minor logic fixes in the transition elimination 2018-03-18 13:14:20 +01:00
Henrik Rydgård
3e7723ea6d Vulkan: Use finalLayout to optimize away barriers before framebuffer copies. 2018-03-18 12:09:02 +01:00
Henrik Rydgård
375fa3fb5b Improve a bunch of Vulkan copy-rect asserts by adding more debug info 2018-02-26 14:23:52 +01:00
Henrik Rydgård
8ad5b499a9 Improve assert messages in VulkanRenderManager (minor) 2018-02-10 08:58:33 +01:00
Unknown W. Brackets
3eb6d38d75 Vulkan: Fix stencil-only clear for stencil upload.
Fixes stencil issues in Star Ocean.
2018-01-27 15:10:17 +01:00
Henrik Rydgård
b9726245ac Vulkan: Use VK_KHR_DEDICATED_ALLOCATION for frame buffers for minor speedup on some GPUs. Check for the debug report extension before enabling it. 2017-12-30 21:31:43 +01:00
Henrik Rydgård
2031b2a4cd And yet another case of the same problem as the previous commit. 2017-12-10 14:50:34 +01:00
Henrik Rydgård
bd40479224 Vulkan: Add facility to auto-generate mipmap levels. Not yet used.
Intended for replacement textures and optional quality improvements
later.
2017-12-07 09:28:18 +01:00
Henrik Rydgård
ab95dcae91
Merge pull request #10249 from unknownbrackets/minor
More minor cleanups
2017-12-04 09:49:44 +01:00
Unknown W. Brackets
5846016247 Vulkan: Allow shutdown with init commands.
On startup, when immediately shutting down, there will be init commands
from creating the backbuffers.  Rather than fight this, just free them.

This fixes hangs when locking/unlocking Android.
2017-12-03 20:32:17 -08:00
Unknown W. Brackets
a5998e6dc7 Vulkan: Swap in more forceful asserts.
Just in case of unexpected format issues.
2017-12-03 19:22:03 -08:00
Henrik Rydgård
b52285287d Vulkan: Avoid duplicate image pre-transitions (actually eliminated later anyway, but a small saving) 2017-11-30 00:40:55 +01:00
Henrik Rydgård
bfec850933 Revert "Temporary hack (see #10163): Ignore the VK_ERROR_INITIALIZATION_FAILED from vkQueueSubmit."
This reverts commit 50cd4a56cb.
2017-11-24 10:36:50 +01:00
Henrik Rydgård
50cd4a56cb Temporary hack (see #10163): Ignore the VK_ERROR_INITIALIZATION_FAILED from vkQueueSubmit. 2017-11-24 09:20:22 +01:00
Henrik Rydgård
b6911d2764 Add a hidden debug option [Graphics]GfxDebugSplitSubmit to try to narrow down some Vulkan issues, see #10163. Also improve some asserts. 2017-11-22 10:47:04 +01:00
Henrik Rydgård
27a60f5e58 Fix message asserts on Android. Add more of them to check things in Vulkan code. 2017-11-20 12:11:47 +01:00
Henrik Rydgård
766ddf9148 Temporarily turn off Vulkan threading on AMD, see issue #10097. 2017-11-16 21:40:00 +01:00
Henrik Rydgård
96d6f1cae5 Make sure the device supports transfers from swapchain images when taking screenshots. 2017-11-15 13:57:22 +01:00
Henrik Rydgård
10792cc8e7 Windows/Vulkan: implement screenshots. Something is iffy with the red/blue swap though... 2017-11-15 13:18:29 +01:00
Henrik Rydgård
8bfdf7b1b2 Fix annoying little flicker when starting a game. 2017-11-13 15:45:31 +01:00
Henrik Rydgård
14e9c9da80 Minor cleanup, fix a comment. 2017-11-13 10:35:31 +01:00
Unknown W. Brackets
b1554ef061 Vulkan: Cut down on asserts during init.
In case something is horribly wrong, or our desired settings aren't
compatible, let's try to stumble our way out.

More things can fail, but the goal is to detect failure or at least be
able to render UI settings to swap out of Vulkan.
2017-11-12 21:56:55 -08:00
Henrik Rydgård
e18a023ce8 Vulkan: Noticed a framebuffer refcount leak, and changed my mind regarding those :) Let's do it this way instead. 2017-11-11 19:41:43 +01:00
Henrik Rydgård
378e01625c Fix a few more device-loss bugs. 2017-11-10 15:10:36 +01:00
Henrik Rydgård
8b42d83123 Vulkan: Remove duplicate depalShaderCache, fix a number of instances where we didn't use the deleter properly.
Plus more logging, of course.
2017-11-09 17:25:37 +01:00
Henrik Rydgård
6eb58b1252 Keep the draw context up to date in a bunch of places. More logging. 2017-11-09 16:28:22 +01:00
Henrik Rydgård
7922a2ab5c Vulkan: If acquiring a frame fails (happens sometimes during window resize), skip swapping the frame. Should help #10063 2017-11-07 09:56:41 +01:00
Unknown W. Brackets
6c1f6618b6 Vulkan: Wait for orderly thread stop on resize.
To be safer, let's just let it finish.  We don't actually sync the thread
in join(), so it could still be running a frame.
2017-11-06 23:03:14 -08:00
Unknown W. Brackets
1ab9f102ab Vulkan: Fix deadlock on resize.
Still needed to set this flag.  Didn't notice earlier because creating the
fences affected the race condition timing, I think...

Improves #10063.
2017-11-06 22:30:14 -08:00
Henrik Rydgård
70c70b1e76 Vulkan: Some error handling improvement. Might get us a clue for #10065 2017-11-07 00:08:39 +01:00
Henrik Rydgård
4f4eb6f024 Vulkan: The validation layers don't like zero-size blits. 2017-11-06 23:49:27 +01:00
Henrik Rydgård
ea2fc55217
Merge pull request #10056 from hrydgard/remove-multithreading-2
Remove the old style multithreading
2017-11-06 20:37:06 +01:00
Unknown W. Brackets
3a84b63777 Vulkan: Convert depth format on readback.
Although, the GPU debugger stuff already handles more formats, it's hard
to get the current format to avoid the conversion...
2017-11-06 00:29:02 -08:00
Unknown W. Brackets
138837ac54 Vulkan: Add texture image readback.
This way we can see how it was decoded, scaled, etc.  This also helps
seeing texture cache invalidation issues.
2017-11-06 00:29:01 -08:00
Unknown W. Brackets
b2039bd14f Vulkan: Fix leak in WipeQueue(). 2017-11-05 14:22:09 -08:00
Henrik Rydgård
f16d11a43b Turn on multithreaded vulkan 2017-11-05 23:21:54 +01:00
Henrik Rydgård
702e354a6a Vulkan multithread: Fix race condition. 2017-11-05 22:18:28 +01:00
Unknown W. Brackets
56d34402ff Vulkan: Resignal unexecuted fences on thread stop.
When resizing or similar, we may end up with frames we never ran.  This
also happens on startup.

We need them signaled at start so we can wait on them, or we may deadlock.
2017-11-05 09:22:14 -08:00
Unknown W. Brackets
ebe9dcafde Vulkan: Wait for queue idle in DestroyBackbuffers.
Otherwise it's only done after destroying Draw, so no need to mutex.
2017-11-05 08:44:14 -08:00