Index: src/gpu/gl/GrGLInterface.cpp |
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp |
index d15b4cc48bf5530672d49a9b3c3a51243aa46d12..7e557da4f5f98853ccf7a1ac5f7b269ef10c9894 100644 |
--- a/src/gpu/gl/GrGLInterface.cpp |
+++ b/src/gpu/gl/GrGLInterface.cpp |
@@ -336,25 +336,45 @@ bool GrGLInterface::validate(GrGLBinding binding) const { |
} |
} |
} else { |
+#if GR_GL_IGNORE_ES3_MSAA |
if (extensions.has("GL_CHROMIUM_framebuffer_multisample")) { |
if (NULL == fRenderbufferStorageMultisample || |
NULL == fBlitFramebuffer) { |
return false; |
} |
+ } else if (extensions.has("GL_APPLE_framebuffer_multisample")) { |
+ if (NULL == fRenderbufferStorageMultisample || |
+ NULL == fResolveMultisampleFramebuffer) { |
+ return false; |
+ } |
+ } else if (extensions.has("GL_IMG_multisampled_render_to_texture") || |
+ extensions.has("GL_EXT_multisampled_render_to_texture")) { |
+ if (NULL == fRenderbufferStorageMultisample || |
+ NULL == fFramebufferTexture2DMultisample) { |
+ return false; |
+ } |
} |
- if (extensions.has("GL_APPLE_framebuffer_multisample")) { |
+#else |
+ if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_CHROMIUM_framebuffer_multisample")) { |
if (NULL == fRenderbufferStorageMultisample || |
+ NULL == fBlitFramebuffer) { |
+ return false; |
+ } |
+ } |
+ if (extensions.has("GL_APPLE_framebuffer_multisample")) { |
+ if (NULL == fRenderbufferStorageMultisampleES2APPLE || |
NULL == fResolveMultisampleFramebuffer) { |
return false; |
} |
} |
if (extensions.has("GL_IMG_multisampled_render_to_texture") || |
extensions.has("GL_EXT_multisampled_render_to_texture")) { |
- if (NULL == fRenderbufferStorageMultisample || |
+ if (NULL == fRenderbufferStorageMultisampleES2EXT || |
NULL == fFramebufferTexture2DMultisample) { |
return false; |
} |
} |
+#endif |
} |
// On ES buffer mapping is an extension. On Desktop |