Commit Graph

242 Commits

Author SHA1 Message Date
Henrik Rydgård 14b5a1a7cd Fix pipeline lifetime issue, misc. 2022-09-08 00:38:32 +02:00
Henrik Rydgård 77819c6f80 Lifetime fixes, cleanups 2022-09-08 00:38:32 +02:00
Henrik Rydgård befcfb470c Fix shader caching. 2022-09-08 00:38:32 +02:00
Henrik Rydgård 7ab7440475 Also create renderpass variants on demand 2022-09-08 00:38:32 +02:00
Henrik Rydgård 80ca822bf2 Create framebuffer variants on demand 2022-09-08 00:38:28 +02:00
Henrik Rydgård e828df9f25 Split each renderpass/framebuffer into multiple "compatibility classes" (RenderPassType). 2022-09-08 00:32:03 +02:00
Henrik Rydgård d3309dd8e9 Minor refactor with pipelines in QueueRunner (makes more information available for easier debugging) 2022-09-03 23:08:02 +02:00
Henrik Rydgård fb3f417e77 Fix lying comment, log level reduction 2022-09-03 16:15:46 +02:00
Henrik Rydgård c06cf8efaa Switch Vulkan pipelines to use promises for synchronization
Slightly more expensive I guess but shouldn't be much of a bottleneck.
2022-09-03 15:21:08 +02:00
Henrik Rydgård 93422f6dea Don't block on shader creation until it's time to create the pipeline. 2022-09-03 15:21:07 +02:00
Henrik Rydgård ec0586ba50 Use promises to hold shader modules, for later asyncification 2022-09-03 15:21:07 +02:00
Henrik Rydgård 24d674d2bc Shrink the TransitionRequest struct, use TinySet 2022-09-01 10:59:27 +02:00
Henrik Rydgård 670c31e746 Add support for reading depth buffers to the PackFramebufferSync function.
Also adds D16 conversion code (though, could probably get away with just
creating a 16-bit depth buffer on the GPU and blit to it, where depth
blit is available).

Not yet used, just getting it in separately.
2022-08-30 00:00:59 +02:00
Henrik Rydgård b447092742 Some Vulkan renderpass load/store optimizations. 2022-08-28 23:16:48 +02:00
Henrik Rydgård acb84f0648 Rename Vulkan attachment operation variables. Prep for supporting specifying store op. 2022-06-11 13:22:40 +02:00
Henrik Rydgård df2f0df155 Make the Vulkan GPU log profiler a runtime developer setting.
I keep forgetting to disable the define on commit, this is a better
solution.
2021-12-19 22:50:14 +01:00
Henrik Rydgård dc9816ceac Add hardcoded bool toggle for upscaling video, fix log, remove a comment, minor opt 2021-12-12 23:20:57 +01:00
Henrik Rydgård 3833d935f4 Fixes when profiler is disabled.
Typo, validation fix

More fixes

Fix mipgen logging

Disable the logging profiler by default again

Important to use the macro
2021-12-12 12:42:40 +01:00
Henrik Rydgård 9945620504 Switch to macros to easily disable the new profiling. Add missing scope 2021-12-12 12:11:59 +01:00
Henrik Rydgård 55fe21db1e Add a simple GPU profiler to profile individual events, rather than full passes. 2021-12-12 12:11:54 +01:00
Unknown W. Brackets fe7b573a38 Vulkan: Fix use-after-free on shutdown. 2021-12-09 23:52:10 -08:00
Unknown W. Brackets 212669d2bc Vulkan: Cleanup pipeline var shadowing. 2021-12-02 17:57:40 -08:00
Henrik Rydgård 2cbadefb29 Fix bugs in deletion. Delete redundant functions. 2021-11-22 19:02:08 +01:00
Henrik Rydgård a7591d7826 Switch framebuffers to use VMA for allocation as well 2021-11-22 18:54:09 +01:00
Henrik Rydgård 29f54befbd Comment improvement, restore accidental deletion 2021-11-21 21:34:05 +01:00
Henrik Rydgård dda425b068 Vulkan: Add a single background thread for pipeline creation
Add proper waits for compile-done

Don't rely on non-standard struct initialization of classes

Attempt to drain the pipeline compile queue before destroying the PipelineManager.

Vulkan: Bump the cache version for testing
2021-11-21 18:36:00 +01:00
Henrik Rydgård 62f4875e24 VulkanRenderManager: Add deferred pipeline creation (to get it off the CPU thread) 2021-11-21 18:36:00 +01:00
Henrik Rydgård b426d12a17 More best-practices adjustments 2021-10-08 21:32:40 +02:00
Henrik Rydgård d7774bf1ae Ran the "Vulkan best practices" layer, fixed some stuff. 2021-10-08 21:20:40 +02:00
Bram Verweij a31cbe42d2 Rename namespace to PPSSPP_VK, remove indentation 2021-08-21 12:39:15 +02:00
Bram Verweij cc00a4132d Prevent dlopen collisions between ppsspp_libretro.so and libvulkan.so 2021-08-20 11:22:57 +02:00
Henrik Rydgård f4a6d291e1 Common: Capitalize setCurrentThreadName(). 2021-04-30 23:02:36 -07:00
Henrik Rydgård 9b13220f49 Merge pull request #13864 from unknownbrackets/vulkan-amd
Vulkan: Remove #10097 hack for newer AMD drivers
2021-02-15 16:31:49 +01:00
Unknown W. Brackets 6ca9acf94b Vulkan: Delete only created swapchain images.
We do other null checks here, same reason.  Create may have failed.
2021-01-16 20:55:34 -08:00
Henrik Rydgård 1acbfb1a52 Never pass a null into QueueDeleteImageView (got a report of that).
Went through them all to see where this could happen, can't find any
other path than this, though it's strange.
2021-01-03 21:46:12 +01:00
Unknown W. Brackets ca0763c7f1 Vulkan: Remove #10097 hack for newer AMD drivers.
Fixes #10643.  Assumes affected drivers only supported 1.0 due to year 1.1
supporting drivers started coming out.
2021-01-03 09:24:14 -08:00
Henrik Rydgård 29b2f2c4ef Better GLSL version handling. Now specify the latest version supported by the device.
Correct the version check for our own implementations of packUnorm4x8 etc.
2020-11-16 23:30:07 +01:00
Henrik Rydgård 90cc325b53 Clears didn't always properly set the RenderArea. Should help #13664 2020-11-15 22:30:16 +01:00
Henrik Rydgård 291742535b Safety, comments 2020-11-02 10:02:52 +01:00
Henrik Rydgård 332bb7feeb VK: Whenever safely possible, shrink the render area.
We just set the render area to the union of the scissor rects used in a pass.

Might help some games on some mobile hardware, a little bit.

Possibly #13464?
2020-10-11 23:23:25 +02:00
Henrik Rydgård 5ece3de8ba Track and accumulate pipeline flags for render passes.
(Information that will later let us make some interesting optimizations)
2020-10-11 12:22:25 +02:00
Henrik Rydgård 0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00