Chromium Code Reviews| Index: src/gpu/gl/GrGLInterface.cpp |
| diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp |
| index c09efae2b88bd87007efdcfdda0209fd368d44f2..3db5809d346b8660c83256e8a3686a8871119636 100644 |
| --- a/src/gpu/gl/GrGLInterface.cpp |
| +++ b/src/gpu/gl/GrGLInterface.cpp |
| @@ -216,6 +216,16 @@ bool GrGLInterface::validate() const { |
| if (GR_GL_INVALID_VER == glVer) { |
| RETURN_FALSE_INTERFACE |
| } |
| + // TODO: Remove this once command buffer implements full ES3. |
| + GrGLDriver glDriver = kUnknown_GrGLDriver; |
|
bsalomon
2016/02/12 14:03:27
Similar request to above, instead of storing a dri
Kimmo Kinnunen
2016/02/15 08:10:14
Done.
|
| + if (kGLES_GrGLStandard == fStandard) { |
| + const GrGLubyte* rendererUByte; |
| + GR_GL_CALL_RET(this, rendererUByte, GetString(GR_GL_RENDERER)); |
| + const char* renderer = reinterpret_cast<const char*>(rendererUByte); |
| + if (0 == strcmp(renderer, "Chromium")) { |
| + glDriver = kChromium_GrGLDriver; |
| + } |
| + } |
| // 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 +316,11 @@ 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 |
| + // TODO: remove once command buffer implements full ES3. |
| + if (kChromium_GrGLDriver != glDriver) { |
| + if (nullptr == fFunctions.fTexStorage2D) { |
| + RETURN_FALSE_INTERFACE |
| + } |
| } |
| } |
| @@ -480,9 +493,12 @@ 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; |
| + // TODO: remove once command buffer implements full ES3. |
| + if (kChromium_GrGLDriver != glDriver) { |
| + if (nullptr == fFunctions.fMapBufferRange || |
| + nullptr == fFunctions.fFlushMappedBufferRange) { |
| + RETURN_FALSE_INTERFACE; |
| + } |
| } |
| } |
| @@ -562,14 +578,17 @@ 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 |
| + // TODO: remove once command buffer implements full ES3. |
| + if (kChromium_GrGLDriver != glDriver) { |
| + 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 +596,16 @@ 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 |
| + // TODO: remove once command buffer implements full ES3. |
| + if (kChromium_GrGLDriver != glDriver) { |
| + 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)) || |