Ryujinx/Ryujinx.Graphics.Vulkan
riperiperi a64fee29dc
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.

* Vulkan: add situational "Fast Flush" mode

The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.

However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.

The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.

The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.

This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.

Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).

* Add conversions in milliseconds next to flush timers.
2023-04-11 09:23:41 +02:00
..
Effects Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
MoltenVK Minor code formatting (#4498) 2023-03-04 14:43:08 +01:00
Queries GPU: Scale counter results before addition (#4471) 2023-03-12 18:01:15 +01:00
Shaders Add copy dependency for some incompatible texture formats (#4380) 2023-02-21 19:21:57 -03:00
Auto.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
AutoFlushCounter.cs Vulkan: add situational "Fast Flush" mode (#4667) 2023-04-11 09:23:41 +02:00
BackgroundResources.cs Minor code formatting (#4498) 2023-03-04 14:43:08 +01:00
BitMap.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
BufferAllocationType.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
BufferHolder.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
BufferManager.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
BufferState.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
BufferUsageBitmap.cs Support use of buffer ranges with size 0 (#3736) 2022-10-03 20:08:38 -03:00
CacheByRange.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
CommandBufferPool.cs Vulkan: Don't flush commands when creating most sync (#4087) 2022-12-29 15:39:04 +01:00
CommandBufferScoped.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
Constants.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
DescriptorSetCollection.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
DescriptorSetManager.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
DescriptorSetUpdater.cs Vulkan: Insert barriers before clears (#4596) 2023-03-26 12:51:02 +02:00
DisposableBuffer.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
DisposableBufferView.cs Fix Redundant Qualifer Warnings (#4091) 2022-12-10 21:21:13 +01:00
DisposableFramebuffer.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
DisposableImage.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
DisposableImageView.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
DisposableMemory.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
DisposablePipeline.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
DisposableRenderPass.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
DisposableSampler.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
EnumConversion.cs Vulkan: Insert barriers before clears (#4596) 2023-03-26 12:51:02 +02:00
FenceHelper.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
FenceHolder.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
FormatCapabilities.cs chore: Update Silk.NET to 2.16.0 (#3953) 2022-12-01 19:11:56 +01:00
FormatConverter.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
FormatTable.cs Fix R4G4B4A4 format on Vulkan (#3696) 2022-09-13 07:59:38 +02:00
FramebufferParams.cs Vulkan: Insert barriers before clears (#4596) 2023-03-26 12:51:02 +02:00
HardwareCapabilities.cs Vulkan: Support list topology primitive restart (#4483) 2023-02-26 19:19:00 -03:00
HashTableSlim.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
HelperShader.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
IdList.cs Minor code formatting (#4498) 2023-03-04 14:43:08 +01:00
IndexBufferPattern.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
IndexBufferState.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
MemoryAllocation.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
MemoryAllocator.cs vulkan: Cleanup PhysicalDevice and Instance querying (#4632) 2023-04-05 14:48:38 -03:00
MemoryAllocatorBlockList.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
MultiFenceHolder.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
NativeArray.cs Add Support for Post Processing Effects (#3616) 2023-02-27 18:11:55 -03:00
PersistentFlushBuffer.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
PipelineBase.cs Vulkan: add situational "Fast Flush" mode (#4667) 2023-04-11 09:23:41 +02:00
PipelineConverter.cs vulkan: Respect VK_KHR_portability_subset vertex stride alignment (#4419) 2023-02-15 08:41:48 +00:00
PipelineDynamicState.cs vulkan: Do not call vkCmdSetViewport when viewportCount is 0 (#4406) 2023-02-13 20:32:20 +00:00
PipelineFull.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
PipelineHelperShader.cs Implement non-MS to MS copies with draws (#3958) 2022-12-04 15:07:11 -03:00
PipelineLayoutCache.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
PipelineLayoutCacheEntry.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
PipelineLayoutFactory.cs Fix Redundant Qualifer Warnings (#4091) 2022-12-10 21:21:13 +01:00
PipelineState.cs Vulkan: Support list topology primitive restart (#4483) 2023-02-26 19:19:00 -03:00
PipelineUid.cs Minor improvement to Vulkan pipeline state and bindings management (#3829) 2022-11-10 13:38:38 -03:00
Ryujinx.Graphics.Vulkan.csproj misc: Some dependencies cleanup (#4507) 2023-03-12 03:24:11 +01:00
SamplerHolder.cs Vulkan: Fix sampler custom border color (#3751) 2022-10-10 08:35:44 +02:00
SemaphoreHolder.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
Shader.cs Avoid allocating unmanaged string per shader (#3730) 2022-10-02 10:59:34 +02:00
ShaderCollection.cs chore: Update Silk.NET to 2.16.0 (#3953) 2022-12-01 19:11:56 +01:00
SpecInfo.cs Misc performance tweaks (#4509) 2023-03-11 17:05:48 -03:00
StagingBuffer.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
SyncManager.cs Vulkan: add situational "Fast Flush" mode (#4667) 2023-04-11 09:23:41 +02:00
TextureBuffer.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
TextureCopy.cs Implement non-MS to MS copies with draws (#3958) 2022-12-04 15:07:11 -03:00
TextureStorage.cs Vulkan: Insert barriers before clears (#4596) 2023-03-26 12:51:02 +02:00
TextureView.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
Vendor.cs Relax Vulkan requirements (#4282) 2023-01-26 18:34:35 -03:00
VertexBufferState.cs Vulkan: Migrate buffers between memory types to improve GPU performance (#4540) 2023-03-19 17:56:48 -03:00
VulkanConfiguration.cs Use RGBA16 vertex format if RGB16 is not supported on Vulkan (#3552) 2022-08-20 16:20:27 -03:00
VulkanDebugMessenger.cs vulkan: Separate debug utils logic from VulkanInitialization (#4609) 2023-04-01 08:05:02 +00:00
VulkanException.cs Vulkan backend (#2518) 2022-07-31 18:26:06 -03:00
VulkanInitialization.cs vulkan: Cleanup PhysicalDevice and Instance querying (#4632) 2023-04-05 14:48:38 -03:00
VulkanInstance.cs vulkan: Cleanup PhysicalDevice and Instance querying (#4632) 2023-04-05 14:48:38 -03:00
VulkanPhysicalDevice.cs vulkan: Cleanup PhysicalDevice and Instance querying (#4632) 2023-04-05 14:48:38 -03:00
VulkanRenderer.cs Vulkan: add situational "Fast Flush" mode (#4667) 2023-04-11 09:23:41 +02:00
Window.cs Misc performance tweaks (#4509) 2023-03-11 17:05:48 -03:00
WindowBase.cs Add Support for Post Processing Effects (#3616) 2023-02-27 18:11:55 -03:00