From 6799939b0a167452c4f0f044b91c2327caec16b4 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Wed, 31 May 2017 16:19:34 -0400 Subject: 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 Commit-Queue: Brian Osman --- src/gpu/gl/GrGLCaps.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3