Workaround AMD bug on logic op with float framebuffer (#6852)
* Workaround AMD bug on logic op with float framebuffer * Format whitespace * Update comment
This commit is contained in:
parent
c1ed150949
commit
e65effcb05
6 changed files with 55 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue