Re-enable QCOM_tiled_rendering, but check for gl functions

This enables tiled rendering when the extension is
reported AND the "optional" start and end tiling
gl functions were found.

Hopefully this will correct the hard crashes on the
Pixel 2XL waterfall bots, while still properly disabling
tiled rendering for the devices found in the Flutter bugs:

Bug: flutter:47164, flutter:47804
Change-Id: Ia96a89053305378d434304b7b4fbc0f5e49cd97e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264695
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This commit is contained in:
Michael Ludwig 2020-01-16 14:25:55 -05:00 committed by Skia Commit-Bot
parent b147aceed7
commit 1321a3d1e2
2 changed files with 17 additions and 6 deletions

View File

@ -697,11 +697,9 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
fSamplerObjectSupport = version >= GR_GL_VER(2,0);
}
// https://github.com/flutter/flutter/issues/47164
// https://github.com/flutter/flutter/issues/47804
// if (GR_IS_GR_GL_ES(standard)) {
// fTiledRenderingSupport = ctxInfo.hasExtension("GL_QCOM_tiled_rendering");
// }
if (GR_IS_GR_GL_ES(standard)) {
fTiledRenderingSupport = ctxInfo.hasExtension("GL_QCOM_tiled_rendering");
}
if (kARM_GrGLVendor == ctxInfo.vendor()) {
fShouldCollapseSrcOverToSrcWhenAble = true;
@ -710,7 +708,7 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
FormatWorkarounds formatWorkarounds;
if (!contextOptions.fDisableDriverCorrectnessWorkarounds) {
this->applyDriverCorrectnessWorkarounds(ctxInfo, contextOptions, shaderCaps,
this->applyDriverCorrectnessWorkarounds(ctxInfo, contextOptions, gli, shaderCaps,
&formatWorkarounds);
}
@ -3284,6 +3282,7 @@ GrCaps::DstCopyRestrictions GrGLCaps::getDstCopyRestrictions(const GrRenderTarge
void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
const GrContextOptions& contextOptions,
const GrGLInterface* glInterface,
GrShaderCaps* shaderCaps,
FormatWorkarounds* formatWorkarounds) {
// A driver but on the nexus 6 causes incorrect dst copies when invalidate is called beforehand.
@ -3813,6 +3812,17 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
if (kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) {
fTiledRenderingSupport = false;
}
// https://github.com/flutter/flutter/issues/47164
// https://github.com/flutter/flutter/issues/47804
if (fTiledRenderingSupport && (!glInterface->fFunctions.fStartTiling ||
!glInterface->fFunctions.fEndTiling)) {
// Some devices expose the QCOM tiled memory extension string but don't actually provide the
// start and end tiling functions (see above flutter bugs). To work around this, the funcs
// are marked optional in the interface generator, but we turn off the tiled rendering cap
// if they aren't provided. This disabling is in driver workarounds so that SKQP will still
// fail on devices that advertise the extension w/o the functions.
fTiledRenderingSupport = false;
}
if (kQualcomm_GrGLVendor == ctxInfo.vendor() || kATI_GrGLVendor == ctxInfo.vendor()) {
// The sample mask round rect op draws nothing on several Adreno and Radeon bots. Other ops

View File

@ -456,6 +456,7 @@ private:
};
void applyDriverCorrectnessWorkarounds(const GrGLContextInfo&, const GrContextOptions&,
const GrGLInterface*,
GrShaderCaps*, FormatWorkarounds*);
void onApplyOptionsOverrides(const GrContextOptions& options) override;