From ee7c08e147ac001b26242200db7210fcaa640937 Mon Sep 17 00:00:00 2001 From: Exverge Date: Thu, 8 Aug 2024 14:54:38 -0400 Subject: [PATCH] Latte : Temporarily disable blending for integer format color attachments --- .../Renderer/Vulkan/VulkanPipelineCompiler.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanPipelineCompiler.cpp b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanPipelineCompiler.cpp index 5cd29941..e3d91c97 100644 --- a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanPipelineCompiler.cpp +++ b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanPipelineCompiler.cpp @@ -988,8 +988,6 @@ bool PipelineCompiler::Compile(bool forceCompile, bool isRenderThread, bool show pipelineInfo.pDynamicState = &dynamicState; pipelineInfo.pRasterizationState = &rasterizer; pipelineInfo.pMultisampleState = &multisampling; - if (!_IsVkIntegerFormat(m_renderPassObj->GetColorFormat(0))) - pipelineInfo.pColorBlendState = &colorBlending; pipelineInfo.layout = m_pipeline_layout; pipelineInfo.renderPass = m_renderPassObj->m_renderPass; pipelineInfo.pDepthStencilState = &depthStencilState; @@ -998,6 +996,17 @@ bool PipelineCompiler::Compile(bool forceCompile, bool isRenderThread, bool show pipelineInfo.flags = 0; if (!forceCompile) pipelineInfo.flags |= VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT; +#ifdef __APPLE__ + for (int i = 0; i < Latte::GPU_LIMITS::NUM_COLOR_ATTACHMENTS; ++i) + { + if (_IsVkIntegerFormat(m_renderPassObj->GetColorFormat(i))) + break; + if (i == Latte::GPU_LIMITS::NUM_COLOR_ATTACHMENTS - 1) + pipelineInfo.pColorBlendState = &colorBlending; + } +#else + pipelineInfo.pColorBlendState = &colorBlending; +#endif VkPipelineCreationFeedbackCreateInfoEXT creationFeedbackInfo; VkPipelineCreationFeedbackEXT creationFeedback;