added a missing programBinarySupport check

Bug: skia:
Change-Id: Ib76a683316e420a76ef69dce4182d73b5e0ee28a
Reviewed-on: https://skia-review.googlesource.com/68214
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
Ethan Nicholas 2017-11-07 16:10:51 -05:00 committed by Skia Commit-Bot
parent bbfd5161ed
commit 4e001d898a

View File

@ -135,7 +135,8 @@ GrGLProgram* GrGLProgramBuilder::finalize() {
return nullptr; 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)); GL_CALL(ProgramParameteri(programID, GR_GL_PROGRAM_BINARY_RETRIEVABLE_HINT, GR_GL_TRUE));
} }