From efb135b74c9c0ff1de2dfd7d2a431bd23185ca66 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 16 Feb 2023 18:28:49 -0300 Subject: Clear CPU side data on GPU buffer clears (#4125) * Clear CPU side data on GPU buffer clears * Implement tracked fill operation that can signal other resource types except buffer * Fix tests, add missing XML doc * PR feedback --- Ryujinx.Graphics.Gpu/Image/Pool.cs | 2 +- Ryujinx.Graphics.Gpu/Image/TextureGroup.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Image') diff --git a/Ryujinx.Graphics.Gpu/Image/Pool.cs b/Ryujinx.Graphics.Gpu/Image/Pool.cs index ee4c051f..3e557c0b 100644 --- a/Ryujinx.Graphics.Gpu/Image/Pool.cs +++ b/Ryujinx.Graphics.Gpu/Image/Pool.cs @@ -69,7 +69,7 @@ namespace Ryujinx.Graphics.Gpu.Image Address = address; Size = size; - _memoryTracking = physicalMemory.BeginGranularTracking(address, size); + _memoryTracking = physicalMemory.BeginGranularTracking(address, size, ResourceKind.Pool); _memoryTracking.RegisterPreciseAction(address, size, PreciseAction); _modifiedDelegate = RegionModified; } diff --git a/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs b/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs index 1040b394..12a640e1 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs @@ -854,7 +854,7 @@ namespace Ryujinx.Graphics.Gpu.Image /// A CpuRegionHandle covering the given range private CpuRegionHandle GenerateHandle(ulong address, ulong size) { - return _physicalMemory.BeginTracking(address, size); + return _physicalMemory.BeginTracking(address, size, ResourceKind.Texture); } /// -- cgit v1.2.3