Check link status for copy/mipmap programs
GrGLGpu's semi-hardcoded programs for copying textures as a draw, or
generating mipmap levels with draws assumed that the programs would link
successfully. Relatedly, the creation code assumed that the shader
compilations would be successful.
This updates their logic to check that the shaders compiled, and to
check link status if the GL caps are set to not skip error checking.
Link errors are now sent to the error handler so that the SkSL and
GLSL can be reported when there is a link failure. The expectation is
that these programs are simple enough that they *should* always compile
but we've seen devices in the wild that fail to link unexpectedly.
Bug: chromium:1395777
Change-Id: If5b3a5f62048b971280731ea876a6e814a9fda89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/625422
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
5 files changed