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 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-08 10:36:18 +02:00
1 parent b40c8a0197
commit c2ce8d1f2e
1 file changed
+2 -1
+2 -1
View File
@@ -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;