Geometry Shader index count from ThreadsPerInputPrimitive

Generally fixes SPIR-V emitting too many triangles, may change games in OpenGL
This commit is contained in:
riperiperi 2022-05-04 23:46:49 +01:00
parent 8097480b02
commit c3951877f7
2 changed files with 2 additions and 2 deletions

View file

@ -130,7 +130,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
InputTopology inputTopology = context.Config.GpuAccessor.QueryPrimitiveTopology();
string inPrimitive = inputTopology.ToGlslString();
context.AppendLine($"layout ({inPrimitive}) in;");
context.AppendLine($"layout (invocations = {context.Config.ThreadsPerInputPrimitive}, {inPrimitive}) in;");
if (context.Config.GpPassthrough && context.Config.GpuAccessor.QueryHostSupportsGeometryShaderPassthrough())
{

View file

@ -220,7 +220,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
break;
}
context.AddExecutionMode(spvFunc, ExecutionMode.Invocations, (SpvLiteralInteger)context.InputVertices);
context.AddExecutionMode(spvFunc, ExecutionMode.Invocations, (SpvLiteralInteger)context.Config.ThreadsPerInputPrimitive);
context.AddExecutionMode(spvFunc, context.Config.OutputTopology switch
{