Commit graph

85 commits

Author SHA1 Message Date
Henrik Rydgård
05b2e11c5c Vulkan: Prevent some bad merging of renderpasses. Thanks Unknown for writing it up. 2019-08-21 21:30:36 +02:00
Henrik Rydgård
773cb5fa70 Stop renderpass merging at readbacks. 2019-08-21 21:13:56 +02:00
Henrik Rydgård
597b034b5c Minor optimization 2019-08-21 20:32:23 +02:00
Henrik Rydgård
93412aff3b Vulkan: Automatically merge render passes to the same target when possible.
Should speed things up a bit on mobile in some games that do stupid
things like GoW. Currently only enabled in GoW, but plan to enable this
globally as it should be quite cheap when nothing is detected.
2019-08-21 20:32:23 +02:00
Henrik Rydgård
e3f1e563f2 Improve renderpass profiling descriptions a little 2019-08-21 18:31:01 +02:00
Henrik Rydgård
66609b395f Vulkan: Profile individual render passes/steps. 2019-08-21 16:47:46 +02:00
Henrik Rydgård
d0a3410875 Typo fix 2019-08-13 00:22:47 +02:00
Henrik Rydgård
ddb5208130 Vulkan: Reduce the amount of redundant stencil parameter sets 2019-08-12 23:19:07 +02:00
Henrik Rydgård
213e2ccefc Vulkan: Add missing barrier when rendering to a target that's already in COLOR_OPTIMAL layout.
Fixes #12215
2019-08-08 15:38:09 +02:00
Henrik Rydgård
3b0624ff9f Some changes and asserts. 2019-08-08 14:07:53 +02:00
Henrik Rydgård
ebe64c60e9 Vulkan: Improve the Metal Gear Acid 2 performance hack. 2019-08-08 11:49:35 +02:00
Henrik Rydgård
3d6bd6f0df Vulkan: Using VK_DEPENDENCY_BY_REGION on the backbuffer subpass causes tearing, let's not do it. Fixes #12202. 2019-08-01 14:56:58 +02:00
Henrik Rydgård
ff65b813d9 Assorted warning fixes 2019-05-10 23:26:34 +02:00
Henrik Rydgård
ed1aa74827 Address feedback from #11936 (support memory types without CACHED as a backup) 2019-03-26 10:39:51 +01:00
Henrik Rydgård
60889767bf Vulkan: Request cached memory for readbacks. First try coherent too but also support non-coherent cached memory.
Should speed up readbacks slightly.

This is just a common sense optimization, I haven't measured it. Writes to
coherent non-cached memory is OK due to hardware write combining, but for
reads you really want cached to avoid a memory transaction for every
single read (instead reading full cache lines).
2019-03-25 21:40:25 +01:00
Henrik Rydgård
7362cccee4 Vulkan subpass dependencies: Handle VK_IMAGE_LAYOUT_UNDEFINED without debug-asserting. 2019-03-12 22:34:41 +01:00
Henrik Rydgard
8e1a5ef3d6 Minor refactor of physical device property/feature detection, to allow for more extension use. 2019-02-05 18:07:17 +01:00
Henrik Rydgård
d1910de166 GL: Realized we need another sanity check in the readback code
Added similar checks to Vulkan, just because.
2018-11-24 17:20:56 +01:00
Unknown W. Brackets
caf5bb2789 Vulkan: Allow pre-transition from undefined.
This seems like it can happen when download/upload operations break up a
render, and happens now with dumps using the display at the right timing.
2018-11-17 10:01:38 -08: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
1cfb21931d Vulkan: Properly transition stencil/depth for read.
Need to transition the entire texture, so both aspects must be set.
2018-06-09 18:27:29 -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
Henrik Rydgård
04fefa2417 Vulkan image readback: Fix a couple scary cases of wrong argument order in image transitions, leading to transitioning 0 mips 2018-06-01 22:16:20 +02:00
Henrik Rydgård
87beddc393
Merge pull request #11084 from hrydgard/crash-fix-attempts-1.6
Various fixes for 1.6.1
2018-05-27 23:27:57 +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
b730d187e8 Add some paranoid checks guided by stack traces from Google Play 2018-05-27 22:12:59 +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
Henrik Rydgård
1987401e74 Fix glitch in MGS: Acid perf hack. yeah, slippery slope.. 2018-04-14 10:27:36 +02:00
Henrik Rydgård
0ac6cea34d Add a queue processing hack for Sonic Rivals too. Now it's fast. 2018-04-13 18:05:04 +02:00
Henrik Rydgård
413a204138 Vulkan: Semi-gross hack that massively improves the perf of MGS2:Acid. 2018-04-13 17:32:56 +02:00
Henrik Rydgård
d160292f54 Include renderpass definition in Vulkan shader cache entries, should make it more effective again. 2018-03-29 14:36:04 +02:00
Henrik Rydgård
d125fa00e1 Make sure the renderpass cache hashmap is never accessed from the main thread at runtime. Should help #10811 2018-03-27 14:45:41 +02:00
Henrik Rydgård
2d3655ea23 Vulkan: Get rid of more explicit barriers by merging the finalLayout color transitions into renderpasses. 2018-03-18 12:03:23 +01:00
Henrik Rydgård
6d5f0665fe Add a super focused workaround for the Mali bug, see #10723
Minimizes the performance penalty.
2018-03-18 11:20:45 +01:00
Henrik Rydgård
f43935b030 Merge framebuffer layout pre-transitions into render pass subpass dependencies.
With this, drivers should be able to completely get rid of layout
transitions into render passes that use CLEAR, at least.
2018-03-18 09:55:36 +01:00
Henrik Rydgård
33a1e6a080 Vulkan Clear-renderpass merging: If a copy step is found that reads from the affected buffer, don't merge the clear into the later renderpass. 2018-03-18 09:44:00 +01:00
Henrik Rydgård
c5ebb2d73f Oops, remove logging 2018-03-16 14:58:45 +01:00
Henrik Rydgård
a08464eb77 Vulkan: Also check for empty clearing renderpasses later in the frame. 2018-03-16 14:57:41 +01:00
Henrik Rydgård
df8dac4aae If the first renderpass is an empty clear, merge it into the next one that touches the same framebuffer. Works around #10723 in Wipeout. 2018-03-16 13:44:56 +01:00
Henrik Rydgård
3cd92b4d90 Vulkan: Add a (disabled) facility to force image layouts to GENERAL, for debugging barrier issues 2018-03-15 16:23:23 +01:00
Unknown W. Brackets
0e2a586c1b Global: Fix some type comparison/shadow warnings. 2018-02-11 07:03:23 -08: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
b9d0bf9842 Remove outdated comment. 2017-12-31 00:10:55 +01:00
Henrik Rydgård
a0f718ace1 Start separating depth and stencil renderpass actions, only internally in the Vulkan code so far. 2017-12-30 22:40:57 +01:00
Henrik Rydgård
1e64919392 Vulkan: Create renderpass objects on demand. Just a refactoring to prepare for some later features/optimizations. 2017-12-30 22:35:43 +01:00
Henrik Rydgård
2250ef799c Avoid including platform-specific headers in VulkanContext.h 2017-12-18 12:54:25 +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
85b743c732 Just some debug output for future decisions 2017-12-05 11:42:51 +01:00