From d604e982276105db043ca495a16f1b047bb2d0f6 Mon Sep 17 00:00:00 2001 From: Kurochi51 Date: Thu, 22 Jun 2023 22:35:06 +0300 Subject: [PATCH] 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 --- .../Shader/DiskCache/DiskCacheHostStorage.cs | 2 +- src/Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs index 5cfbfd3864..267112865f 100644 --- a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs +++ b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs @@ -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"; diff --git a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs index bb60d27469..76b2e07836 100644 --- a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs +++ b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs @@ -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)); } }