Use "Undesired" scale mode for certain textures rather than blacklisting (#2537)

* Use "Undesired" scale mode for certain textures rather than blacklisting

* Nit

Co-authored-by: gdkchan <gab.dark.100@gmail.com>

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
This commit is contained in:
riperiperi 2021-08-11 21:44:51 +01:00 committed by GitHub
parent ed754af8d5
commit 0a80a837cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 24 deletions

View file

@ -549,7 +549,8 @@ namespace Ryujinx.Graphics.Gpu.Image
/// <param name="scale">The new scale factor for this texture</param>
public void SetScale(float scale)
{
TextureScaleMode newScaleMode = ScaleMode == TextureScaleMode.Blacklisted ? ScaleMode : TextureScaleMode.Scaled;
bool unscaled = ScaleMode == TextureScaleMode.Blacklisted || (ScaleMode == TextureScaleMode.Undesired && scale == 1);
TextureScaleMode newScaleMode = unscaled ? ScaleMode : TextureScaleMode.Scaled;
if (_viewStorage != this)
{