1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-10 12:41:50 +00:00

Insert bitcast for assignment of fragment integer outputs on GLSL (#4369)

* Insert bitcast for assignment of fragment integer outputs on GLSL

* Shader cache version bump
This commit is contained in:
gdkchan 2023-02-05 18:52:57 -03:00 committed by GitHub
parent 780627e7b0
commit 43081c16c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

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 = 4336;
private const uint CodeGenVersion = 4369;
private const string SharedTocFileName = "shared.toc";
private const string SharedDataFileName = "shared.data";

View file

@ -485,6 +485,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
AttributeType type = context.Config.GpuAccessor.QueryAttributeType(location);
return type.ToAggregateType();
}
else if (context.Config.Stage == ShaderStage.Fragment && isAsgDest &&
operand.Value >= AttributeConsts.FragmentOutputColorBase &&
operand.Value < AttributeConsts.FragmentOutputColorEnd)
{
int location = (operand.Value - AttributeConsts.FragmentOutputColorBase) / 16;
AttributeType type = context.Config.GpuAccessor.QueryFragmentOutputType(location);
return type.ToAggregateType();
}
}