| Index: src/gpu/gl/GrGLInterface.cpp
|
| diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
|
| index c09efae2b88bd87007efdcfdda0209fd368d44f2..53911bfcc9f13af1d6e0acff2b0dad1e8ae1b8c7 100644
|
| --- a/src/gpu/gl/GrGLInterface.cpp
|
| +++ b/src/gpu/gl/GrGLInterface.cpp
|
| @@ -216,6 +216,15 @@ bool GrGLInterface::validate() const {
|
| if (GR_GL_INVALID_VER == glVer) {
|
| RETURN_FALSE_INTERFACE
|
| }
|
| + // TODO: Remove this once command buffer implements full ES3.
|
| + bool ALLOW_MISSING_FUNCTIONS_FOR_INCOMPLETE_COMMAND_BUFFER_ES3 = false;
|
| + if (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,0)) {
|
| + const GrGLubyte* rendererUByte;
|
| + GR_GL_CALL_RET(this, rendererUByte, GetString(GR_GL_RENDERER));
|
| + const char* renderer = reinterpret_cast<const char*>(rendererUByte);
|
| + ALLOW_MISSING_FUNCTIONS_FOR_INCOMPLETE_COMMAND_BUFFER_ES3 =
|
| + 0 == strcmp(renderer, "Chromium");
|
| + }
|
|
|
| // Now check that baseline ES/Desktop fns not covered above are present
|
| // and that we have fn pointers for any advertised fExtensions that we will
|
| @@ -306,8 +315,10 @@ bool GrGLInterface::validate() const {
|
| }
|
| }
|
| } else if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_texture_storage")) {
|
| - if (nullptr == fFunctions.fTexStorage2D) {
|
| - RETURN_FALSE_INTERFACE
|
| + if (!ALLOW_MISSING_FUNCTIONS_FOR_INCOMPLETE_COMMAND_BUFFER_ES3) {
|
| + if (nullptr == fFunctions.fTexStorage2D) {
|
| + RETURN_FALSE_INTERFACE
|
| + }
|
| }
|
| }
|
|
|
| @@ -480,9 +491,11 @@ bool GrGLInterface::validate() const {
|
| if (glVer >= GR_GL_VER(3,0) ||
|
| (kGLES_GrGLStandard == fStandard && fExtensions.has("GL_EXT_map_buffer_range")) ||
|
| (kGL_GrGLStandard == fStandard && fExtensions.has("GL_ARB_map_buffer_range"))) {
|
| - if (nullptr == fFunctions.fMapBufferRange ||
|
| - nullptr == fFunctions.fFlushMappedBufferRange) {
|
| - RETURN_FALSE_INTERFACE;
|
| + if (!ALLOW_MISSING_FUNCTIONS_FOR_INCOMPLETE_COMMAND_BUFFER_ES3) {
|
| + if (nullptr == fFunctions.fMapBufferRange ||
|
| + nullptr == fFunctions.fFlushMappedBufferRange) {
|
| + RETURN_FALSE_INTERFACE;
|
| + }
|
| }
|
| }
|
|
|
| @@ -562,14 +575,16 @@ bool GrGLInterface::validate() const {
|
| nullptr == fFunctions.fDrawElementsInstanced) {
|
| RETURN_FALSE_INTERFACE
|
| }
|
| - }
|
| + }
|
| } else if (kGLES_GrGLStandard == fStandard) {
|
| - if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_draw_instanced")) {
|
| - if (nullptr == fFunctions.fDrawArraysInstanced ||
|
| - nullptr == fFunctions.fDrawElementsInstanced) {
|
| - RETURN_FALSE_INTERFACE
|
| + if (!ALLOW_MISSING_FUNCTIONS_FOR_INCOMPLETE_COMMAND_BUFFER_ES3) {
|
| + if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_draw_instanced")) {
|
| + if (nullptr == fFunctions.fDrawArraysInstanced ||
|
| + nullptr == fFunctions.fDrawElementsInstanced) {
|
| + RETURN_FALSE_INTERFACE
|
| + }
|
| }
|
| - }
|
| + }
|
| }
|
|
|
| if (kGL_GrGLStandard == fStandard) {
|
| @@ -577,13 +592,15 @@ bool GrGLInterface::validate() const {
|
| if (nullptr == fFunctions.fVertexAttribDivisor) {
|
| RETURN_FALSE_INTERFACE
|
| }
|
| - }
|
| + }
|
| } else if (kGLES_GrGLStandard == fStandard) {
|
| - if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_instanced_arrays")) {
|
| - if (nullptr == fFunctions.fVertexAttribDivisor) {
|
| - RETURN_FALSE_INTERFACE
|
| + if (!ALLOW_MISSING_FUNCTIONS_FOR_INCOMPLETE_COMMAND_BUFFER_ES3) {
|
| + if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_instanced_arrays")) {
|
| + if (nullptr == fFunctions.fVertexAttribDivisor) {
|
| + RETURN_FALSE_INTERFACE
|
| + }
|
| }
|
| - }
|
| + }
|
| }
|
|
|
| if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) ||
|
|
|