Revert "Revert "added a missing programBinarySupport check""

This reverts commit 76e8c7c3ec5584abe5d2c6f25031b7e696d6e064.

Bug: skia:
Change-Id: Iffc8d68caa382b5306af4e814605bbbb3018cdca
Reviewed-on: https://skia-review.googlesource.com/68540
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index c9bc8f8..4bc4202 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -135,7 +135,8 @@
         return nullptr;
     }
 
-    if (this->gpu()->getContext()->getPersistentCache()) {
+    if (this->gpu()->glCaps().programBinarySupport() &&
+        this->gpu()->getContext()->getPersistentCache()) {
         GL_CALL(ProgramParameteri(programID, GR_GL_PROGRAM_BINARY_RETRIEVABLE_HINT, GR_GL_TRUE));
     }