Precise Float Fixes
Fixes artifacts in TOTK
This commit is contained in:
committed by
Isaac Marovitz
parent
3360740250
commit
8fa8f3a390
@@ -14,5 +14,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
||||
|
||||
SwizzleAdd = 1 << 10,
|
||||
FSI = 1 << 11,
|
||||
|
||||
Precise = 1 << 13
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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++)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user