Simplify handling of shader vertex A (#1999)

* Simplify handling of shader vertex A

* Theres no transformation feedback, its transform

* Merge TextureHandlesForCache
This commit is contained in:
gdkchan 2021-02-07 20:42:17 -03:00 committed by GitHub
parent 1319eda8b7
commit 4047477866
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 52 additions and 94 deletions

View file

@ -36,22 +36,7 @@ namespace Ryujinx.Graphics.Shader.Translation
return new TranslatorContext(address, cfg, config);
}
public static TranslatorContext CreateContext(
ulong addressA,
ulong addressB,
IGpuAccessor gpuAccessor,
TranslationFlags flags,
TranslationCounts counts = null)
{
counts ??= new TranslationCounts();
Block[][] cfgA = DecodeShader(addressA, gpuAccessor, flags | TranslationFlags.VertexA, counts, out ShaderConfig configA);
Block[][] cfgB = DecodeShader(addressB, gpuAccessor, flags, counts, out ShaderConfig configB);
return new TranslatorContext(addressA, addressB, cfgA, cfgB, configA, configB);
}
internal static ShaderProgram Translate(FunctionCode[] functions, ShaderConfig config, out ShaderProgramInfo shaderProgramInfo, int sizeA = 0)
internal static ShaderProgram Translate(FunctionCode[] functions, ShaderConfig config, out ShaderProgramInfo shaderProgramInfo)
{
var cfgs = new ControlFlowGraph[functions.Length];
var frus = new RegisterUsage.FunctionRegisterUsage[functions.Length];
@ -113,7 +98,7 @@ namespace Ryujinx.Graphics.Shader.Translation
string glslCode = program.Code;
return new ShaderProgram(config.Stage, glslCode, config.Size, sizeA);
return new ShaderProgram(config.Stage, glslCode);
}
private static Block[][] DecodeShader(