Compare commits

..

2 Commits

Author SHA1 Message Date
Kurochi51
d604e98227 Fix regression introduced by 1.1.1733 on Intel GPUs (#5311)
* Fix regression introduced by 1.1733 on Intel iGPUs

* Should have actually figured the variable, oops.

* maybe something goes wrong here? honestly lost

* Shader cache bump
2023-06-22 21:35:06 +02:00
Marco Carvalho
58907e2c29 GetHashCode should not reference mutable fields (#5331) 2023-06-22 18:36:07 +02:00
9 changed files with 11 additions and 11 deletions

View File

@@ -13,8 +13,8 @@ namespace ARMeilleure.State
// _e0 & _e1 could be marked as readonly, however they are not readonly because we modify them through the Unsafe
// APIs. This also means that one should be careful when changing the layout of this struct.
private ulong _e0;
private ulong _e1;
private readonly ulong _e0;
private readonly ulong _e1;
/// <summary>
/// Gets a new <see cref="V128"/> with all bits set to zero.

View File

@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
private const ushort FileFormatVersionMajor = 1;
private const ushort FileFormatVersionMinor = 2;
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
private const uint CodeGenVersion = 5241;
private const uint CodeGenVersion = 5311;
private const string SharedTocFileName = "shared.toc";
private const string SharedDataFileName = "shared.data";

View File

@@ -166,7 +166,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
// gl_FrontFacing sometimes has incorrect (flipped) values depending how it is accessed on Intel GPUs.
// This weird trick makes it behave.
res = context.ICompareLess(context.INegate(context.IConvertS32ToFP32(res)), Const(0));
res = context.ICompareLess(context.INegate(context.FP32ConvertToS32(context.ConditionalSelect(res, ConstF(1f), ConstF(0f)))), Const(0));
}
}

View File

@@ -6,7 +6,7 @@ namespace Ryujinx.HLE.HOS.Services.Mii.Types
[StructLayout(LayoutKind.Sequential, Pack = 1, Size = 0x10)]
struct CreateId : IEquatable<CreateId>
{
public UInt128 Raw;
public readonly UInt128 Raw;
public bool IsNull => Raw == UInt128.Zero;
public bool IsValid => !IsNull && ((Raw >> 64) & 0xC0) == 0x80;

View File

@@ -4,8 +4,8 @@ namespace Ryujinx.Tests.Unicorn
{
public struct SimdValue : IEquatable<SimdValue>
{
private ulong _e0;
private ulong _e1;
private readonly ulong _e0;
private readonly ulong _e1;
public SimdValue(ulong e0, ulong e1)
{

View File

@@ -5,7 +5,7 @@ namespace Spv.Generator
{
internal struct ConstantKey : IEquatable<ConstantKey>
{
private Instruction _constant;
private readonly Instruction _constant;
public ConstantKey(Instruction constant)
{

View File

@@ -5,7 +5,7 @@ namespace Spv.Generator
{
internal class DeterministicStringKey : IEquatable<DeterministicStringKey>
{
private string _value;
private readonly string _value;
public DeterministicStringKey(string value)
{

View File

@@ -8,7 +8,7 @@ namespace Spv.Generator
{
public OperandType Type => OperandType.String;
private string _value;
private readonly string _value;
public LiteralString(string value)
{

View File

@@ -5,7 +5,7 @@ namespace Spv.Generator
{
internal struct TypeDeclarationKey : IEquatable<TypeDeclarationKey>
{
private Instruction _typeDeclaration;
private readonly Instruction _typeDeclaration;
public TypeDeclarationKey(Instruction typeDeclaration)
{