See merge request ryubing/ryujinx!234
This commit is contained in:
LotP 2025-12-06 17:19:19 -06:00 committed by GreemDev
parent fd7554425a
commit c3155fcadb
37 changed files with 563 additions and 677 deletions

View file

@ -1035,7 +1035,7 @@ namespace Ryujinx.Graphics.Vulkan
}
}
private void SetRenderTargetsInternal(ITexture[] colors, ITexture depthStencil, bool filterWriteMasked)
private void SetRenderTargetsInternal(Span<ITexture> colors, ITexture depthStencil, bool filterWriteMasked)
{
CreateFramebuffer(colors, depthStencil, filterWriteMasked);
CreateRenderPass();
@ -1043,7 +1043,7 @@ namespace Ryujinx.Graphics.Vulkan
SignalAttachmentChange();
}
public void SetRenderTargets(ITexture[] colors, ITexture depthStencil)
public void SetRenderTargets(Span<ITexture> colors, ITexture depthStencil)
{
_framebufferUsingColorWriteMask = false;
SetRenderTargetsInternal(colors, depthStencil, Gd.IsTBDR);
@ -1389,7 +1389,7 @@ namespace Ryujinx.Graphics.Vulkan
_currentPipelineHandle = 0;
}
private void CreateFramebuffer(ITexture[] colors, ITexture depthStencil, bool filterWriteMasked)
private void CreateFramebuffer(Span<ITexture> colors, ITexture depthStencil, bool filterWriteMasked)
{
if (filterWriteMasked)
{
@ -1399,7 +1399,7 @@ namespace Ryujinx.Graphics.Vulkan
// Just try to remove duplicate attachments.
// Save a copy of the array to rebind when mask changes.
void MaskOut()
void MaskOut(ReadOnlySpan<ITexture> colors)
{
if (!_framebufferUsingColorWriteMask)
{
@ -1436,12 +1436,12 @@ namespace Ryujinx.Graphics.Vulkan
if (vkBlend.ColorWriteMask == 0)
{
colors[i] = null;
MaskOut();
MaskOut(colors);
}
else if (vkBlend2.ColorWriteMask == 0)
{
colors[j] = null;
MaskOut();
MaskOut(colors);
}
}
}