diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 487fe57b01..5cb23427c5 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -329,9 +329,13 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, shaderCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_OES_standard_derivatives"); - // Mali has support for geometry shaders, but in practice with ccpr they are slower than the - // backup impl that only uses vertex shaders. - if (kARM_GrGLVendor != ctxInfo.vendor()) { + // Mali and early Adreno both have support for geometry shaders, but they appear to be + // implemented in software. In practice with ccpr, they are slower than the backup impl that + // only uses vertex shaders. + if (kARM_GrGLVendor != ctxInfo.vendor() && + kAdreno3xx_GrGLRenderer != ctxInfo.renderer() && + kAdreno4xx_other_GrGLRenderer != ctxInfo.renderer()) { + if (ctxInfo.version() >= GR_GL_VER(3,2)) { shaderCaps->fGeometryShaderSupport = true; } else if (ctxInfo.hasExtension("GL_EXT_geometry_shader")) { @@ -1356,7 +1360,9 @@ void GrGLCaps::initConfigTable(const GrContextOptions& contextOptions, // NexusPlayer has strange bugs with sRGB (skbug.com/4148). This is a targeted fix to // blacklist that device (and any others that might be sharing the same driver). disableSRGBForX86PowerVR = isX86PowerVR; - disableSRGBWriteControlForAdreno4xx = kAdreno4xx_GrGLRenderer == ctxInfo.renderer(); + disableSRGBWriteControlForAdreno4xx = + (kAdreno430_GrGLRenderer == ctxInfo.renderer() || + kAdreno4xx_other_GrGLRenderer == ctxInfo.renderer()); // Angle with es2->GL has a bug where it will hang trying to call TexSubImage on GL_R8 // formats on miplevels > 0. We already disable texturing on gles > 2.0 so just need to @@ -2337,7 +2343,8 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo, GrShaderCaps* shaderCaps) { // A driver but on the nexus 6 causes incorrect dst copies when invalidate is called beforehand. // Thus we are blacklisting this extension for now on Adreno4xx devices. - if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer() || + if (kAdreno430_GrGLRenderer == ctxInfo.renderer() || + kAdreno4xx_other_GrGLRenderer == ctxInfo.renderer() || fDriverBugWorkarounds.disable_discard_framebuffer) { fDiscardRenderTargetSupport = false; fInvalidateFBType = kNone_InvalidateFBType; @@ -2441,7 +2448,8 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo, fUseDrawToClearColor = true; } - if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) { + if (kAdreno430_GrGLRenderer == ctxInfo.renderer() || + kAdreno4xx_other_GrGLRenderer == ctxInfo.renderer()) { // This is known to be fixed sometime between driver 145.0 and 219.0 if (ctxInfo.driverVersion() <= GR_GL_DRIVER_VER(219, 0, 0)) { fUseDrawToClearStencilClip = true; @@ -2620,7 +2628,8 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo, // Disabling advanced blend on various platforms with major known issues. We also block Chrome // for now until its own blacklists can be updated. - if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer() || + if (kAdreno430_GrGLRenderer == ctxInfo.renderer() || + kAdreno4xx_other_GrGLRenderer == ctxInfo.renderer() || kAdreno5xx_GrGLRenderer == ctxInfo.renderer() || kIntel_GrGLDriver == ctxInfo.driver() || kChromium_GrGLDriver == ctxInfo.driver()) { diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp index 0a65f5628a..e785c1e2f6 100644 --- a/src/gpu/gl/GrGLUtil.cpp +++ b/src/gpu/gl/GrGLUtil.cpp @@ -356,7 +356,8 @@ GrGLRenderer GrGLGetRendererFromStrings(const char* rendererString, return kAdreno3xx_GrGLRenderer; } if (adrenoNumber < 500) { - return kAdreno4xx_GrGLRenderer; + return adrenoNumber >= 430 + ? kAdreno430_GrGLRenderer : kAdreno4xx_other_GrGLRenderer; } if (adrenoNumber < 600) { return kAdreno5xx_GrGLRenderer; diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h index 2658139239..039c1eea78 100644 --- a/src/gpu/gl/GrGLUtil.h +++ b/src/gpu/gl/GrGLUtil.h @@ -54,7 +54,8 @@ enum GrGLRenderer { kPowerVR54x_GrGLRenderer, kPowerVRRogue_GrGLRenderer, kAdreno3xx_GrGLRenderer, - kAdreno4xx_GrGLRenderer, + kAdreno430_GrGLRenderer, + kAdreno4xx_other_GrGLRenderer, kAdreno5xx_GrGLRenderer, kOSMesa_GrGLRenderer, kGoogleSwiftShader_GrGLRenderer,