Vulkan: Cache delegate for EndRenderPass (#6132)

This prevents a small allocation each time this method is called. This is a top 3 SOH allocation during gameplay in most games, and eliminating it is pretty free.
This commit is contained in:
riperiperi
2024-01-16 12:22:20 +00:00
committed by GitHub
parent f4b74e9ce1
commit bebd8eb822
3 changed files with 4 additions and 2 deletions

View File

@ -30,6 +30,7 @@ namespace Ryujinx.Graphics.Vulkan
public readonly PipelineCache PipelineCache;
public readonly AutoFlushCounter AutoFlush;
public readonly Action EndRenderPassDelegate;
protected PipelineDynamicState DynamicState;
private PipelineState _newState;
@ -92,6 +93,7 @@ namespace Ryujinx.Graphics.Vulkan
Device = device;
AutoFlush = new AutoFlushCounter(gd);
EndRenderPassDelegate = EndRenderPass;
var pipelineCacheCreateInfo = new PipelineCacheCreateInfo
{