diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2024-05-23 01:05:32 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-23 01:05:32 -0300 |
| commit | e65effcb05c40247fb717b3c2409abce7ffa10fc (patch) | |
| tree | bd25b74ac762aebf1e30b12ed366bdc69e9f8e89 /src/Ryujinx.Graphics.Vulkan/PipelineState.cs | |
| parent | c1ed1509493cdf69b39fddc1ae8b2f3d877adec6 (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/PipelineState.cs')
| -rw-r--r-- | src/Ryujinx.Graphics.Vulkan/PipelineState.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineState.cs b/src/Ryujinx.Graphics.Vulkan/PipelineState.cs index 49c12b37..21160858 100644 --- a/src/Ryujinx.Graphics.Vulkan/PipelineState.cs +++ b/src/Ryujinx.Graphics.Vulkan/PipelineState.cs @@ -560,10 +560,14 @@ namespace Ryujinx.Graphics.Vulkan } } + // AMD has a bug where it enables logical operations even for float formats, + // so we need to force disable them here. + bool logicOpEnable = LogicOpEnable && (gd.Vendor != Vendor.Amd || Internal.LogicOpsAllowed); + var colorBlendState = new PipelineColorBlendStateCreateInfo { SType = StructureType.PipelineColorBlendStateCreateInfo, - LogicOpEnable = LogicOpEnable, + LogicOpEnable = logicOpEnable, LogicOp = LogicOp, AttachmentCount = ColorBlendAttachmentStateCount, PAttachments = pColorBlendAttachmentState, |
