From e1da7df2075f45ac3d19538f7781115978282100 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Mon, 2 Nov 2020 19:53:23 +0000 Subject: Support res scale on images, correctly blacklist for SUST, move logic out of backend. (#1657) * Support res scale on images, correctly blacklist for SUST, move logic out of backend. * Fix Typo --- Ryujinx.Graphics.Gpu/Image/TextureManager.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Ryujinx.Graphics.Gpu/Image/TextureManager.cs') diff --git a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs index 7588258f..08398cb6 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs @@ -194,6 +194,15 @@ namespace Ryujinx.Graphics.Gpu.Image return changesScale || (hasValue && color.ScaleMode != TextureScaleMode.Blacklisted && color.ScaleFactor != GraphicsConfig.ResScale); } + /// + /// Gets the first available bound colour target, or the depth stencil target if not present. + /// + /// The first bound colour target, otherwise the depth stencil target + public Texture GetAnyRenderTarget() + { + return _rtColors[0] ?? _rtDepthStencil; + } + /// /// Updates the Render Target scale, given the currently bound render targets. /// This will update scale to match the configured scale, scale textures that are eligible but not scaled, -- cgit v1.2.3