mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-21 16:43:35 +00:00
Geometry Shader index count from ThreadsPerInputPrimitive
Generally fixes SPIR-V emitting too many triangles, may change games in OpenGL
This commit is contained in:
parent
8097480b02
commit
c3951877f7
2 changed files with 2 additions and 2 deletions
|
@ -130,7 +130,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
||||||
InputTopology inputTopology = context.Config.GpuAccessor.QueryPrimitiveTopology();
|
InputTopology inputTopology = context.Config.GpuAccessor.QueryPrimitiveTopology();
|
||||||
string inPrimitive = inputTopology.ToGlslString();
|
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())
|
if (context.Config.GpPassthrough && context.Config.GpuAccessor.QueryHostSupportsGeometryShaderPassthrough())
|
||||||
{
|
{
|
||||||
|
|
|
@ -220,7 +220,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
break;
|
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
|
context.AddExecutionMode(spvFunc, context.Config.OutputTopology switch
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue