gpu cache: Make sure to invalidate textures that doesn't have the same target
This commit is contained in:
parent
8523caf569
commit
3d38798f27
2 changed files with 3 additions and 2 deletions
|
@ -472,7 +472,8 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
||||||
|
|
||||||
if (NewImage.Format == OldImage.Format &&
|
if (NewImage.Format == OldImage.Format &&
|
||||||
NewImage.Width == OldImage.Width &&
|
NewImage.Width == OldImage.Width &&
|
||||||
NewImage.Height == OldImage.Height)
|
NewImage.Height == OldImage.Height &&
|
||||||
|
NewImage.TextureTarget == OldImage.TextureTarget)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ namespace Ryujinx.Graphics
|
||||||
|
|
||||||
private bool TryReuse(NvGpuVmm Vmm, long Position, GalImage NewImage)
|
private bool TryReuse(NvGpuVmm Vmm, long Position, GalImage NewImage)
|
||||||
{
|
{
|
||||||
if (Gpu.Renderer.Texture.TryGetImage(Position, out GalImage CachedImage) && CachedImage.SizeMatches(NewImage))
|
if (Gpu.Renderer.Texture.TryGetImage(Position, out GalImage CachedImage) && CachedImage.TextureTarget == NewImage.TextureTarget && CachedImage.SizeMatches(NewImage))
|
||||||
{
|
{
|
||||||
Gpu.Renderer.RenderTarget.Reinterpret(Position, NewImage);
|
Gpu.Renderer.RenderTarget.Reinterpret(Position, NewImage);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue