ccpr: Blacklist vertex shaders on ANGLE/Skylake
Bug: skia: Change-Id: I9834fd6b819397c52f04bbd20aee5ab03944ebea Reviewed-on: https://skia-review.googlesource.com/96944 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
parent
e3429e62b0
commit
0a94e4cc10
@ -94,7 +94,7 @@ public:
|
||||
GrCCCoverageProcessor(GrResourceProvider* rp, RenderPass pass, const GrShaderCaps& caps)
|
||||
: INHERITED(kGrCCCoverageProcessor_ClassID)
|
||||
, fRenderPass(pass)
|
||||
, fImpl(caps.geometryShaderSupport() ? Impl::kGeometryShader : Impl::kVertexShader) {
|
||||
, fImpl(caps.geometryShaderSupport() ? Impl::kGeometryShader : Impl::kVertexShader) {
|
||||
SkASSERT(DoesRenderPass(pass, caps));
|
||||
if (Impl::kGeometryShader == fImpl) {
|
||||
this->initGS();
|
||||
|
@ -716,6 +716,13 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
|
||||
|
||||
this->applyOptionsOverrides(contextOptions);
|
||||
shaderCaps->applyOptionsOverrides(contextOptions);
|
||||
|
||||
// After applying overrides, check for geometry shader support on ANGLE/Skylake. The ccpr
|
||||
// vertex-shader implementation does not work on this platform.
|
||||
if (kANGLE_GrGLRenderer == ctxInfo.renderer() &&
|
||||
GrGLANGLERenderer::kSkylake == ctxInfo.angleRenderer()) {
|
||||
fBlacklistCoverageCounting = !fShaderCaps->geometryShaderSupport();
|
||||
}
|
||||
}
|
||||
|
||||
const char* get_glsl_version_decl_string(GrGLStandard standard, GrGLSLGeneration generation,
|
||||
|
@ -397,9 +397,37 @@ void GrGLGetANGLEInfoFromString(const char* rendererString, GrGLANGLEBackend* ba
|
||||
}
|
||||
if (strstr(rendererString, "Intel")) {
|
||||
*vendor = GrGLANGLEVendor::kIntel;
|
||||
}
|
||||
if (strstr(rendererString, "HD Graphics 4000") || strstr(rendererString, "HD Graphics 2500")) {
|
||||
*renderer = GrGLANGLERenderer::kIvyBridge;
|
||||
|
||||
const char* modelStr;
|
||||
int modelNumber;
|
||||
if ((modelStr = strstr(rendererString, "HD Graphics")) &&
|
||||
(1 == sscanf(modelStr, "HD Graphics %i", &modelNumber) ||
|
||||
1 == sscanf(modelStr, "HD Graphics P%i", &modelNumber))) {
|
||||
switch (modelNumber) {
|
||||
case 4000:
|
||||
case 2500:
|
||||
*renderer = GrGLANGLERenderer::kIvyBridge;
|
||||
break;
|
||||
case 510:
|
||||
case 515:
|
||||
case 520:
|
||||
case 530:
|
||||
*renderer = GrGLANGLERenderer::kSkylake;
|
||||
break;
|
||||
}
|
||||
} else if ((modelStr = strstr(rendererString, "Iris")) &&
|
||||
(1 == sscanf(modelStr, "Iris(TM) Graphics %i", &modelNumber) ||
|
||||
1 == sscanf(modelStr, "Iris(TM) Pro Graphics %i", &modelNumber) ||
|
||||
1 == sscanf(modelStr, "Iris(TM) Pro Graphics P%i", &modelNumber))) {
|
||||
switch (modelNumber) {
|
||||
case 540:
|
||||
case 550:
|
||||
case 555:
|
||||
case 580:
|
||||
*renderer = GrGLANGLERenderer::kSkylake;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strstr(rendererString, "Direct3D11")) {
|
||||
*backend = GrGLANGLEBackend::kD3D11;
|
||||
|
@ -92,9 +92,10 @@ enum class GrGLANGLEVendor {
|
||||
kIntel
|
||||
};
|
||||
|
||||
enum class GrGLANGLERenderer{
|
||||
enum class GrGLANGLERenderer {
|
||||
kUnknown,
|
||||
kIvyBridge
|
||||
kIvyBridge,
|
||||
kSkylake
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user