Enable Vertex Input Binding Stride extended state when available on newer MVK

This commit is contained in:
sunshineinabox 2024-09-09 11:02:07 -07:00
parent 381abda2c8
commit 2a3069d9a1
3 changed files with 7 additions and 3 deletions

View file

@ -632,9 +632,10 @@ namespace Ryujinx.Graphics.Vulkan
if (_supportsExtDynamicState) if (_supportsExtDynamicState)
{ {
if (!isMoltenVk) if (gd.SupportsMTL31 || gd.IsMoltenVk)
{ {
//Requires Metal 3.1 and new MoltenVK //Requires Metal 3.1 and new MoltenVK however extended dynamic states extension is not
//available on older verrsion of MVK so we can safely check only OS version
dynamicStates[dynamicStatesCount++] = DynamicState.VertexInputBindingStrideExt; dynamicStates[dynamicStatesCount++] = DynamicState.VertexInputBindingStrideExt;
} }
dynamicStates[0] = DynamicState.ViewportWithCountExt; dynamicStates[0] = DynamicState.ViewportWithCountExt;

View file

@ -51,7 +51,7 @@ namespace Ryujinx.Graphics.Vulkan
{ {
if (_count != 0) if (_count != 0)
{ {
if (_gd.Capabilities.SupportsExtendedDynamicState && !_gd.IsMoltenVk) if (_gd.Capabilities.SupportsExtendedDynamicState && (_gd.SupportsMTL31 || !_gd.IsMoltenVk))
{ {
_gd.ExtendedDynamicStateApi.CmdBindVertexBuffers2( _gd.ExtendedDynamicStateApi.CmdBindVertexBuffers2(
cbs.CommandBuffer, cbs.CommandBuffer,

View file

@ -91,6 +91,7 @@ namespace Ryujinx.Graphics.Vulkan
internal bool IsIntelArc { get; private set; } internal bool IsIntelArc { get; private set; }
internal bool IsQualcommProprietary { get; private set; } internal bool IsQualcommProprietary { get; private set; }
internal bool IsMoltenVk { get; private set; } internal bool IsMoltenVk { get; private set; }
internal bool SupportsMTL31 { get; private set; }
internal bool IsTBDR { get; private set; } internal bool IsTBDR { get; private set; }
internal bool IsSharedMemory { get; private set; } internal bool IsSharedMemory { get; private set; }
@ -119,6 +120,8 @@ namespace Ryujinx.Graphics.Vulkan
// Any device running on MacOS is using MoltenVK, even Intel and AMD vendors. // Any device running on MacOS is using MoltenVK, even Intel and AMD vendors.
IsMoltenVk = true; IsMoltenVk = true;
SupportsMTL31 = OperatingSystem.IsMacOSVersionAtLeast(14);
} }
} }