Use a descriptor cache for faster pool invalidation. (#1977)
* Use a descriptor cache for faster pool invalidation. * Speed up comparison by casting to Vector256 Now we never need to worry about this ever again
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
using Ryujinx.Graphics.GAL;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Intrinsics;
|
||||
|
||||
namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
@ -244,5 +246,15 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
return ((Word2 >> 12) & 0xfff) * Frac8ToF32;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if two descriptors are equal.
|
||||
/// </summary>
|
||||
/// <param name="other">The descriptor to compare against</param>
|
||||
/// <returns>True if they are equal, false otherwise</returns>
|
||||
public bool Equals(ref SamplerDescriptor other)
|
||||
{
|
||||
return Unsafe.As<SamplerDescriptor, Vector256<byte>>(ref this).Equals(Unsafe.As<SamplerDescriptor, Vector256<byte>>(ref other));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user