aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/gpu/gl/GrGLFunctions.h1
-rw-r--r--include/gpu/gl/GrGLInterface.h1
-rw-r--r--src/gpu/gl/GrGLAssembleInterface.cpp2
-rw-r--r--src/gpu/gl/GrGLInterface.cpp9
4 files changed, 13 insertions, 0 deletions
diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h
index 0b7beb601f..3a940583a9 100644
--- a/include/gpu/gl/GrGLFunctions.h
+++ b/include/gpu/gl/GrGLFunctions.h
@@ -140,6 +140,7 @@ extern "C" {
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetRenderbufferParameterivProc)(GrGLenum target, GrGLenum pname, GrGLint* params);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetShaderInfoLogProc)(GrGLuint shader, GrGLsizei bufsize, GrGLsizei* length, char* infolog);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetShaderivProc)(GrGLuint shader, GrGLenum pname, GrGLint* params);
+ typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetShaderPrecisionFormatProc)(GrGLenum shadertype, GrGLenum precisiontype, GrGLint *range, GrGLint *precision);
typedef const GrGLubyte* (GR_GL_FUNCTION_TYPE* GrGLGetStringProc)(GrGLenum name);
typedef const GrGLubyte* (GR_GL_FUNCTION_TYPE* GrGLGetStringiProc)(GrGLenum name, GrGLuint index);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetTexLevelParameterivProc)(GrGLenum target, GrGLint level, GrGLenum pname, GrGLint* params);
diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h
index 5a4b1e77cf..231702d5c5 100644
--- a/include/gpu/gl/GrGLInterface.h
+++ b/include/gpu/gl/GrGLInterface.h
@@ -220,6 +220,7 @@ public:
GLPtr<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv;
GLPtr<GrGLGetShaderInfoLogProc> fGetShaderInfoLog;
GLPtr<GrGLGetShaderivProc> fGetShaderiv;
+ GLPtr<GrGLGetShaderPrecisionFormatProc> fGetShaderPrecisionFormat;
GLPtr<GrGLGetStringProc> fGetString;
GLPtr<GrGLGetStringiProc> fGetStringi;
GLPtr<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv;
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp
index 25f9e161f4..c91da9e6c7 100644
--- a/src/gpu/gl/GrGLAssembleInterface.cpp
+++ b/src/gpu/gl/GrGLAssembleInterface.cpp
@@ -131,6 +131,7 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
GET_PROC(GetShaderiv);
GET_PROC(GetString);
GET_PROC(GetStringi);
+ GET_PROC(GetShaderPrecisionFormat);
GET_PROC(GetTexLevelParameteriv);
GET_PROC(GenQueries);
GET_PROC(GenTextures);
@@ -371,6 +372,7 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) {
GET_PROC(GetProgramInfoLog);
GET_PROC(GetProgramiv);
GET_PROC(GetShaderInfoLog);
+ GET_PROC(GetShaderPrecisionFormat);
GET_PROC(GetShaderiv);
GET_PROC(GetString);
GET_PROC(GetStringi);
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 8054fd5d1e..d4db766bcc 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -461,6 +461,15 @@ bool GrGLInterface::validate() const {
}
}
+ if (kGLES_GrGLStandard == fStandard || glVer >= GR_GL_VER(4,1) ||
+ fExtensions.has("GL_ARB_ES2_compatibility")) {
+#if 0 // Enable this once Chrome gives us the function ptr
+ if (NULL == fFunctions.fGetShaderPrecisionFormat) {
+ RETURN_FALSE_INTERFACE
+ }
+#endif
+ }
+
if (fExtensions.has("GL_NV_path_rendering")) {
if (NULL == fFunctions.fPathCommands ||
NULL == fFunctions.fPathCoords ||