| Index: src/gpu/gl/GrGLCaps.cpp
|
| ===================================================================
|
| --- src/gpu/gl/GrGLCaps.cpp (revision 10891)
|
| +++ src/gpu/gl/GrGLCaps.cpp (working copy)
|
| @@ -377,17 +377,21 @@
|
|
|
| fMSFBOType = kNone_MSFBOType;
|
| if (kDesktop_GrGLBinding != ctxInfo.binding()) {
|
| - if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) {
|
| - // chrome's extension is equivalent to the EXT msaa
|
| - // and fbo_blit extensions.
|
| - fMSFBOType = kDesktop_EXT_MSFBOType;
|
| - } else if (ctxInfo.hasExtension("GL_APPLE_framebuffer_multisample")) {
|
| - fMSFBOType = kES_Apple_MSFBOType;
|
| - } else if (ctxInfo.hasExtension("GL_EXT_multisampled_render_to_texture")) {
|
| - fMSFBOType = kES_EXT_MsToTexture_MSFBOType;
|
| - } else if (ctxInfo.hasExtension("GL_IMG_multisampled_render_to_texture")) {
|
| - fMSFBOType = kES_IMG_MsToTexture_MSFBOType;
|
| - }
|
| + // We prefer the EXT/IMG extension over ES3 MSAA because we've observed
|
| + // ES3 driver bugs on at least one device with a tiled GPU (N10).
|
| + if (ctxInfo.hasExtension("GL_EXT_multisampled_render_to_texture")) {
|
| + fMSFBOType = kES_EXT_MsToTexture_MSFBOType;
|
| + } else if (ctxInfo.hasExtension("GL_IMG_multisampled_render_to_texture")) {
|
| + fMSFBOType = kES_IMG_MsToTexture_MSFBOType;
|
| + } else if (!GR_GL_IGNORE_ES3_MSAA && ctxInfo.version() >= GR_GL_VER(3,0)) {
|
| + fMSFBOType = GrGLCaps::kES_3_0_MSFBOType;
|
| + } else if (ctxInfo.hasExtension("GL_CHROMIUM_framebuffer_multisample")) {
|
| + // chrome's extension is equivalent to the EXT msaa
|
| + // and fbo_blit extensions.
|
| + fMSFBOType = kDesktop_EXT_MSFBOType;
|
| + } else if (ctxInfo.hasExtension("GL_APPLE_framebuffer_multisample")) {
|
| + fMSFBOType = kES_Apple_MSFBOType;
|
| + }
|
| } else {
|
| if ((ctxInfo.version() >= GR_GL_VER(3,0)) ||
|
| ctxInfo.hasExtension("GL_ARB_framebuffer_object")) {
|
| @@ -560,6 +564,7 @@
|
| "None",
|
| "ARB",
|
| "EXT",
|
| + "ES 3.0",
|
| "Apple",
|
| "IMG MS To Texture",
|
| "EXT MS To Texture",
|
| @@ -567,9 +572,10 @@
|
| GR_STATIC_ASSERT(0 == kNone_MSFBOType);
|
| GR_STATIC_ASSERT(1 == kDesktop_ARB_MSFBOType);
|
| GR_STATIC_ASSERT(2 == kDesktop_EXT_MSFBOType);
|
| - GR_STATIC_ASSERT(3 == kES_Apple_MSFBOType);
|
| - GR_STATIC_ASSERT(4 == kES_IMG_MsToTexture_MSFBOType);
|
| - GR_STATIC_ASSERT(5 == kES_EXT_MsToTexture_MSFBOType);
|
| + GR_STATIC_ASSERT(3 == kES_3_0_MSFBOType);
|
| + GR_STATIC_ASSERT(4 == kES_Apple_MSFBOType);
|
| + GR_STATIC_ASSERT(5 == kES_IMG_MsToTexture_MSFBOType);
|
| + GR_STATIC_ASSERT(6 == kES_EXT_MsToTexture_MSFBOType);
|
| GR_STATIC_ASSERT(GR_ARRAY_COUNT(kMSFBOExtStr) == kLast_MSFBOType + 1);
|
|
|
| static const char* kFBFetchTypeStr[] = {
|
|
|