Fix one NRE, remove unused code

This commit is contained in:
Gabriel A 2023-11-13 21:59:23 -03:00
parent ebb42fa30d
commit dd0faf70a7
3 changed files with 1 additions and 25 deletions

View file

@ -207,29 +207,6 @@ namespace Ryujinx.Graphics.Gpu.Image
return false; return false;
} }
/// <summary>
/// Updates the set of entries that have been modified.
/// </summary>
/// <param name="address">Start address of the region of the pool that has been modfied</param>
/// <param name="endAddress">End address of the region of the pool that has been modified, exclusive</param>
protected void UpdateModifiedEntries(ulong address, ulong endAddress)
{
// TODO: Remove this method (it's unused now).
int startId = (int)((address - Address) / DescriptorSize);
int endId = (int)((endAddress - Address + (DescriptorSize - 1)) / DescriptorSize) - 1;
if (endId < startId)
{
return;
}
ModifiedEntries.SetRange(startId, endId);
_minimumAccessedId = Math.Min(_minimumAccessedId, startId);
_maximumAccessedId = Math.Max(_maximumAccessedId, endId);
}
/// <summary> /// <summary>
/// Updates a entry that has been modified. /// Updates a entry that has been modified.
/// </summary> /// </summary>

View file

@ -929,7 +929,7 @@ namespace Ryujinx.Graphics.Gpu.Image
samplerId = TextureHandle.UnpackSamplerId(packedId); samplerId = TextureHandle.UnpackSamplerId(packedId);
} }
if (samplerPool.TryGetBindlessSampler(samplerId, out Sampler sampler)) if (samplerPool.TryGetBindlessSampler(samplerId, out Sampler sampler) && sampler != null)
{ {
_context.Renderer.Pipeline.RegisterBindlessSampler(samplerId, sampler.GetHostSampler(null)); _context.Renderer.Pipeline.RegisterBindlessSampler(samplerId, sampler.GetHostSampler(null));
} }

View file

@ -3,7 +3,6 @@ using Ryujinx.Graphics.GAL;
using Silk.NET.Vulkan; using Silk.NET.Vulkan;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Numerics; using System.Numerics;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;