Commit graph

149 commits

Author SHA1 Message Date
Henrik Rydgård
35437e6b62 Kill off more unused duplicate code 2017-11-13 16:50:45 +01:00
Henrik Rydgård
3e749a94ce Vulkan: Fix bug where we ended up creating duplicate pipelines even if vertices decoded to the same format, if they were created from different formats.
This can cut down the number of pipelines to a third or less in some
games. However, benefit is likely smaller since Vulkan drivers will
deduplicate shaders inside each vkPipelineCache object.

Helps #10106 while not actually implementing any of the suggestions inside.
2017-11-13 11:22:33 +01:00
Henrik Rydgård
14e9c9da80 Minor cleanup, fix a comment. 2017-11-13 10:35:31 +01:00
Unknown W. Brackets
d4c345c870 Vulkan: Tweak stencil value from clears.
Both changes fix graphical artifacts in Final Fantasy 4.
2017-11-12 10:51:32 -08:00
Henrik Rydgård
232e30f4db Vulkan: When deriving stencilref from color, don't forget to update the value.
Plus minor cleanups.
2017-11-12 19:33:21 +01:00
Henrik Rydgård
4346a54eb7 Vulkan: Speed up and simplify hardware tesselation by using storage buffers. 2017-11-12 13:55:42 +01:00
Henrik Rydgård
c05fe8382a hwtess: Shrink Vulkan UV textures 2017-11-12 11:04:17 +01:00
Henrik Rydgård
da09e10aa3 Make the interface to hw tess slightly more flexible. 2017-11-12 11:04:13 +01:00
Henrik Rydgård
ebac0143e0 Vulkan: Use a device allocator for tesselation data textures. Add comment about better solutions. 2017-11-12 10:28:55 +01:00
Henrik Rydgård
525cb40f84 Vulkan: Support wide lines if available on the GPU. 2017-11-12 10:17:49 +01:00
Henrik Rydgård
8d7bcd9d61 Vulkan hw tess: Assorted minor fixes. Works on Mali now. 2017-11-11 21:51:05 +01:00
Henrik Rydgård
9cd4db5f18 Vulkan hw tess: Use pushbuffers instead of temp images to upload data. 2017-11-11 20:39:19 +01:00
Henrik Rydgård
5d6a830288 Vulkan hw tess: Don't reuse the same dynamic texture for multiple draws, not safe. 2017-11-11 20:39:19 +01:00
Henrik Rydgård
378e01625c Fix a few more device-loss bugs. 2017-11-10 15:10:36 +01:00
Henrik Rydgård
3cc5d8f40a More minor vulkan fixes and cleanups. Don't actually call "Resized" if the size stays the same. 2017-11-10 12:41:06 +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
70c70b1e76 Vulkan: Some error handling improvement. Might get us a clue for #10065 2017-11-07 00:08:39 +01:00
Henrik Rydgård
6a8f72a327 Use the global curFrame counter. No need for a vector for pushing cmdbufs. 2017-11-01 08:47:50 +01:00
Henrik Rydgård
9e734b3791 Decimate descriptors every frame until I find a better solution. Fixes flicker in videos in several games. 2017-11-01 08:42:48 +01:00
Henrik Rydgård
ed2731d197 Vulkan: Fix depal and shader blending. 2017-10-31 12:35:00 +01:00
Henrik Rydgård
07dfda0633 Vulkan depal code now passes validation, but produces black. 2017-10-31 12:35:00 +01:00
Henrik Rydgård
7312576239 More buildfixes, warning fix, memory leak fix 2017-10-26 11:43:22 +02:00
Henrik Rydgård
07e8b4ff1a Bump descriptor set limits, which became insufficient with the addition of tesselation (should really use separate big desc layouts for them) 2017-10-26 10:57:01 +02:00
Henrik Rydgård
b5e06f3c7d VulkanRenderManager: BindPipeline should really be its own command. Tighten up some image transitions. 2017-10-26 10:57:00 +02:00
Henrik Rydgård
1c5bd0f8dc Move the VulkanRenderManager stuff to thin3d, fits in better there. 2017-10-26 10:56:59 +02:00
Henrik Rydgård
02f76ae4a8 Rendering basics now works. 2017-10-26 10:56:59 +02:00
Henrik Rydgård
0a0494ef8e It builds! With some shortcuts, of course. 2017-10-26 10:56:59 +02:00
Henrik Rydgård
8f9bb59005 Vulkan: Fix silly mistake in blend constant checks, thanks Unknown. 2017-10-22 10:07:49 +02:00
Henrik Rydgård
804aa79376 Various Vulkan image transition fixes and related 2017-10-20 18:09:05 +02:00
Henrik Rydgård
b886efe8f5 Another minor cleanup (DescribeCodePtr) 2017-10-20 11:06:12 +02:00
Henrik Rydgård
81a18dc4df Keeping descriptorsets around between frames can cause problems if we run out.. Try to prevent that. Need a better method than this though. 2017-08-20 21:35:03 +02:00
Henrik Rydgård
9bce767b73 Merge pull request #9916 from hrydgard/faster-hashmaps
Replace the most critical unordered_maps and maps with faster maps.
2017-08-20 17:56:31 +02:00
Henrik Rydgård
91783a3281 SIMD-optimize some data conv routines used in uniform updates. 2017-08-20 11:43:35 +02:00
Henrik Rydgård
e0e13e191f Replace the most critical unordered_maps and maps with two new maps: FastHashMap and PrehashMap. 2017-08-20 11:30:19 +02:00
Henrik Rydgård
b9b2656e93 More vulkan microoptimizations. Add more profiler scopes. 2017-08-18 13:48:11 +02:00
Henrik Rydgård
560eaa5390 Vulkan: Add code (disabled) to be able to run with more in-flight frames. Only improves performance marginally and needs more testing. 2017-08-17 17:57:37 +02:00
Henrik Rydgård
45737466e2 Vulkan vertex cache: Fix bug with "pure prim" draws (where we avoid the index buffer) 2017-08-17 12:00:20 +02:00
Henrik Rydgård
5e788ffadf Implement vertex caching for Vulkan. 2017-08-17 11:22:45 +02:00
Henrik Rydgård
50d771961b Vulkan: More minor optimization (avoid pipeline cache lookups when possible) 2017-08-15 16:01:50 +02:00
Henrik Rydgård
c4ccf5b734 Simple micro-optimization in AdvanceVerts 2017-08-15 12:02:47 +02:00
Henrik Rydgård
4e7099bf47 Vulkan: Fix some more state dirtying issues. 2017-08-15 10:51:44 +02:00
Henrik Rydgård
a1fd2d1ed1 Dirty-track the current pipeline to avoid many vkBindPipeline calls. 2017-08-14 16:02:58 +02:00
Henrik Rydgård
5a65334646 Use dirty-flags more in Vulkan state setting 2017-08-14 15:14:46 +02:00
Henrik Rydgård
776c9e384f Oops, broke Vulkan in the rebase somehow. Fixed. 2017-08-14 13:52:40 +02:00
Henrik Rydgård
14a80968cf Unify transformed arrays 2017-06-03 18:05:21 +02:00
Henrik Rydgård
1abb8792ab Unify ComputeMiniHash 2017-06-03 18:05:18 +02:00
Henrik Rydgård
3032240916 Unify DecodeVertsStep 2017-06-03 18:04:46 +02:00
Henrik Rydgård
240e058b3b Some unification in DrawEngine 2017-06-03 18:03:56 +02:00
Henrik Rydgård
665a2c04cb Implement software skinning for the Vulkan backend. Fixes #9753 2017-06-02 11:47:14 +02:00