aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-05-31 16:19:34 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-31 20:52:55 +0000
commit6799939b0a167452c4f0f044b91c2327caec16b4 (patch)
tree5f14d08e51158ee3c27e152ff1df1b686e46a7fa /src
parent1d6163577c8a4f1372208e2c9e03b1a69906d385 (diff)
Blacklist sRGB MSAA on AMD (ATI) Macs
Fixes GrSurfaceTest failure on the trash can BUG=skia: Change-Id: I0def62ea7a2693043f6a359a47a3e9e1177ca84d Reviewed-on: https://skia-review.googlesource.com/18152 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index a39b744574..521e2553f0 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -1642,6 +1642,14 @@ void GrGLCaps::initConfigTable(const GrContextOptions& contextOptions,
fSRGBSupport = false;
}
+ uint32_t srgbRenderFlags = allRenderFlags;
+ // MacPro devices with AMD cards fail to create MSAA sRGB render buffers
+#if defined(SK_BUILD_FOR_MAC)
+ if (kATI_GrGLVendor == ctxInfo.vendor()) {
+ srgbRenderFlags &= ~ConfigInfo::kRenderableWithMSAA_Flag;
+ }
+#endif
+
fConfigTable[kSRGBA_8888_GrPixelConfig].fFormats.fBaseInternalFormat = GR_GL_SRGB_ALPHA;
fConfigTable[kSRGBA_8888_GrPixelConfig].fFormats.fSizedInternalFormat = GR_GL_SRGB8_ALPHA8;
// GL does not do srgb<->rgb conversions when transferring between cpu and gpu. Thus, the
@@ -1652,7 +1660,7 @@ void GrGLCaps::initConfigTable(const GrContextOptions& contextOptions,
fConfigTable[kSRGBA_8888_GrPixelConfig].fFormatType = kNormalizedFixedPoint_FormatType;
if (fSRGBSupport) {
fConfigTable[kSRGBA_8888_GrPixelConfig].fFlags = ConfigInfo::kTextureable_Flag |
- allRenderFlags;
+ srgbRenderFlags;
}
if (texStorageSupported) {
fConfigTable[kSRGBA_8888_GrPixelConfig].fFlags |= ConfigInfo::kCanUseTexStorage_Flag;
@@ -1671,7 +1679,7 @@ void GrGLCaps::initConfigTable(const GrContextOptions& contextOptions,
fConfigTable[kSBGRA_8888_GrPixelConfig].fFormatType = kNormalizedFixedPoint_FormatType;
if (fSRGBSupport && kGL_GrGLStandard == standard) {
fConfigTable[kSBGRA_8888_GrPixelConfig].fFlags = ConfigInfo::kTextureable_Flag |
- allRenderFlags;
+ srgbRenderFlags;
}
if (texStorageSupported) {