aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2019-12-05 17:34:47 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commite25b7c9848b6ec486eb513297b5c536857665c7f (patch)
treec1ccb6c58bed0f7ece835359516330104feb8f4d /Ryujinx.Graphics.Gpu/Image/TextureManager.cs
parent6a98c643cabeea25dc42e19fe475a687a034a532 (diff)
Initial support for the guest OpenGL driver (NVIDIA and Nouveau)
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureManager.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TextureManager.cs21
1 files changed, 17 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
index 5e5b1c97..ce0cc249 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
@@ -81,14 +81,14 @@ namespace Ryujinx.Graphics.Gpu.Image
_gpBindingsManager.SetTextureBufferIndex(index);
}
- public void SetComputeSamplerPool(ulong gpuVa, int maximumId)
+ public void SetComputeSamplerPool(ulong gpuVa, int maximumId, SamplerIndex samplerIndex)
{
- _cpBindingsManager.SetSamplerPool(gpuVa, maximumId);
+ _cpBindingsManager.SetSamplerPool(gpuVa, maximumId, samplerIndex);
}
- public void SetGraphicsSamplerPool(ulong gpuVa, int maximumId)
+ public void SetGraphicsSamplerPool(ulong gpuVa, int maximumId, SamplerIndex samplerIndex)
{
- _gpBindingsManager.SetSamplerPool(gpuVa, maximumId);
+ _gpBindingsManager.SetSamplerPool(gpuVa, maximumId, samplerIndex);
}
public void SetComputeTexturePool(ulong gpuVa, int maximumId)
@@ -599,6 +599,19 @@ namespace Ryujinx.Graphics.Gpu.Image
}
}
+ public void Flush(ulong address, ulong size)
+ {
+ foreach (Texture texture in _cache)
+ {
+ if (texture.OverlapsWith(address, size) && texture.Modified)
+ {
+ texture.Flush();
+
+ texture.Modified = false;
+ }
+ }
+ }
+
public void RemoveTextureFromCache(Texture texture)
{
_textures.Remove(texture);