Commit graph

54 commits

Author SHA1 Message Date
Henrik Rydgård
ab1cebec51 Actually bind a global uniform buffer, too. Not yet used. 2022-10-28 10:15:36 +02:00
Henrik Rydgård
96a5c52037 Vulkan: Reserve descriptor set 0 for frame-global data, move everything else to set 1 2022-10-28 09:39:56 +02:00
Henrik Rydgård
6d9008dab5 Fix validation issue with clears, remove redundant code 2022-10-27 11:05:59 +02:00
Henrik Rydgård
0de12f5ca9 Some refactoring of framebuffer views, layer issues, more work. 2022-10-27 11:05:58 +02:00
Henrik Rydgård
fb250c4b29 More multiview work 2022-10-27 11:05:58 +02:00
Henrik Rydgård
7a620962aa thin3d: Replace hint at future MRT support with basic multi layer support 2022-10-27 11:05:58 +02:00
Henrik Rydgård
90d395a10d Remove "attachment" parameter from BindFramebufferAsTexture everywhere.
Not actually useful since our framebuffer objects don't support multiple
color images, and probably won't ever need to.
2022-10-20 10:15:19 +02:00
Henrik Rydgård
f269137c78 Revert "Vulkan: Create depth/stencil buffers on demand"
This reverts commit be37de106c.
2022-10-13 22:39:47 +02:00
Henrik Rydgård
4d1da5859c Add simple way to add debug annotation in the middle of the command stream. Vulkan-only. 2022-10-13 22:39:44 +02:00
Henrik Rydgård
d4bfe9299d Track min and max GPU time, init time, render CPU time.
Mainly wanted to see if init time is a factor, there are optimizations
we can do there.
2022-10-10 10:53:27 +02:00
Henrik Rydgård
be37de106c Vulkan: Create depth/stencil buffers on demand 2022-10-09 20:28:32 +02:00
Unknown W. Brackets
d16caa71af Vulkan: Add geometry shader ID tracking.
We're still not generating them, yet.  But this tracks the objects and
IDs through the pipeline.
2022-10-02 07:42:16 -07:00
Henrik Rydgård
bd759790b0 Update the Vulkan debug names when reassigning depth buffers. 2022-09-28 14:09:40 +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
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
Henrik Rydgård
ef7c8844f8 Greatly simplify the thread synchronization. 2022-09-23 19:40:50 +02:00
Henrik Rydgård
f784112814 Flatten the Run function, to make it easier to reorganize. 2022-09-23 19:40:50 +02:00
Henrik Rydgård
5e63cdbcc4 Make functions private that should be private 2022-09-23 19:40:50 +02:00
Henrik Rydgård
ac3eb876a8 Fix memory leak (of Promise objects) in VK pipeline wrappers 2022-09-23 10:56:46 +02:00
Henrik Rydgård
c1d1c85116 Minor code cleanups (hasBegun is now redundant, for example) 2022-09-20 17:05:53 +02:00
Henrik Rydgård
c7322edf7b Various refactoring 2022-09-20 17:05:45 +02:00
Henrik Rydgård
d0016add37 Start moving stuff out to VulkanFrameData.cpp 2022-09-19 18:14:41 +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
fabd50b178 Move FrameData out of VulkanRenderManager 2022-09-17 01:34:38 +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
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
68dd329d95 Fix for desc struct 2022-09-08 01:24:04 +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
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
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
9097fdaae6 Shrink VkRenderData from 88 to 64 bytes. 2022-09-01 14:21:34 +02:00
Henrik Rydgård
b447092742 Some Vulkan renderpass load/store optimizations. 2022-08-28 23:16:48 +02:00
Henrik Rydgård
6f1f482432 Make GLQueueRunner/RenderManager aware of device caps, use it to check for NPOT and some other stuff 2022-08-07 11:15:23 +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
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
a7591d7826 Switch framebuffers to use VMA for allocation as well 2021-11-22 18:54:09 +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
Unknown W. Brackets
d264cbef32 Vulkan: MSVC 2017 buildfix.
Fixes the buildbot.
2021-09-10 23:35:31 -07:00
Henrik Rydgård
5876388c65 Vulkan scissor fix (validation errors). 2021-09-10 01:15:29 +02:00