From c2ce8d1f2e26338841be03fdf89e45c87fb408e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 8 Oct 2026 10:29:13 +0200 Subject: [PATCH] OpenGL: No hardware logic ops on Apple GPUs Apple's OpenGL runs on Metal, which has no logic ops, and ignores glLogicOp. Emulate them in the shader like MoltenVK does, which fixes OutRun's water (without the BlueToAlpha compat flag) on macOS. Co-Authored-By: Claude Opus 5.5 --- Common/GPU/OpenGL/thin3d_gl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/GPU/OpenGL/thin3d_gl.cpp b/Common/GPU/OpenGL/thin3d_gl.cpp index b1e4f66e68..7ce2faf158 100644 --- a/Common/GPU/OpenGL/thin3d_gl.cpp +++ b/Common/GPU/OpenGL/thin3d_gl.cpp @@ -590,7 +590,8 @@ OpenGLContext::OpenGLContext(bool canChangeSwapInterval) : renderManager_(frameT caps_.fragmentShaderStencilWriteSupported = gl_extensions.ARB_shader_stencil_export; // GLES has no support for logic framebuffer operations. There doesn't even seem to exist any such extensions. - caps_.logicOpSupported = !gl_extensions.IsGLES; + // Apple's OpenGL on Apple GPUs (on top of Metal, which has none either) accepts glLogicOp and ignores it. + caps_.logicOpSupported = !gl_extensions.IsGLES && gl_extensions.gpuVendor != GPU_VENDOR_APPLE; // Always the case in GL (which is what we want for PSP flat shade). caps_.provokingVertexLast = true;