Implement geometry shader passthrough (#1961)

* Implement geometry shader passthrough

* Cache version change
This commit is contained in:
gdkchan 2021-01-29 00:38:51 -03:00 committed by GitHub
parent 9c2f851d39
commit f93089a64f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 18 deletions

View file

@ -6,6 +6,8 @@ namespace Ryujinx.Graphics.Shader.Translation
{
public ShaderStage Stage { get; }
public bool GpPassthrough { get; }
public OutputTopology OutputTopology { get; }
public int MaxOutputVertices { get; }
@ -33,6 +35,7 @@ namespace Ryujinx.Graphics.Shader.Translation
public ShaderConfig(IGpuAccessor gpuAccessor, TranslationFlags flags, TranslationCounts counts)
{
Stage = ShaderStage.Compute;
GpPassthrough = false;
OutputTopology = OutputTopology.PointList;
MaxOutputVertices = 0;
LocalMemorySize = 0;
@ -51,6 +54,7 @@ namespace Ryujinx.Graphics.Shader.Translation
public ShaderConfig(ShaderHeader header, IGpuAccessor gpuAccessor, TranslationFlags flags, TranslationCounts counts)
{
Stage = header.Stage;
GpPassthrough = header.Stage == ShaderStage.Geometry && header.GpPassthrough;
OutputTopology = header.OutputTopology;
MaxOutputVertices = header.MaxOutputVertexCount;
LocalMemorySize = header.ShaderLocalMemoryLowSize + header.ShaderLocalMemoryHighSize;