diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2023-05-28 19:38:04 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-29 00:38:04 +0200 |
| commit | 832a5e885281f6063f7855e92c3cf85eac82e715 (patch) | |
| tree | 027efa0005b63097f7824cb7c91c3c7278f69372 /src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs | |
| parent | 96d1f0da2d10545600d83a88e63cfef9b2785e25 (diff) | |
Make sure blend is disabled if render target has integer format (#5122)
* Make sure blend is disabled if render target has integer format
* Change approach to avoid permanently mutating state
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs')
| -rw-r--r-- | src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs b/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs index da480d9f..79179ce0 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs @@ -294,6 +294,7 @@ namespace Ryujinx.Graphics.Vulkan int attachmentCount = 0; int maxColorAttachmentIndex = -1; + uint attachmentIntegerFormatMask = 0; for (int i = 0; i < Constants.MaxRenderTargets; i++) { @@ -301,6 +302,11 @@ namespace Ryujinx.Graphics.Vulkan { pipeline.Internal.AttachmentFormats[attachmentCount++] = gd.FormatCapabilities.ConvertToVkFormat(state.AttachmentFormats[i]); maxColorAttachmentIndex = i; + + if (state.AttachmentFormats[i].IsInteger()) + { + attachmentIntegerFormatMask |= 1u << i; + } } } @@ -311,6 +317,7 @@ namespace Ryujinx.Graphics.Vulkan pipeline.ColorBlendAttachmentStateCount = (uint)(maxColorAttachmentIndex + 1); pipeline.VertexAttributeDescriptionsCount = (uint)Math.Min(Constants.MaxVertexAttributes, state.VertexAttribCount); + pipeline.Internal.AttachmentIntegerFormatMask = attachmentIntegerFormatMask; return pipeline; } |
