From 76a5beeb7091077c77fafa1ff8e6a22640243324 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Fri, 3 Dec 2021 17:01:51 +0000 Subject: [PATCH] Use current command buffer for unscaled copy (perf) Avoids flushing commands and renting a command buffer when fulfilling copy dependencies and when games do unscaled copies. --- Ryujinx.Graphics.Vulkan/TextureView.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ryujinx.Graphics.Vulkan/TextureView.cs b/Ryujinx.Graphics.Vulkan/TextureView.cs index ddeec1819..9ec32dc1f 100644 --- a/Ryujinx.Graphics.Vulkan/TextureView.cs +++ b/Ryujinx.Graphics.Vulkan/TextureView.cs @@ -187,8 +187,6 @@ namespace Ryujinx.Graphics.Vulkan public void CopyTo(ITexture destination, int srcLayer, int dstLayer, int srcLevel, int dstLevel) { - _gd.FlushAllCommands(); - var src = this; var dst = (TextureView)destination; @@ -197,7 +195,9 @@ namespace Ryujinx.Graphics.Vulkan return; } - using var cbs = _gd.CommandBufferPool.Rent(); + _gd.PipelineInternal.EndRenderPass(); + + var cbs = _gd.PipelineInternal.CurrentCommandBuffer; var srcImage = src.GetImage().Get(cbs).Value; var dstImage = dst.GetImage().Get(cbs).Value;