aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
index 67254440..87b0f444 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
@@ -174,6 +174,8 @@ namespace Ryujinx.Graphics.Gpu.Image
return;
}
+ bool changed = false;
+
for (int index = 0; index < _textureBindings[stageIndex].Length; index++)
{
TextureBindingInfo binding = _textureBindings[stageIndex][index];
@@ -216,6 +218,11 @@ namespace Ryujinx.Graphics.Gpu.Image
Texture texture = pool.Get(textureId);
+ if ((binding.Flags & TextureUsageFlags.ResScaleUnsupported) != 0)
+ {
+ texture?.BlacklistScale();
+ }
+
ITexture hostTexture = texture?.GetTargetTexture(binding.Target);
if (_textureState[stageIndex][index].Texture != hostTexture || _rebind)
@@ -223,6 +230,8 @@ namespace Ryujinx.Graphics.Gpu.Image
_textureState[stageIndex][index].Texture = hostTexture;
_context.Renderer.Pipeline.SetTexture(index, stage, hostTexture);
+
+ changed = true;
}
if (hostTexture != null && texture.Info.Target == Target.TextureBuffer)
@@ -244,6 +253,11 @@ namespace Ryujinx.Graphics.Gpu.Image
_context.Renderer.Pipeline.SetSampler(index, stage, hostSampler);
}
}
+
+ if (changed)
+ {
+ _context.Renderer.Pipeline.UpdateRenderScale(stage, _textureBindings[stageIndex].Length);
+ }
}
/// <summary>
@@ -269,6 +283,11 @@ namespace Ryujinx.Graphics.Gpu.Image
Texture texture = pool.Get(textureId);
+ if ((binding.Flags & TextureUsageFlags.ResScaleUnsupported) != 0)
+ {
+ texture?.BlacklistScale();
+ }
+
ITexture hostTexture = texture?.GetTargetTexture(binding.Target);
if (_imageState[stageIndex][index].Texture != hostTexture || _rebind)