Revert "switched from NUM_SHADER_BINARY_FORMATS to NUM_PROGRAM_BINARY_FORMATS"

This reverts commit 8fe31406e9.

Reason for revert: ToT master Android is broken starting with ab/4882993, which is the first build with this change (previous build ab/4882954 works fine). The device booted and worked initially, but after the first reboot all drawing is mangled or missing.It seems there is a problem with loading cached shaders.

Original change's description:
> switched from NUM_SHADER_BINARY_FORMATS to NUM_PROGRAM_BINARY_FORMATS
> 
> Bug: b/110175245
> Change-Id: I6b843bc1e3c36bc32531705fc661788d4eef6d35
> Reviewed-on: https://skia-review.googlesource.com/140003
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com

Change-Id: I35d388b3da1e3f421005d7b02ba1e0f0ede0ac84
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/110175245
Reviewed-on: https://skia-review.googlesource.com/140280
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
This commit is contained in:
Stan Iliev 2018-07-10 15:42:44 +00:00 committed by Skia Commit-Bot
parent 76cf60c06b
commit 1d784ceafa
2 changed files with 2 additions and 4 deletions

View File

@ -600,7 +600,7 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
}
if (fProgramBinarySupport) {
GrGLint count;
GR_GL_GetIntegerv(gli, GR_GL_NUM_PROGRAM_BINARY_FORMATS, &count);
GR_GL_GetIntegerv(gli, GR_GL_NUM_SHADER_BINARY_FORMATS, &count);
fProgramBinarySupport = count > 0;
}

View File

@ -559,6 +559,7 @@
#define GR_GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
#define GR_GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE 0x8F63
#define GR_GL_SHADER_BINARY_FORMATS 0x8DF8
#define GR_GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
/* StencilFunction */
#define GR_GL_NEVER 0x0200
@ -851,9 +852,6 @@
#define GR_GL_SHADER_BINARY_FORMATS 0x8DF8
#define GR_GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
/* Program Binary */
#define GR_GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
/* Shader Precision-Specified Types */
#define GR_GL_LOW_FLOAT 0x8DF0
#define GR_GL_MEDIUM_FLOAT 0x8DF1