salieri: Fix missing guest GPU accessor missing on hashes (#1759)

This adds the guest GPU accessor to hashes computation.
As this change all the hashes from the cache, I added some migration
logic.

This is required for #1755.
This commit is contained in:
Mary 2020-12-01 22:48:31 +01:00 committed by GitHub
parent 5e6dc37aed
commit f6d88558b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 672 additions and 322 deletions

View file

@ -84,14 +84,14 @@ namespace Ryujinx.Graphics.Gpu.Shader.Cache.Definition
/// <summary>
/// Check the validity of the header.
/// </summary>
/// <param name="version">The target version in use</param>
/// <param name="graphicsApi">The target graphics api in use</param>
/// <param name="hashType">The target hash type in use</param>
/// <param name="data">The data after this header</param>
/// <returns>True if the header is valid</returns>
public bool IsValid(ulong version, CacheGraphicsApi graphicsApi, CacheHashType hashType, ReadOnlySpan<byte> data)
/// <remarks>This doesn't check that versions match</remarks>
public bool IsValid(CacheGraphicsApi graphicsApi, CacheHashType hashType, ReadOnlySpan<byte> data)
{
return Version == version && GraphicsApi == graphicsApi && HashType == hashType && TableChecksum == CalculateCrc16(data);
return GraphicsApi == graphicsApi && HashType == hashType && TableChecksum == CalculateCrc16(data);
}
}
}