aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-05-23 01:05:32 -0300
committerGitHub <noreply@github.com>2024-05-23 01:05:32 -0300
commite65effcb05c40247fb717b3c2409abce7ffa10fc (patch)
treebd25b74ac762aebf1e30b12ed366bdc69e9f8e89 /src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs
parentc1ed1509493cdf69b39fddc1ae8b2f3d877adec6 (diff)
Workaround AMD bug on logic op with float framebuffer (#6852)
* Workaround AMD bug on logic op with float framebuffer * Format whitespace * Update comment
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs')
-rw-r--r--src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs b/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs
index 95b480a5..41618c73 100644
--- a/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs
+++ b/src/Ryujinx.Graphics.Vulkan/PipelineConverter.cs
@@ -302,6 +302,7 @@ namespace Ryujinx.Graphics.Vulkan
int attachmentCount = 0;
int maxColorAttachmentIndex = -1;
uint attachmentIntegerFormatMask = 0;
+ bool allFormatsFloatOrSrgb = true;
for (int i = 0; i < Constants.MaxRenderTargets; i++)
{
@@ -314,6 +315,8 @@ namespace Ryujinx.Graphics.Vulkan
{
attachmentIntegerFormatMask |= 1u << i;
}
+
+ allFormatsFloatOrSrgb &= state.AttachmentFormats[i].IsFloatOrSrgb();
}
}
@@ -325,6 +328,7 @@ namespace Ryujinx.Graphics.Vulkan
pipeline.ColorBlendAttachmentStateCount = (uint)(maxColorAttachmentIndex + 1);
pipeline.VertexAttributeDescriptionsCount = (uint)Math.Min(Constants.MaxVertexAttributes, state.VertexAttribCount);
pipeline.Internal.AttachmentIntegerFormatMask = attachmentIntegerFormatMask;
+ pipeline.Internal.LogicOpsAllowed = attachmentCount == 0 || !allFormatsFloatOrSrgb;
return pipeline;
}