diff options
author | gdkchan <gab.dark.100@gmail.com> | 2023-01-26 18:34:35 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-26 18:34:35 -0300 |
commit | 296c4a3d012b1203b1b7e58cdc34c334159e1599 (patch) | |
tree | 837659e6401356fac77a93681e3c678724074acf /Ryujinx.Graphics.Vulkan/PipelineConverter.cs | |
parent | e7cf4e6eaf528aa72e27f6ba86259c00813bc776 (diff) |
Relax Vulkan requirements (#4282)1.1.596
* Relax Vulkan requirements
* Fix MaxColorAttachmentIndex
* Fix ColorBlendAttachmentStateCount value mismatch for background pipelines
* Change query capability check to check for pipeline statistics query rather than geometry shader support
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/PipelineConverter.cs')
-rw-r--r-- | Ryujinx.Graphics.Vulkan/PipelineConverter.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Ryujinx.Graphics.Vulkan/PipelineConverter.cs b/Ryujinx.Graphics.Vulkan/PipelineConverter.cs index 3e85ec36..26d34e54 100644 --- a/Ryujinx.Graphics.Vulkan/PipelineConverter.cs +++ b/Ryujinx.Graphics.Vulkan/PipelineConverter.cs @@ -27,14 +27,11 @@ namespace Ryujinx.Graphics.Vulkan int attachmentCount = 0; int colorCount = 0; - int maxColorAttachmentIndex = 0; for (int i = 0; i < state.AttachmentEnable.Length; i++) { if (state.AttachmentEnable[i]) { - maxColorAttachmentIndex = i; - attachmentFormats[attachmentCount] = gd.FormatCapabilities.ConvertToVkFormat(state.AttachmentFormats[i]); attachmentIndices[attachmentCount++] = i; @@ -270,7 +267,7 @@ namespace Ryujinx.Graphics.Vulkan // NOTE: Viewports, Scissors are dynamic. - for (int i = 0; i < 8; i++) + for (int i = 0; i < Constants.MaxRenderTargets; i++) { var blend = state.BlendDescriptors[i]; @@ -293,21 +290,24 @@ namespace Ryujinx.Graphics.Vulkan } } - int maxAttachmentIndex = 0; - for (int i = 0; i < 8; i++) + int attachmentCount = 0; + int maxColorAttachmentIndex = -1; + + for (int i = 0; i < Constants.MaxRenderTargets; i++) { if (state.AttachmentEnable[i]) { - pipeline.Internal.AttachmentFormats[maxAttachmentIndex++] = gd.FormatCapabilities.ConvertToVkFormat(state.AttachmentFormats[i]); + pipeline.Internal.AttachmentFormats[attachmentCount++] = gd.FormatCapabilities.ConvertToVkFormat(state.AttachmentFormats[i]); + maxColorAttachmentIndex = i; } } if (state.DepthStencilEnable) { - pipeline.Internal.AttachmentFormats[maxAttachmentIndex++] = gd.FormatCapabilities.ConvertToVkFormat(state.DepthStencilFormat); + pipeline.Internal.AttachmentFormats[attachmentCount++] = gd.FormatCapabilities.ConvertToVkFormat(state.DepthStencilFormat); } - pipeline.ColorBlendAttachmentStateCount = 8; + pipeline.ColorBlendAttachmentStateCount = (uint)(maxColorAttachmentIndex + 1); pipeline.VertexAttributeDescriptionsCount = (uint)Math.Min(Constants.MaxVertexAttributes, state.VertexAttribCount); return pipeline; |