ccpr: Unblacklist Mali

Bug: skia:
Change-Id: Ib0428f556d1fc22ffaa476279854847d0efc7747
Reviewed-on: https://skia-review.googlesource.com/96956
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
Chris Dalton 2018-01-19 15:56:07 -07:00 committed by Skia Commit-Bot
parent 36591e5ffe
commit faca00d993
2 changed files with 18 additions and 18 deletions

View File

@ -154,14 +154,14 @@ void GLSLPathProcessor::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
// N[0] is the normal for the edge we are intersecting from the regular bounding box, pointing
// out of the octagon.
v->codeAppendf("float2 refpt = (min(N[0].x, N[0].y) < 0) ? %s.xy : %s.zw;",
v->codeAppendf("float2 refpt = float2[2](%s.xy, %s.zw)[sk_VertexID >> 2];",
proc.getInstanceAttrib(InstanceAttribs::kDevBounds).fName,
proc.getInstanceAttrib(InstanceAttribs::kDevBounds).fName);
v->codeAppendf("refpt += N[0] * %f;", kAABloatRadius); // bloat for AA.
// N[1] is the normal for the edge we are intersecting from the 45-degree bounding box, pointing
// out of the octagon.
v->codeAppendf("float2 refpt45 = (N[1].x < 0) ? %s.xy : %s.zw;",
v->codeAppendf("float2 refpt45 = float2[2](%s.xy, %s.zw)[((sk_VertexID + 1) >> 2) & 1];",
proc.getInstanceAttrib(InstanceAttribs::kDevBounds45).fName,
proc.getInstanceAttrib(InstanceAttribs::kDevBounds45).fName);
v->codeAppendf("refpt45 *= float2x2(.5,.5,-.5,.5);"); // transform back to device space.

View File

@ -325,18 +325,23 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
shaderCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0) ||
ctxInfo.hasExtension("GL_OES_standard_derivatives");
if (ctxInfo.version() >= GR_GL_VER(3,2)) {
shaderCaps->fGeometryShaderSupport = true;
} else if (ctxInfo.hasExtension("GL_EXT_geometry_shader")) {
shaderCaps->fGeometryShaderSupport = true;
shaderCaps->fGeometryShaderExtensionString = "GL_EXT_geometry_shader";
// 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()) {
if (ctxInfo.version() >= GR_GL_VER(3,2)) {
shaderCaps->fGeometryShaderSupport = true;
} else if (ctxInfo.hasExtension("GL_EXT_geometry_shader")) {
shaderCaps->fGeometryShaderSupport = true;
shaderCaps->fGeometryShaderExtensionString = "GL_EXT_geometry_shader";
}
if (shaderCaps->fGeometryShaderSupport && kQualcomm_GrGLDriver == ctxInfo.driver()) {
// Qualcomm driver @103.0 has been observed to crash compiling ccpr geometry
// shaders. @127.0 is the earliest verified driver to not crash.
shaderCaps->fGeometryShaderSupport =
ctxInfo.driverVersion() >= GR_GL_DRIVER_VER(127,0);
}
shaderCaps->fGSInvocationsSupport = shaderCaps->fGeometryShaderSupport;
}
if (shaderCaps->fGeometryShaderSupport && kQualcomm_GrGLDriver == ctxInfo.driver()) {
// Qualcomm driver @103.0 has been observed to crash compiling ccpr geometry shaders.
// @127.0 is the earliest verified driver to not crash.
shaderCaps->fGeometryShaderSupport = ctxInfo.driverVersion() >= GR_GL_DRIVER_VER(127,0);
}
shaderCaps->fGSInvocationsSupport = shaderCaps->fGeometryShaderSupport;
shaderCaps->fIntegerSupport = ctxInfo.version() >= GR_GL_VER(3, 0) &&
ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // We use this value for GLSL ES 3.0.
@ -392,11 +397,6 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
fPreferClientSideDynamicBuffers = true;
}
if (kARM_GrGLVendor == ctxInfo.vendor()) {
// Mali GPUs have rendering issues with CCPR. Blacklisting until we look into workarounds.
fBlacklistCoverageCounting = true;
}
if (!contextOptions.fAvoidStencilBuffers) {
// To reduce surface area, if we avoid stencil buffers, we also disable MSAA.
this->initFSAASupport(contextOptions, ctxInfo, gli);