Fix ZN flags set for shader instructions using RZ.CC dest (#2147)
* Fix ZN flags set for shader instructions using RZ.CC dest * Shader cache version bump and nits
This commit is contained in:
parent
e60bae1a94
commit
a0b4799f19
3 changed files with 9 additions and 14 deletions
|
@ -35,7 +35,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of the codegen (to be changed when codegen or guest format change).
|
/// Version of the codegen (to be changed when codegen or guest format change).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private const ulong ShaderCodeGenVersion = 2088;
|
private const ulong ShaderCodeGenVersion = 2147;
|
||||||
|
|
||||||
// Progress reporting helpers
|
// Progress reporting helpers
|
||||||
private volatile int _shaderCount;
|
private volatile int _shaderCount;
|
||||||
|
|
|
@ -276,12 +276,11 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||||
: context.IMaximumU32(srcA, srcB);
|
: context.IMaximumU32(srcA, srcB);
|
||||||
|
|
||||||
Operand pred = GetPredicate39(context);
|
Operand pred = GetPredicate39(context);
|
||||||
|
Operand res = context.ConditionalSelect(pred, resMin, resMax);
|
||||||
|
|
||||||
Operand dest = GetDest(context);
|
context.Copy(GetDest(context), res);
|
||||||
|
|
||||||
context.Copy(dest, context.ConditionalSelect(pred, resMin, resMax));
|
SetZnFlags(context, res, op.SetCondCode);
|
||||||
|
|
||||||
SetZnFlags(context, dest, op.SetCondCode);
|
|
||||||
|
|
||||||
// TODO: X flags.
|
// TODO: X flags.
|
||||||
}
|
}
|
||||||
|
@ -461,11 +460,9 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||||
|
|
||||||
EmitLopPredWrite(context, op, res, (ConditionalOperation)context.CurrOp.RawOpCode.Extract(44, 2));
|
EmitLopPredWrite(context, op, res, (ConditionalOperation)context.CurrOp.RawOpCode.Extract(44, 2));
|
||||||
|
|
||||||
Operand dest = GetDest(context);
|
context.Copy(GetDest(context), res);
|
||||||
|
|
||||||
context.Copy(dest, res);
|
SetZnFlags(context, res, op.SetCondCode, op.Extended);
|
||||||
|
|
||||||
SetZnFlags(context, dest, op.SetCondCode, op.Extended);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Lop3(EmitterContext context)
|
public static void Lop3(EmitterContext context)
|
||||||
|
@ -489,11 +486,9 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||||
EmitLopPredWrite(context, op, res, (ConditionalOperation)context.CurrOp.RawOpCode.Extract(36, 2));
|
EmitLopPredWrite(context, op, res, (ConditionalOperation)context.CurrOp.RawOpCode.Extract(36, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
Operand dest = GetDest(context);
|
context.Copy(GetDest(context), res);
|
||||||
|
|
||||||
context.Copy(dest, res);
|
SetZnFlags(context, res, op.SetCondCode, op.Extended);
|
||||||
|
|
||||||
SetZnFlags(context, dest, op.SetCondCode, op.Extended);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Popc(EmitterContext context)
|
public static void Popc(EmitterContext context)
|
||||||
|
|
|
@ -91,7 +91,7 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||||
|
|
||||||
public void PrepareForReturn()
|
public void PrepareForReturn()
|
||||||
{
|
{
|
||||||
if (Config.Stage == ShaderStage.Fragment)
|
if (!IsNonMain && Config.Stage == ShaderStage.Fragment)
|
||||||
{
|
{
|
||||||
if (Config.OmapDepth)
|
if (Config.OmapDepth)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue