Initial support for the guest OpenGL driver (NVIDIA and Nouveau)

This commit is contained in:
gdkchan 2019-12-05 17:34:47 -03:00 committed by Thog
parent 6a98c643ca
commit e25b7c9848
25 changed files with 581 additions and 102 deletions

View file

@ -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);