Commit graph

317 commits

Author SHA1 Message Date
Henrik Rydgård
eb014e8c6b Try to be more consistent when initializing vulkan structs. 2018-02-25 12:15:29 +01:00
Henrik Rydgård
b7b5c5e211 Follow the spec rules about errors when allocating from descriptor pools
See https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateDescriptorSets.html
2018-02-25 12:15:29 +01:00
Henrik Rydgård
8e0e5f9aa6 Extract RecreateDescriptorPool() 2018-02-25 12:15:29 +01:00
Henrik Rydgård
5d77c63216 Vulkan: Need to count allocated descsets per frame separately from the map, since tess isn't even in-frame cached. 2018-02-24 12:15:22 +01:00
Henrik Rydgård
d1a8514e72 Vulkan: Dynamically grow descriptor pools as needed. Should help #10641 and similar issues. 2018-02-24 10:24:11 +01:00
Unknown W. Brackets
22f65500f1 GPU: Fix shader blending recopying.
This at least didn't look horrible like GLEs did, but still looked
odd in Lunar.
2018-01-27 15:10:17 +01:00
Henrik Rydgård
b75c8b72c6 Fix another little inconsistency (two uniforms were merged for bad reasons) 2017-12-07 21:39:09 +01:00
Henrik Rydgård
d0c248368d Use a VulkanDeviceAllocator for thin3d textures. Many devices have a hard limit on the total number of allocs and it's unnecessary to have the UI put pressure on that. 2017-12-03 10:29:41 +01:00
Unknown W. Brackets
243304a5e8 Hashmaps: Fix missing maintain calls in non-GLES.
Should only matter if vertex cache is enabled.
2017-12-02 18:27:18 -08:00
Henrik Rydgård
734d9c494c Fix bug in Vulkan non-buffered where clears could extend outside the frame, since Vulkan clears do not respect scissors. 2017-12-02 11:05:10 +01:00
Henrik Rydgård
5fff54e804 Fix another possible Vulkan shutdown bug 2017-11-29 19:15:08 +01:00
Henrik Rydgård
0646dc749b Vulkan vertex cache: Fix memory leak 2017-11-24 13:53:23 +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
713afdfe49 Refactor: Unify DecodeVerts and move ComputeNumVertsToDecode to Common 2017-11-19 12:39:09 +01:00
Henrik Rydgård
ce2b5df985 Vulkan: Break apart DecodeVerts 2017-11-19 12:33:20 +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
3e3214d54a Vulkan: Fix bug where shader blend texture overwrote normal texture binding. Fixes #10135 2017-11-15 20:43:29 +01:00
Henrik Rydgård
ce1bc7fc3f Fixes problem switching between non-through triangles and rects. Helps a small part of #6554 2017-11-14 09:27:03 +01:00
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