diff options
author | riperiperi <rhy3756547@hotmail.com> | 2022-09-20 22:38:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-20 18:38:48 -0300 |
commit | 4c0eb91d7e6bdbe42ffa6e950e3288f8066de089 (patch) | |
tree | 96b1325134798f4bed03989913e1ba32dae9ffa5 /Ryujinx.Graphics.Vulkan/EnumConversion.cs | |
parent | da75a9a6ea89787c551b20e068a2bed8a8dc4f92 (diff) |
Convert Quads to Triangles in Vulkan (#3715)1.1.278
* Add Index Buffer conversion for quads to Vulkan
Also adds a reusable repeating pattern index buffer to use for non-indexed
draws, and generalizes the conversion cache for buffers.
* Fix some issues
* End render pass before conversion
* Resume transform feedback after we ensure we're in a pass.
* Always generate UInt32 type indices for topology conversion
* No it's not.
* Remove unused code
* Rely on TopologyRemap to convert quads to tris.
* Remove double newline
* Ensure render pass ends before stride or I8 conversion
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/EnumConversion.cs')
-rw-r--r-- | Ryujinx.Graphics.Vulkan/EnumConversion.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Vulkan/EnumConversion.cs b/Ryujinx.Graphics.Vulkan/EnumConversion.cs index ab40cb10..804cd70c 100644 --- a/Ryujinx.Graphics.Vulkan/EnumConversion.cs +++ b/Ryujinx.Graphics.Vulkan/EnumConversion.cs @@ -2,6 +2,7 @@ using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.Shader; using Silk.NET.Vulkan; +using System; namespace Ryujinx.Graphics.Vulkan { @@ -179,8 +180,8 @@ 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.Quads => Silk.NET.Vulkan.PrimitiveTopology.TriangleFan, // Emulated with triangle fans - GAL.PrimitiveTopology.QuadStrip => Silk.NET.Vulkan.PrimitiveTopology.TriangleStrip, // Emulated with triangle strips + 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) }; } |