Precise Float Fixes

Fixes artifacts in TOTK
This commit is contained in:
Isaac Marovitz
2024-08-01 15:51:06 +01:00
committed by Isaac Marovitz
parent 3360740250
commit 8fa8f3a390
12 changed files with 52 additions and 5 deletions

View File

@@ -14,5 +14,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
SwizzleAdd = 1 << 10,
FSI = 1 << 11,
Precise = 1 << 13
}
}

View File

@@ -18,9 +18,10 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
ShaderDefinitions definitions,
ResourceManager resourceManager,
TargetLanguage targetLanguage,
bool precise,
bool debugMode)
{
StructuredProgramContext context = new(attributeUsage, definitions, resourceManager, debugMode);
StructuredProgramContext context = new(attributeUsage, definitions, resourceManager, precise, debugMode);
for (int funcIndex = 0; funcIndex < functions.Count; funcIndex++)
{

View File

@@ -36,9 +36,10 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
AttributeUsage attributeUsage,
ShaderDefinitions definitions,
ResourceManager resourceManager,
bool precise,
bool debugMode)
{
Info = new StructuredProgramInfo();
Info = new StructuredProgramInfo(precise);
Definitions = definitions;
ResourceManager = resourceManager;

View File

@@ -10,11 +10,16 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
public HelperFunctionsMask HelperFunctionsMask { get; set; }
public StructuredProgramInfo()
public StructuredProgramInfo(bool precise)
{
Functions = new List<StructuredFunction>();
IoDefinitions = new HashSet<IoDefinition>();
if (precise)
{
HelperFunctionsMask |= HelperFunctionsMask.Precise;
}
}
}
}