From 3f0bbb19de678ba85d8e61d7ea2a7efae40dc1a3 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Fri, 20 Jan 2023 16:48:27 -0800 Subject: [PATCH] dzn: Fix independent blend check Memcmp returns 0 on equal, so !memcmp means equal. Fixes: c92729c3 ("dzn: Enable independent blending") Part-of: --- src/microsoft/vulkan/dzn_pipeline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/microsoft/vulkan/dzn_pipeline.c b/src/microsoft/vulkan/dzn_pipeline.c index 7603d0b..17faa50 100644 --- a/src/microsoft/vulkan/dzn_pipeline.c +++ b/src/microsoft/vulkan/dzn_pipeline.c @@ -1563,8 +1563,8 @@ dzn_graphics_pipeline_translate_blend(struct dzn_graphics_pipeline *pipeline, for (uint32_t i = 0; i < in_blend->attachmentCount; i++) { if (i > 0 && - !memcmp(&in_blend->pAttachments[i - 1], &in_blend->pAttachments[i], - sizeof(*in_blend->pAttachments))) + memcmp(&in_blend->pAttachments[i - 1], &in_blend->pAttachments[i], + sizeof(*in_blend->pAttachments)) != 0) desc->IndependentBlendEnable = true; desc->RenderTarget[i].BlendEnable = -- 2.7.4