Better IPA shader instruction implementation (#1082)
* Fix varying interpolation on fragment shader * Some nits * Alignment
This commit is contained in:
parent
2365ddfc36
commit
e93ca84b14
13 changed files with 97 additions and 89 deletions
|
@ -365,11 +365,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
|||
|
||||
foreach (int attr in info.IAttributes.OrderBy(x => x))
|
||||
{
|
||||
string iq = info.InterpolationQualifiers[attr].ToGlslQualifier();
|
||||
string iq = string.Empty;
|
||||
|
||||
if (iq != string.Empty)
|
||||
if (context.Config.Stage == ShaderStage.Fragment)
|
||||
{
|
||||
iq += " ";
|
||||
iq = context.Config.ImapTypes[attr].GetFirstUsedType() switch
|
||||
{
|
||||
PixelImap.Constant => "flat ",
|
||||
PixelImap.ScreenLinear => "noperspective ",
|
||||
_ => string.Empty
|
||||
};
|
||||
}
|
||||
|
||||
context.AppendLine($"layout (location = {attr}) {iq}in vec4 {DefaultNames.IAttributePrefix}{attr}{suffix};");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue