mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-05 03:49:17 +00:00
Workaround undefined behavior in bad dual source blend states
See merge request ryubing/ryujinx!4
This commit is contained in:
@@ -512,13 +512,9 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
||||
if (context.Definitions.Stage == ShaderStage.Fragment && context.Definitions.DualSourceBlend)
|
||||
{
|
||||
IoDefinition firstOutput = outputs.ElementAtOrDefault(0);
|
||||
IoDefinition secondOutput = outputs.ElementAtOrDefault(1);
|
||||
|
||||
if (firstOutput.Location + 1 == secondOutput.Location)
|
||||
{
|
||||
DeclareOutputDualSourceBlendAttribute(context, firstOutput.Location);
|
||||
outputs = outputs.Skip(2);
|
||||
}
|
||||
DeclareOutputDualSourceBlendAttribute(context, firstOutput.Location);
|
||||
outputs = outputs.Skip(2);
|
||||
}
|
||||
|
||||
foreach (IoDefinition ioDefinition in outputs)
|
||||
|
||||
Reference in New Issue
Block a user