diff options
author | riperiperi <rhy3756547@hotmail.com> | 2022-11-28 22:18:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 19:18:22 -0300 |
commit | 1fc0f569de518581761ab2f4b751b0dbaf2cd279 (patch) | |
tree | 69d356c9aa3dfd352f55d78868d855bfb27661bf /Ryujinx.Graphics.Vulkan/EnumConversion.cs | |
parent | dff138229c79483c189be6f3829ed88a5f95575d (diff) |
GPU: Always draw polygon topology as triangle fan (#3932)1.1.395
Polygon topology wasn't really supported and would only work on OpenGL on drivers that haven't removed it. As an alternative, this PR makes all cases of polygon topology use triangle fan. The topology type and transform feedback type have not been changed, as I don't think geo shader/tfb should be used with polygons.
The OpenGL spec states:
Only convex polygons are guaranteed to be drawn correctly by the GL.
For convex polygons, triangle fan is equivalent to polygon. I imagine this is probably how it works on device, as this get-out-of-jail-free card is too enticing to pass up.
This fixes the stat display in Pokemon S/V.
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/EnumConversion.cs')
-rw-r--r-- | Ryujinx.Graphics.Vulkan/EnumConversion.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Vulkan/EnumConversion.cs b/Ryujinx.Graphics.Vulkan/EnumConversion.cs index 804cd70c..9d9be65e 100644 --- a/Ryujinx.Graphics.Vulkan/EnumConversion.cs +++ b/Ryujinx.Graphics.Vulkan/EnumConversion.cs @@ -180,6 +180,7 @@ namespace Ryujinx.Graphics.Vulkan GAL.PrimitiveTopology.TrianglesAdjacency => Silk.NET.Vulkan.PrimitiveTopology.TriangleListWithAdjacency, GAL.PrimitiveTopology.TriangleStripAdjacency => Silk.NET.Vulkan.PrimitiveTopology.TriangleStripWithAdjacency, GAL.PrimitiveTopology.Patches => Silk.NET.Vulkan.PrimitiveTopology.PatchList, + GAL.PrimitiveTopology.Polygon => Silk.NET.Vulkan.PrimitiveTopology.TriangleFan, GAL.PrimitiveTopology.Quads => throw new NotSupportedException("Quad topology is not available in Vulkan."), GAL.PrimitiveTopology.QuadStrip => throw new NotSupportedException("QuadStrip topology is not available in Vulkan."), _ => LogInvalidAndReturn(topology, nameof(GAL.PrimitiveTopology), Silk.NET.Vulkan.PrimitiveTopology.TriangleList) |