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:
parent
9eb0ab05c6
commit
c30504e3b3
5 changed files with 60 additions and 22 deletions
|
@ -1,4 +1,6 @@
|
|||
using Ryujinx.Graphics.Gpu.Shader.Cache.Definition;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Intrinsics;
|
||||
|
||||
namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
|
@ -248,5 +250,15 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <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 TextureDescriptor other)
|
||||
{
|
||||
return Unsafe.As<TextureDescriptor, Vector256<byte>>(ref this).Equals(Unsafe.As<TextureDescriptor, Vector256<byte>>(ref other));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue