From 6f67278428017b7186874a1c40c6186779dbf109 Mon Sep 17 00:00:00 2001 From: John Stiles Date: Wed, 31 Mar 2021 13:58:24 -0400 Subject: [PATCH] Enable the inliner on Intel Windows GPUs. Disabling it has caused regressions in some test slides. Example: http://screen/5dpPVnJukBAcyKb Change-Id: If302ffd39cd28215c557bbba444d9c8669dea1c8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391298 Commit-Queue: John Stiles Commit-Queue: Brian Osman Auto-Submit: John Stiles Reviewed-by: Brian Osman --- src/gpu/gl/GrGLCaps.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 8d4351c3bd..6a65317a1e 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -995,6 +995,17 @@ void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli // ANGLE under the hood, so we make an exception for that case. shaderCaps->fEnableSkSLInliner = true; } + +#ifdef SK_BUILD_FOR_WIN + if (ctxInfo.driver() == kIntel_GrGLDriver || + (ctxInfo.driver() == kANGLE_GrGLDriver && + ctxInfo.angleVendor() == GrGLANGLEVendor::kIntel && + ctxInfo.angleBackend() == GrGLANGLEBackend::kOpenGL)) { + // The Intel driver on Windows produces incorrect results on clip_shader test slides when + // the inliner is off. (Example: http://screen/5dpPVnJukBAcyKb) + shaderCaps->fEnableSkSLInliner = true; + } +#endif } void GrGLCaps::initFSAASupport(const GrContextOptions& contextOptions,