diff options
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 5 | ||||
-rw-r--r-- | src/gpu/gl/GrGLUtil.cpp | 4 | ||||
-rw-r--r-- | src/gpu/gl/GrGLUtil.h | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index ebfbf6a065..9870a92c14 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -1586,8 +1586,11 @@ void GrGLCaps::initConfigTable(const GrGLContextInfo& ctxInfo, const GrGLInterfa fConfigTable[kAlpha_8_GrPixelConfig].fFormats.fExternalType = GR_GL_UNSIGNED_BYTE; fConfigTable[kAlpha_8_GrPixelConfig].fFormatType = kNormalizedFixedPoint_FormatType; fConfigTable[kAlpha_8_GrPixelConfig].fFlags = ConfigInfo::kTextureable_Flag; - if (this->textureRedSupport() || kDesktop_ARB_MSFBOType == this->msFBOType()) { + if (this->textureRedSupport() || + (kDesktop_ARB_MSFBOType == this->msFBOType() && + ctxInfo.renderer() != kOSMesa_GrGLRenderer)) { // desktop ARB extension/3.0+ supports ALPHA8 as renderable. + // However, osmesa fails if it used even when GL_ARB_framebuffer_object is present. // Core profile removes ALPHA8 support, but we should have chosen R8 in that case. fConfigTable[kAlpha_8_GrPixelConfig].fFlags |= allRenderFlags; } diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp index a8c5425c64..46b58f1d76 100644 --- a/src/gpu/gl/GrGLUtil.cpp +++ b/src/gpu/gl/GrGLUtil.cpp @@ -127,7 +127,6 @@ void GrGLGetDriverInfo(GrGLStandard standard, } return; } - int n = sscanf(versionString, "%d.%d Mesa %d.%d", &major, &minor, &driverMajor, &driverMinor); if (4 == n) { @@ -304,6 +303,9 @@ GrGLRenderer GrGLGetRendererFromString(const char* rendererString) { } } } + if (strcmp("Mesa Offscreen", rendererString)) { + return kOSMesa_GrGLRenderer; + } } return kOther_GrGLRenderer; } diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h index 2f023f97bb..c30ee93689 100644 --- a/src/gpu/gl/GrGLUtil.h +++ b/src/gpu/gl/GrGLUtil.h @@ -51,6 +51,7 @@ enum GrGLRenderer { kPowerVRRogue_GrGLRenderer, kAdreno3xx_GrGLRenderer, kAdreno4xx_GrGLRenderer, + kOSMesa_GrGLRenderer, kOther_GrGLRenderer }; |