diff options
author | Mary <mary@mary.zone> | 2023-02-15 09:41:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-15 08:41:48 +0000 |
commit | 17078ad929f9942d2b03ede00b30867aeab924de (patch) | |
tree | 172280b47a38ecf7d1ff101d61907a37daa2802e /Ryujinx.Graphics.Vulkan/HardwareCapabilities.cs | |
parent | 32450d45de7889318e0f289fc52b3fffc62edf60 (diff) |
vulkan: Respect VK_KHR_portability_subset vertex stride alignment (#4419)1.1.621
* vulkan: Respect VK_KHR_portability_subset vertex stride alignment
We were hardcoding alignment to 4, but by specs it can be any values that
is a power of 2.
This also enable VK_KHR_portability_subset if present as per specs
requirements.
* address gdkchan's comment
* Make NeedsVertexBufferAlignment internal
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/HardwareCapabilities.cs')
-rw-r--r-- | Ryujinx.Graphics.Vulkan/HardwareCapabilities.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Ryujinx.Graphics.Vulkan/HardwareCapabilities.cs b/Ryujinx.Graphics.Vulkan/HardwareCapabilities.cs index 82fcaea1..1ed2b0cc 100644 --- a/Ryujinx.Graphics.Vulkan/HardwareCapabilities.cs +++ b/Ryujinx.Graphics.Vulkan/HardwareCapabilities.cs @@ -8,11 +8,10 @@ namespace Ryujinx.Graphics.Vulkan { None = 0, - VertexBufferAlignment4B = 1, - NoTriangleFans = 1 << 1, - NoPointMode = 1 << 2, - No3DImageView = 1 << 3, - NoLodBias = 1 << 4 + NoTriangleFans = 1, + NoPointMode = 1 << 1, + No3DImageView = 1 << 2, + NoLodBias = 1 << 3 } readonly struct HardwareCapabilities @@ -40,6 +39,7 @@ namespace Ryujinx.Graphics.Vulkan public readonly ShaderStageFlags RequiredSubgroupSizeStages; public readonly SampleCountFlags SupportedSampleCounts; public readonly PortabilitySubsetFlags PortabilitySubset; + public readonly uint VertexBufferAlignment; public HardwareCapabilities( bool supportsIndexTypeUint8, @@ -64,7 +64,8 @@ namespace Ryujinx.Graphics.Vulkan uint maxSubgroupSize, ShaderStageFlags requiredSubgroupSizeStages, SampleCountFlags supportedSampleCounts, - PortabilitySubsetFlags portabilitySubset) + PortabilitySubsetFlags portabilitySubset, + uint vertexBufferAlignment) { SupportsIndexTypeUint8 = supportsIndexTypeUint8; SupportsCustomBorderColor = supportsCustomBorderColor; @@ -89,6 +90,7 @@ namespace Ryujinx.Graphics.Vulkan RequiredSubgroupSizeStages = requiredSubgroupSizeStages; SupportedSampleCounts = supportedSampleCounts; PortabilitySubset = portabilitySubset; + VertexBufferAlignment = vertexBufferAlignment; } } } |