aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Vulkan/PipelineBase.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-08-20 16:20:27 -0300
committerGitHub <noreply@github.com>2022-08-20 16:20:27 -0300
commit88a0e720cbe567aff67b6124aa9e6cfc17599739 (patch)
tree8ba359b84ae70da47eb17792369760f8f0db94de /Ryujinx.Graphics.Vulkan/PipelineBase.cs
parent53cc9e0561bcbe7779b12c9e03d93078da2bb2c7 (diff)
Use RGBA16 vertex format if RGB16 is not supported on Vulkan (#3552)1.1.226
* Use RGBA16 vertex format if RGB16 is not supported on Vulkan * Catch all shader compilation exceptions
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/PipelineBase.cs')
-rw-r--r--Ryujinx.Graphics.Vulkan/PipelineBase.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/Ryujinx.Graphics.Vulkan/PipelineBase.cs
index b66124f5..30eeafb8 100644
--- a/Ryujinx.Graphics.Vulkan/PipelineBase.cs
+++ b/Ryujinx.Graphics.Vulkan/PipelineBase.cs
@@ -730,6 +730,8 @@ namespace Ryujinx.Graphics.Vulkan
public void SetVertexAttribs(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs)
{
+ var formatCapabilities = Gd.FormatCapabilities;
+
int count = Math.Min(Constants.MaxVertexAttributes, vertexAttribs.Length);
for (int i = 0; i < count; i++)
@@ -740,7 +742,7 @@ namespace Ryujinx.Graphics.Vulkan
_newState.Internal.VertexAttributeDescriptions[i] = new VertexInputAttributeDescription(
(uint)i,
(uint)bufferIndex,
- FormatTable.GetFormat(attribute.Format),
+ formatCapabilities.ConvertToVertexVkFormat(attribute.Format),
(uint)attribute.Offset);
}