Merge pull request #10215 from OatmealDome/shader-logic-ops

VideoCommon: Support shader logic ops on Metal (Apple GPUs) and OpenGL ES
This commit is contained in:
JMC47
2021-12-22 16:39:54 -05:00
committed by GitHub
13 changed files with 255 additions and 46 deletions

View File

@ -585,7 +585,9 @@ AbstractPipelineConfig ShaderCache::GetGXPipelineConfig(
config.blending_state = blending_state;
config.framebuffer_state = g_framebuffer_manager->GetEFBFramebufferState();
if (config.blending_state.logicopenable && !g_ActiveConfig.backend_info.bSupportsLogicOp)
// We can use framebuffer fetch to emulate logic ops in the fragment shader.
if (config.blending_state.logicopenable && !g_ActiveConfig.backend_info.bSupportsLogicOp &&
!g_ActiveConfig.backend_info.bSupportsFramebufferFetch)
{
WARN_LOG_FMT(VIDEO,
"Approximating logic op with blending, this will produce incorrect rendering.");