Commit graph

57 commits

Author SHA1 Message Date
lainon
fec708489a Correct cleaning string and remove unused vars 2022-09-30 12:26:30 +03:00
Henrik Rydgård
ca5c69d3dd Vulkan: Better debug names for RENDER passes. 2022-09-27 23:41:09 +02:00
Unknown W. Brackets
e6db0bef2d
Merge pull request #16099 from hrydgard/vulkan-dont-always-alloc-depth
Vulkan: Avoid allocating depth images for stuff like temp copies, depal buffers etc.
2022-09-25 08:05:50 -07:00
Henrik Rydgård
70c5ca62e6 Remove debug log. Add some new debug log though, unrelated to this PR, for fb clut + fb texture. Plus a couple asserts. 2022-09-25 09:56:39 +02:00
Henrik Rydgård
753fd13494 Vulkan: Avoid allocating depth images for stuff like temp copies, depal buffers etc.
Pretty small impact, but good to do.

An interesting extension of this would upconvert framebuffers in the
FramebufferManager to have a depth buffer the first time depth is used on them,
but this doesn't do that yet.
2022-09-24 23:21:48 +02:00
Henrik Rydgård
9f3dfe7ebe Vulkan: Don't compile pipeline variants that don't make sense given their flags.
Ran into this with cache files from previous version of my change.

Also bumping the shader cache ID again to avoid this in other ways, but
good to be robust here.
2022-09-24 22:39:22 +02:00
Unknown W. Brackets
7b1ec28c30 Vulkan: Avoid crash on two backbuffer steps.
Happens when resuming from stepping, sometimes: first
EmuScreen_BackBuffer, which is done so UI is functional during stepping,
and then the actual blit.

Since this is an uncommon case, let's just allow it by reusing the
presentCmd instead of submitting it early.  Otherwise it ends up in a
pending state.
2022-09-23 18:47:51 -07:00
Henrik Rydgård
ef7c8844f8 Greatly simplify the thread synchronization. 2022-09-23 19:40:50 +02:00
Henrik Rydgård
7bef90297c Best practices layer warning: Don't pass in unused clear values. (probably zero impact, heh). 2022-09-23 13:54:14 +02:00
Henrik Rydgård
ac4ca592c3 Handle depth buffer write-after-write hazards in the queue runner 2022-09-23 13:47:11 +02:00
Henrik Rydgård
11b807828f Fix for render pass merge 2022-09-22 10:22:29 +02:00
Henrik Rydgård
8e30a7ccfc Vulkan: Don't have renderpasses store/load depth buffers when we don't use them 2022-09-22 10:06:05 +02:00
Henrik Rydgård
f6cb6c7695 Submit main command buffer before acquire. Fix sync bug. 2022-09-20 17:52:48 +02:00
Henrik Rydgård
fff080202f When taking screenshots, make sure that the readback command happens on the right cmdbuf. 2022-09-20 17:48:19 +02:00
Henrik Rydgård
b190c33cc7 Rewrite some present logic for slightly more clarity. Fixes bad logic and a minor race condition. 2022-09-20 17:05:53 +02:00
Henrik Rydgård
d0016add37 Start moving stuff out to VulkanFrameData.cpp 2022-09-19 18:14:41 +02:00
Henrik Rydgård
fc84f25818 Quick GE debugger stepping fix, after the recent vulkan swapchain acquire change 2022-09-18 12:10:23 +02:00
Henrik Rydgård
9d9f2c539e Finish the switch to late acquire, moving the swapchain responsibility to the queue runner. 2022-09-17 08:43:13 +02:00
Henrik Rydgård
a369252a29 RunSteps cleanup 2022-09-17 01:41:26 +02:00
Henrik Rydgård
415a795b11 Move back buffer rendering to a separate "present" command buffer 2022-09-17 01:11:41 +02:00
Henrik Rydgård
242efba6f7 Remove splitSubmit setting. Now we submit init commands before the acquire. 2022-09-17 01:07:30 +02:00
Henrik Rydgård
eadb144cc4 Show render pass types in GPU profiler 2022-09-16 19:19:42 +02:00
Henrik Rydgård
ce82fce8de Use subpass dependencies to implement shader framebuffer read in Vulkan. 2022-09-16 19:19:42 +02:00
Henrik Rydgård
58a7f0cf21 Assorted cleanup 2022-09-08 01:26:01 +02:00
Henrik Rydgård
caff2ea573 Correct merging of render passes. However, we have lifetime issues. 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
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
9097fdaae6 Shrink VkRenderData from 88 to 64 bytes. 2022-09-01 14:21:34 +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
34ed960a72 Use better pattern for enum switches 2022-08-28 23:57:01 +02:00
Henrik Rydgård
b447092742 Some Vulkan renderpass load/store optimizations. 2022-08-28 23:16:48 +02:00
Unknown W. Brackets
a6804c96bd GLES: Correct some variable shadowing.
Potentially fixes an issue with 3D textures?
2022-08-13 12:43:14 -07:00
Henrik Rydgård
acb84f0648 Rename Vulkan attachment operation variables. Prep for supporting specifying store op. 2022-06-11 13:22:40 +02:00
Unknown W. Brackets
6c08a7a121 Vulkan: Fix depth transition barrier. 2022-05-01 15:16:50 -07:00
Henrik Rydgård
f54aa53a8b Combine barriers before blits/copies 2022-05-01 11:54:47 +02:00
Henrik Rydgård
9d0eaff48a Convert some barriers to use the new barrier framework. 2022-05-01 11:34:29 +02:00
Henrik Rydgård
370b1dd38b Combine renderpass "pretransitions" for barriers. 2022-05-01 10:20:11 +02:00
Unknown W. Brackets
ffbd9bbe98 Global: Fix some int/size_t conversion warnings. 2022-03-13 12:03:48 -07:00
Henrik Rydgård
45308a16c0 Vulkan is strict about scissor rect, so let's clamp centrally.
Better than spreading the logic all over.

Fixes #15207
2021-12-08 22:38:01 +01:00
Henrik Rydgård
a2f9f68565 Vulkan: More scissor dimension checks. See #15207 2021-12-07 21:46:10 +01:00
Unknown W. Brackets
212669d2bc Vulkan: Cleanup pipeline var shadowing. 2021-12-02 17:57:40 -08: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
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