PR feedback

This commit is contained in:
Gabriel A 2024-04-07 16:23:03 -03:00
commit 1f6582b641
5 changed files with 10 additions and 8 deletions

View file

@ -107,8 +107,7 @@ namespace Ryujinx.Graphics.Gpu.Image
if (texture.CacheNode != _textures.Last) if (texture.CacheNode != _textures.Last)
{ {
_textures.Remove(texture.CacheNode); _textures.Remove(texture.CacheNode);
_textures.AddLast(texture.CacheNode);
texture.CacheNode = _textures.AddLast(texture);
} }
if (_totalSize > MaxTextureSizeCapacity && _textures.Count >= MinCountForDeletion) if (_totalSize > MaxTextureSizeCapacity && _textures.Count >= MinCountForDeletion)

View file

@ -681,9 +681,13 @@ namespace Ryujinx.Graphics.Gpu.Image
if (entry.CacheNode != null) if (entry.CacheNode != null)
{ {
_lruCache.Remove(entry.CacheNode); _lruCache.Remove(entry.CacheNode);
_lruCache.AddLast(entry.CacheNode);
}
else
{
entry.CacheNode = _lruCache.AddLast(entry);
} }
entry.CacheNode = _lruCache.AddLast(entry);
entry.CacheTimestamp = ++_currentTimestamp; entry.CacheTimestamp = ++_currentTimestamp;
RemoveLeastUsedEntries(); RemoveLeastUsedEntries();

View file

@ -432,7 +432,7 @@ namespace Ryujinx.Graphics.Gpu.Image
{ {
if (gpuVa != 0 && format != 0) if (gpuVa != 0 && format != 0)
{ {
// Logger.Error?.Print(LogClass.Gpu, $"Invalid texture format 0x{format:X} (sRGB: {srgb})."); Logger.Error?.Print(LogClass.Gpu, $"Invalid texture format 0x{format:X} (sRGB: {srgb}).");
} }
formatInfo = FormatInfo.Default; formatInfo = FormatInfo.Default;

View file

@ -31,8 +31,6 @@ namespace Ryujinx.Graphics.Vulkan
public bool Bound; public bool Bound;
public bool IsDirty => _storages == null;
public ImageArray(VulkanRenderer gd, int size, bool isBuffer) public ImageArray(VulkanRenderer gd, int size, bool isBuffer)
{ {
_gd = gd; _gd = gd;

View file

@ -1,4 +1,4 @@
using Ryujinx.Common.Logging; using Ryujinx.Common.Logging;
using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.GAL;
using Silk.NET.Vulkan; using Silk.NET.Vulkan;
using System; using System;
@ -357,7 +357,8 @@ namespace Ryujinx.Graphics.Vulkan
_device, _device,
segments, segments,
_plce, _plce,
IsCompute ? PipelineBindPoint.Compute : PipelineBindPoint.Graphics, setIndex); IsCompute ? PipelineBindPoint.Compute : PipelineBindPoint.Graphics,
setIndex);
} }
} }