Use vector transform feedback outputs if possible (#3832)

This commit is contained in:
gdkchan 2022-11-12 20:20:40 -03:00 committed by GitHub
parent 51a27032f0
commit 9daf029f35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 180 additions and 82 deletions

View file

@ -10,12 +10,12 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
public StructuredFunction CurrentFunction { get; set; }
public StructuredProgramInfo Info { get; }
public ShaderConfig Config { get; }
public OperandManager OperandManager { get; }
private readonly StructuredProgramInfo _info;
private readonly StringBuilder _sb;
private int _level;
@ -24,7 +24,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
public CodeGenContext(StructuredProgramInfo info, ShaderConfig config)
{
_info = info;
Info = info;
Config = config;
OperandManager = new OperandManager();
@ -72,19 +72,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
public StructuredFunction GetFunction(int id)
{
return _info.Functions[id];
}
public TransformFeedbackOutput GetTransformFeedbackOutput(int location, int component)
{
int index = (AttributeConsts.UserAttributeBase / 4) + location * 4 + component;
return _info.TransformFeedbackOutputs[index];
}
public TransformFeedbackOutput GetTransformFeedbackOutput(int location)
{
int index = location / 4;
return _info.TransformFeedbackOutputs[index];
return Info.Functions[id];
}
private void UpdateIndentation()