Disable advanced blend equations on Imagination driver 1.10 and earlier
Causes shader compilation to fail in Programs test on Tecno Spark 3 Pro. Hopefully this doesn't affect performance as this GPU has framebuffer fetch support. Also reduce the effect depth limit in ProgramsTest. Change-Id: I1fa5b8a670b3a074808cdba09c2ac97492067d33 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261192 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
8f259a0329
commit
9c4ee9c79a
@ -3607,6 +3607,20 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
|
||||
shaderCaps->fAdvBlendEqInteraction = GrShaderCaps::kNotSupported_AdvBlendEqInteraction;
|
||||
}
|
||||
|
||||
// Advanced blending can cause shader compilation to fail with message
|
||||
// "Interface block type in this shader".
|
||||
// on some shaders that use advanced blending on the line:
|
||||
// "layout (blend_support_all_equations) out;"
|
||||
// It has been triggered multiple times in the random Programs test, particularly on longer
|
||||
// shaders. This was seen on a Tecno Spark 3 Pro with a PowerVR Rogue GE8300 running Android P
|
||||
// driver version "1.10@5130912". It's unknown if it is fixed on later driver versions.
|
||||
if (ctxInfo.vendor() == kImagination_GrGLVendor &&
|
||||
ctxInfo.driverVersion() < GR_GL_DRIVER_VER(1, 11, 0) &&
|
||||
fBlendEquationSupport != kBasic_BlendEquationSupport) {
|
||||
fBlendEquationSupport = kBasic_BlendEquationSupport;
|
||||
shaderCaps->fAdvBlendEqInteraction = GrShaderCaps::kNotSupported_AdvBlendEqInteraction;
|
||||
}
|
||||
|
||||
if (fDriverBugWorkarounds.disable_blend_equation_advanced) {
|
||||
fBlendEquationSupport = kBasic_BlendEquationSupport;
|
||||
shaderCaps->fAdvBlendEqInteraction = GrShaderCaps::kNotSupported_AdvBlendEqInteraction;
|
||||
|
@ -130,12 +130,12 @@ void GrGLGetDriverInfo(GrGLStandard standard,
|
||||
}
|
||||
|
||||
if (GR_IS_GR_GL(standard)) {
|
||||
if (kNVIDIA_GrGLVendor == vendor) {
|
||||
if (vendor == kNVIDIA_GrGLVendor) {
|
||||
*outDriver = kNVIDIA_GrGLDriver;
|
||||
int n = sscanf(versionString, "%d.%d.%d NVIDIA %d.%d",
|
||||
&major, &minor, &rev, &driverMajor, &driverMinor);
|
||||
// Some older NVIDIA drivers don't report the driver version.
|
||||
if (5 == n) {
|
||||
if (n == 5) {
|
||||
*outVersion = GR_GL_DRIVER_VER(driverMajor, driverMinor, 0);
|
||||
}
|
||||
return;
|
||||
@ -146,18 +146,18 @@ void GrGLGetDriverInfo(GrGLStandard standard,
|
||||
n = sscanf(versionString, "%d.%d (Core Profile) Mesa %d.%d",
|
||||
&major, &minor, &driverMajor, &driverMinor);
|
||||
}
|
||||
if (4 == n) {
|
||||
if (n == 4) {
|
||||
*outDriver = kMesa_GrGLDriver;
|
||||
*outVersion = GR_GL_DRIVER_VER(driverMajor, driverMinor, 0);
|
||||
return;
|
||||
}
|
||||
} else if (GR_IS_GR_GL_ES(standard)) {
|
||||
if (kNVIDIA_GrGLVendor == vendor) {
|
||||
if (vendor == kNVIDIA_GrGLVendor) {
|
||||
*outDriver = kNVIDIA_GrGLDriver;
|
||||
int n = sscanf(versionString, "OpenGL ES %d.%d NVIDIA %d.%d",
|
||||
&major, &minor, &driverMajor, &driverMinor);
|
||||
// Some older NVIDIA drivers don't report the driver version.
|
||||
if (4 == n) {
|
||||
if (n == 4) {
|
||||
*outVersion = GR_GL_DRIVER_VER(driverMajor, driverMinor, 0);
|
||||
}
|
||||
return;
|
||||
@ -165,7 +165,7 @@ void GrGLGetDriverInfo(GrGLStandard standard,
|
||||
|
||||
int n = sscanf(versionString, "OpenGL ES %d.%d Mesa %d.%d",
|
||||
&major, &minor, &driverMajor, &driverMinor);
|
||||
if (4 == n) {
|
||||
if (n == 4) {
|
||||
*outDriver = kMesa_GrGLDriver;
|
||||
*outVersion = GR_GL_DRIVER_VER(driverMajor, driverMinor, 0);
|
||||
return;
|
||||
@ -174,14 +174,14 @@ void GrGLGetDriverInfo(GrGLStandard standard,
|
||||
*outDriver = kANGLE_GrGLDriver;
|
||||
n = sscanf(versionString, "OpenGL ES %d.%d (ANGLE %d.%d", &major, &minor, &driverMajor,
|
||||
&driverMinor);
|
||||
if (4 == n) {
|
||||
if (n == 4) {
|
||||
*outVersion = GR_GL_DRIVER_VER(driverMajor, driverMinor, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (kGoogle_GrGLVendor == vendor) {
|
||||
if (vendor == kGoogle_GrGLVendor) {
|
||||
// Swiftshader is the only Google vendor at the moment
|
||||
*outDriver = kSwiftShader_GrGLDriver;
|
||||
|
||||
@ -190,13 +190,13 @@ void GrGLGetDriverInfo(GrGLStandard standard,
|
||||
// As of writing, version is 4.0.0.6
|
||||
int n = sscanf(versionString, "OpenGL ES %d.%d SwiftShader %d.%d.0.%d", &major, &minor,
|
||||
&driverMajor, &driverMinor, &driverPoint);
|
||||
if (5 == n) {
|
||||
if (n == 5) {
|
||||
*outVersion = GR_GL_DRIVER_VER(driverMajor, driverMinor, driverPoint);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (kIntel_GrGLVendor == vendor) {
|
||||
if (vendor == kIntel_GrGLVendor) {
|
||||
// We presume we're on the Intel driver since it hasn't identified itself as Mesa.
|
||||
*outDriver = kIntel_GrGLDriver;
|
||||
|
||||
@ -204,20 +204,33 @@ void GrGLGetDriverInfo(GrGLStandard standard,
|
||||
// OSes.
|
||||
int n = sscanf(versionString, "%d.%d INTEL-%d.%d.%d", &major, &minor, &driverMajor,
|
||||
&driverMinor, &driverPoint);
|
||||
if (5 == n) {
|
||||
if (n == 5) {
|
||||
*outVersion = GR_GL_DRIVER_VER(driverMajor, driverMinor, driverPoint);
|
||||
}
|
||||
}
|
||||
|
||||
if (kQualcomm_GrGLVendor == vendor) {
|
||||
if (vendor == kQualcomm_GrGLVendor) {
|
||||
*outDriver = kQualcomm_GrGLDriver;
|
||||
int n = sscanf(versionString, "OpenGL ES %d.%d V@%d.%d", &major, &minor, &driverMajor,
|
||||
&driverMinor);
|
||||
if (4 == n) {
|
||||
if (n == 4) {
|
||||
*outVersion = GR_GL_DRIVER_VER(driverMajor, driverMinor, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (vendor == kImagination_GrGLVendor) {
|
||||
int revision;
|
||||
int n = sscanf(versionString, "OpenGL ES %d.%d build %d.%d@%d", &major, &minor,
|
||||
&driverMajor, &driverMinor, &revision);
|
||||
if (n == 5) {
|
||||
// Revision is a large number (looks like a source control revision number) that
|
||||
// doesn't fit into the 'patch' bits, so omit it until we need it.
|
||||
*outVersion = GR_GL_DRIVER_VER(driverMajor, driverMinor, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
static constexpr char kEmulatorPrefix[] = "Android Emulator OpenGL ES Translator";
|
||||
if (0 == strncmp(kEmulatorPrefix, rendererString, strlen(kEmulatorPrefix))) {
|
||||
*outDriver = kAndroidEmulator_GrGLDriver;
|
||||
|
@ -392,6 +392,14 @@ static int get_programs_max_levels(const sk_gpu_test::ContextInfo& ctxInfo) {
|
||||
// On iOS we can exceed the maximum number of varyings. http://skbug.com/6627.
|
||||
#ifdef SK_BUILD_FOR_IOS
|
||||
maxTreeLevels = 2;
|
||||
#endif
|
||||
#ifdef SK_BUILD_FOR_ANDROID
|
||||
GrGLGpu* gpu = static_cast<GrGLGpu*>(ctxInfo.grContext()->priv().getGpu());
|
||||
// Tecno Spark 3 Pro with Power VR Rogue GE8300 will fail shader compiles with
|
||||
// no message if the shader is particularly long.
|
||||
if (gpu->ctxInfo().vendor() == kImagination_GrGLVendor) {
|
||||
maxTreeLevels = 3;
|
||||
}
|
||||
#endif
|
||||
if (ctxInfo.type() == sk_gpu_test::GrContextFactory::kANGLE_D3D9_ES2_ContextType ||
|
||||
ctxInfo.type() == sk_gpu_test::GrContextFactory::kANGLE_D3D11_ES2_ContextType) {
|
||||
|
Loading…
Reference in New Issue
Block a user