blob: 56f1e59275687e66996ba95f1c4954f0aa28fec6 [file] [log] [blame]
twiz@google.com59a190b2011-03-14 21:23:01 +00001/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00002 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
twiz@google.com59a190b2011-03-14 21:23:01 +00006 */
7
8
tomhudson@google.com6bf38b52012-02-14 15:11:59 +00009#include "gl/GrGLInterface.h"
bsalomon@google.com1744f972013-02-26 21:46:32 +000010#include "gl/GrGLExtensions.h"
11#include "gl/GrGLUtil.h"
twiz@google.com59a190b2011-03-14 21:23:01 +000012
13#include <stdio.h>
14
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +000015#if GR_GL_PER_GL_FUNC_CALLBACK
16namespace {
17void GrGLDefaultInterfaceCallback(const GrGLInterface*) {}
18}
19#endif
20
commit-bot@chromium.orga3baf3b2014-02-21 18:45:30 +000021const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface* interface,
22 GrGLInsertEventMarkerProc insertEventMarkerFn,
23 GrGLPushGroupMarkerProc pushGroupMarkerFn,
24 GrGLPopGroupMarkerProc popGroupMarkerFn) {
25 GrGLInterface* newInterface = GrGLInterface::NewClone(interface);
26
27 if (!newInterface->fExtensions.has("GL_EXT_debug_marker")) {
28 newInterface->fExtensions.add("GL_EXT_debug_marker");
29 }
30
commit-bot@chromium.orgf5355612014-02-28 20:28:50 +000031 newInterface->fFunctions.fInsertEventMarker = insertEventMarkerFn;
32 newInterface->fFunctions.fPushGroupMarker = pushGroupMarkerFn;
33 newInterface->fFunctions.fPopGroupMarker = popGroupMarkerFn;
commit-bot@chromium.orga3baf3b2014-02-21 18:45:30 +000034
35 return newInterface;
36}
37
commit-bot@chromium.orgd8ed8512014-01-24 20:49:44 +000038const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) {
39 GrGLInterface* newInterface = GrGLInterface::NewClone(interface);
40
41 newInterface->fExtensions.remove("GL_NV_path_rendering");
commit-bot@chromium.orgf5355612014-02-28 20:28:50 +000042 newInterface->fFunctions.fPathCommands = NULL;
commit-bot@chromium.orgf5355612014-02-28 20:28:50 +000043 newInterface->fFunctions.fPathParameteri = NULL;
commit-bot@chromium.orgf5355612014-02-28 20:28:50 +000044 newInterface->fFunctions.fPathParameterf = NULL;
commit-bot@chromium.orgf5355612014-02-28 20:28:50 +000045 newInterface->fFunctions.fGenPaths = NULL;
46 newInterface->fFunctions.fDeletePaths = NULL;
cdalton8dd90cb2014-07-17 09:28:36 -070047 newInterface->fFunctions.fIsPath = NULL;
commit-bot@chromium.orgf5355612014-02-28 20:28:50 +000048 newInterface->fFunctions.fPathStencilFunc = NULL;
commit-bot@chromium.orgf5355612014-02-28 20:28:50 +000049 newInterface->fFunctions.fStencilFillPath = NULL;
50 newInterface->fFunctions.fStencilStrokePath = NULL;
51 newInterface->fFunctions.fStencilFillPathInstanced = NULL;
52 newInterface->fFunctions.fStencilStrokePathInstanced = NULL;
commit-bot@chromium.orgf5355612014-02-28 20:28:50 +000053 newInterface->fFunctions.fCoverFillPath = NULL;
54 newInterface->fFunctions.fCoverStrokePath = NULL;
55 newInterface->fFunctions.fCoverFillPathInstanced = NULL;
56 newInterface->fFunctions.fCoverStrokePathInstanced = NULL;
cdaltonc7103a12014-08-11 14:05:05 -070057 newInterface->fFunctions.fStencilThenCoverFillPath = NULL;
58 newInterface->fFunctions.fStencilThenCoverStrokePath = NULL;
59 newInterface->fFunctions.fStencilThenCoverFillPathInstanced = NULL;
60 newInterface->fFunctions.fStencilThenCoverStrokePathInstanced = NULL;
kkinnunen32b9a3b2014-07-02 22:56:35 -070061 newInterface->fFunctions.fProgramPathFragmentInputGen = NULL;
commit-bot@chromium.orgd8ed8512014-01-24 20:49:44 +000062 return newInterface;
63}
64
commit-bot@chromium.orgf5355612014-02-28 20:28:50 +000065GrGLInterface::GrGLInterface() {
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +000066 fStandard = kNone_GrGLStandard;
bsalomon@google.com0b77d682011-08-19 13:28:54 +000067
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +000068#if GR_GL_PER_GL_FUNC_CALLBACK
69 fCallback = GrGLDefaultInterfaceCallback;
70 fCallbackData = 0;
71#endif
bsalomon@google.com0b77d682011-08-19 13:28:54 +000072}
73
commit-bot@chromium.orgd8ed8512014-01-24 20:49:44 +000074GrGLInterface* GrGLInterface::NewClone(const GrGLInterface* interface) {
bsalomon49f085d2014-09-05 13:34:00 -070075 SkASSERT(interface);
commit-bot@chromium.orgd8ed8512014-01-24 20:49:44 +000076
77 GrGLInterface* clone = SkNEW(GrGLInterface);
78 clone->fStandard = interface->fStandard;
79 clone->fExtensions = interface->fExtensions;
80 clone->fFunctions = interface->fFunctions;
81#if GR_GL_PER_GL_FUNC_CALLBACK
82 clone->fCallback = interface->fCallback;
83 clone->fCallbackData = interface->fCallbackData;
84#endif
85 return clone;
86}
87
commit-bot@chromium.orge83b9b72014-05-01 19:21:41 +000088#ifdef SK_DEBUG
89 static int kIsDebug = 1;
90#else
91 static int kIsDebug = 0;
92#endif
93
94#define RETURN_FALSE_INTERFACE \
95 if (kIsDebug) { SkDebugf("%s:%d GrGLInterface::validate() failed.\n", __FILE__, __LINE__); } \
96 return false;
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +000097
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +000098bool GrGLInterface::validate() const {
bsalomon@google.com0b77d682011-08-19 13:28:54 +000099
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000100 if (kNone_GrGLStandard == fStandard) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000101 RETURN_FALSE_INTERFACE
bsalomon@google.com1dcf5062011-11-14 19:29:53 +0000102 }
skia.committer@gmail.com12eea2b2013-02-27 07:10:10 +0000103
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000104 if (!fExtensions.isInitialized()) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000105 RETURN_FALSE_INTERFACE
bsalomon@google.com1744f972013-02-26 21:46:32 +0000106 }
bsalomon@google.com1dcf5062011-11-14 19:29:53 +0000107
108 // functions that are always required
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000109 if (NULL == fFunctions.fActiveTexture ||
110 NULL == fFunctions.fAttachShader ||
111 NULL == fFunctions.fBindAttribLocation ||
112 NULL == fFunctions.fBindBuffer ||
113 NULL == fFunctions.fBindTexture ||
cdaltonbae6f6c2015-04-22 10:39:03 -0700114 NULL == fFunctions.fBlendColor || // -> GL >= 1.4 or extension, ES >= 2.0
cdaltonbae6f6c2015-04-22 10:39:03 -0700115 NULL == fFunctions.fBlendEquation || // -> GL >= 1.4 or extension, ES >= 2.0
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000116 NULL == fFunctions.fBlendFunc ||
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000117 NULL == fFunctions.fBufferData ||
118 NULL == fFunctions.fBufferSubData ||
119 NULL == fFunctions.fClear ||
120 NULL == fFunctions.fClearColor ||
121 NULL == fFunctions.fClearStencil ||
122 NULL == fFunctions.fColorMask ||
123 NULL == fFunctions.fCompileShader ||
124 NULL == fFunctions.fCopyTexSubImage2D ||
125 NULL == fFunctions.fCreateProgram ||
126 NULL == fFunctions.fCreateShader ||
127 NULL == fFunctions.fCullFace ||
128 NULL == fFunctions.fDeleteBuffers ||
129 NULL == fFunctions.fDeleteProgram ||
130 NULL == fFunctions.fDeleteShader ||
131 NULL == fFunctions.fDeleteTextures ||
132 NULL == fFunctions.fDepthMask ||
133 NULL == fFunctions.fDisable ||
134 NULL == fFunctions.fDisableVertexAttribArray ||
135 NULL == fFunctions.fDrawArrays ||
136 NULL == fFunctions.fDrawElements ||
137 NULL == fFunctions.fEnable ||
138 NULL == fFunctions.fEnableVertexAttribArray ||
139 NULL == fFunctions.fFrontFace ||
140 NULL == fFunctions.fGenBuffers ||
141 NULL == fFunctions.fGenTextures ||
142 NULL == fFunctions.fGetBufferParameteriv ||
143 NULL == fFunctions.fGenerateMipmap ||
144 NULL == fFunctions.fGetError ||
145 NULL == fFunctions.fGetIntegerv ||
146 NULL == fFunctions.fGetProgramInfoLog ||
147 NULL == fFunctions.fGetProgramiv ||
148 NULL == fFunctions.fGetShaderInfoLog ||
149 NULL == fFunctions.fGetShaderiv ||
150 NULL == fFunctions.fGetString ||
151 NULL == fFunctions.fGetUniformLocation ||
bsalomon6dc6f5f2015-06-18 09:12:16 -0700152#if 0 // Not included in Chrome yet
153 NULL == fFunctions.fIsTexture ||
154#endif
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000155 NULL == fFunctions.fLinkProgram ||
156 NULL == fFunctions.fLineWidth ||
157 NULL == fFunctions.fPixelStorei ||
158 NULL == fFunctions.fReadPixels ||
159 NULL == fFunctions.fScissor ||
160 NULL == fFunctions.fShaderSource ||
161 NULL == fFunctions.fStencilFunc ||
162 NULL == fFunctions.fStencilMask ||
163 NULL == fFunctions.fStencilOp ||
164 NULL == fFunctions.fTexImage2D ||
165 NULL == fFunctions.fTexParameteri ||
166 NULL == fFunctions.fTexParameteriv ||
167 NULL == fFunctions.fTexSubImage2D ||
168 NULL == fFunctions.fUniform1f ||
169 NULL == fFunctions.fUniform1i ||
170 NULL == fFunctions.fUniform1fv ||
171 NULL == fFunctions.fUniform1iv ||
172 NULL == fFunctions.fUniform2f ||
173 NULL == fFunctions.fUniform2i ||
174 NULL == fFunctions.fUniform2fv ||
175 NULL == fFunctions.fUniform2iv ||
176 NULL == fFunctions.fUniform3f ||
177 NULL == fFunctions.fUniform3i ||
178 NULL == fFunctions.fUniform3fv ||
179 NULL == fFunctions.fUniform3iv ||
180 NULL == fFunctions.fUniform4f ||
181 NULL == fFunctions.fUniform4i ||
182 NULL == fFunctions.fUniform4fv ||
183 NULL == fFunctions.fUniform4iv ||
184 NULL == fFunctions.fUniformMatrix2fv ||
185 NULL == fFunctions.fUniformMatrix3fv ||
186 NULL == fFunctions.fUniformMatrix4fv ||
187 NULL == fFunctions.fUseProgram ||
egdaniel27c15212014-10-24 15:00:50 -0700188 NULL == fFunctions.fVertexAttrib1f ||
189 NULL == fFunctions.fVertexAttrib2fv ||
190 NULL == fFunctions.fVertexAttrib3fv ||
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000191 NULL == fFunctions.fVertexAttrib4fv ||
192 NULL == fFunctions.fVertexAttribPointer ||
193 NULL == fFunctions.fViewport ||
194 NULL == fFunctions.fBindFramebuffer ||
195 NULL == fFunctions.fBindRenderbuffer ||
196 NULL == fFunctions.fCheckFramebufferStatus ||
197 NULL == fFunctions.fDeleteFramebuffers ||
198 NULL == fFunctions.fDeleteRenderbuffers ||
199 NULL == fFunctions.fFinish ||
200 NULL == fFunctions.fFlush ||
201 NULL == fFunctions.fFramebufferRenderbuffer ||
202 NULL == fFunctions.fFramebufferTexture2D ||
203 NULL == fFunctions.fGetFramebufferAttachmentParameteriv ||
204 NULL == fFunctions.fGetRenderbufferParameteriv ||
205 NULL == fFunctions.fGenFramebuffers ||
206 NULL == fFunctions.fGenRenderbuffers ||
207 NULL == fFunctions.fRenderbufferStorage) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000208 RETURN_FALSE_INTERFACE
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000209 }
210
bsalomon@google.comc82b8892011-09-22 14:10:33 +0000211 GrGLVersion glVer = GrGLGetVersion(this);
commit-bot@chromium.orgf4e67e32014-04-30 01:26:04 +0000212 if (GR_GL_INVALID_VER == glVer) {
213 RETURN_FALSE_INTERFACE
214 }
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000215
216 // Now check that baseline ES/Desktop fns not covered above are present
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000217 // and that we have fn pointers for any advertised fExtensions that we will
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000218 // try to use.
219
220 // these functions are part of ES2, we assume they are available
221 // On the desktop we assume they are available if the extension
222 // is present or GL version is high enough.
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000223 if (kGLES_GrGLStandard == fStandard) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000224 if (NULL == fFunctions.fStencilFuncSeparate ||
225 NULL == fFunctions.fStencilMaskSeparate ||
226 NULL == fFunctions.fStencilOpSeparate) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000227 RETURN_FALSE_INTERFACE
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000228 }
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000229 } else if (kGL_GrGLStandard == fStandard) {
robertphillips@google.come7884302012-04-18 14:39:58 +0000230
bsalomon@google.comc82b8892011-09-22 14:10:33 +0000231 if (glVer >= GR_GL_VER(2,0)) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000232 if (NULL == fFunctions.fStencilFuncSeparate ||
233 NULL == fFunctions.fStencilMaskSeparate ||
234 NULL == fFunctions.fStencilOpSeparate) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000235 RETURN_FALSE_INTERFACE
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000236 }
237 }
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000238 if (glVer >= GR_GL_VER(3,0) && NULL == fFunctions.fBindFragDataLocation) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000239 RETURN_FALSE_INTERFACE
bsalomon@google.combc5cf512011-09-21 16:21:07 +0000240 }
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000241 if (glVer >= GR_GL_VER(2,0) || fExtensions.has("GL_ARB_draw_buffers")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000242 if (NULL == fFunctions.fDrawBuffers) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000243 RETURN_FALSE_INTERFACE
bsalomon@google.comd32c5f52011-08-02 19:29:03 +0000244 }
245 }
robertphillips@google.come7884302012-04-18 14:39:58 +0000246
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000247 if (glVer >= GR_GL_VER(1,5) || fExtensions.has("GL_ARB_occlusion_query")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000248 if (NULL == fFunctions.fGenQueries ||
249 NULL == fFunctions.fDeleteQueries ||
250 NULL == fFunctions.fBeginQuery ||
251 NULL == fFunctions.fEndQuery ||
252 NULL == fFunctions.fGetQueryiv ||
253 NULL == fFunctions.fGetQueryObjectiv ||
254 NULL == fFunctions.fGetQueryObjectuiv) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000255 RETURN_FALSE_INTERFACE
bsalomon@google.com373a6632011-10-19 20:43:20 +0000256 }
257 }
258 if (glVer >= GR_GL_VER(3,3) ||
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000259 fExtensions.has("GL_ARB_timer_query") ||
260 fExtensions.has("GL_EXT_timer_query")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000261 if (NULL == fFunctions.fGetQueryObjecti64v ||
262 NULL == fFunctions.fGetQueryObjectui64v) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000263 RETURN_FALSE_INTERFACE
bsalomon@google.com373a6632011-10-19 20:43:20 +0000264 }
265 }
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000266 if (glVer >= GR_GL_VER(3,3) || fExtensions.has("GL_ARB_timer_query")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000267 if (NULL == fFunctions.fQueryCounter) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000268 RETURN_FALSE_INTERFACE
bsalomon@google.com373a6632011-10-19 20:43:20 +0000269 }
270 }
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000271 }
272
273 // optional function on desktop before 1.3
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000274 if (kGL_GrGLStandard != fStandard ||
bsalomon@google.com1744f972013-02-26 21:46:32 +0000275 (glVer >= GR_GL_VER(1,3)) ||
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000276 fExtensions.has("GL_ARB_texture_compression")) {
krajcevskie1f5a232014-06-11 16:08:50 -0700277 if (NULL == fFunctions.fCompressedTexImage2D
bsalomonc9aec1e2015-04-24 11:08:25 -0700278#if 0
krajcevskie1f5a232014-06-11 16:08:50 -0700279 || NULL == fFunctions.fCompressedTexSubImage2D
bsalomonc9aec1e2015-04-24 11:08:25 -0700280#endif
krajcevskie1f5a232014-06-11 16:08:50 -0700281 ) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000282 RETURN_FALSE_INTERFACE
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000283 }
284 }
285
bsalomon@google.comd32c5f52011-08-02 19:29:03 +0000286 // part of desktop GL, but not ES
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000287 if (kGL_GrGLStandard == fStandard &&
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000288 (NULL == fFunctions.fGetTexLevelParameteriv ||
289 NULL == fFunctions.fDrawBuffer ||
290 NULL == fFunctions.fReadBuffer)) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000291 RETURN_FALSE_INTERFACE
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000292 }
bsalomon@google.comcee661a2011-07-26 12:32:36 +0000293
bsalomon@google.com280e99f2012-01-05 16:17:38 +0000294 // GL_EXT_texture_storage is part of desktop 4.2
295 // There is a desktop ARB extension and an ES+desktop EXT extension
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000296 if (kGL_GrGLStandard == fStandard) {
bsalomon@google.combaa9ea12012-01-06 19:05:43 +0000297 if (glVer >= GR_GL_VER(4,2) ||
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000298 fExtensions.has("GL_ARB_texture_storage") ||
299 fExtensions.has("GL_EXT_texture_storage")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000300 if (NULL == fFunctions.fTexStorage2D) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000301 RETURN_FALSE_INTERFACE
bsalomon@google.combaa9ea12012-01-06 19:05:43 +0000302 }
303 }
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000304 } else if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_texture_storage")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000305 if (NULL == fFunctions.fTexStorage2D) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000306 RETURN_FALSE_INTERFACE
bsalomon@google.combaa9ea12012-01-06 19:05:43 +0000307 }
bsalomon@google.com280e99f2012-01-05 16:17:38 +0000308 }
309
cdaltonfd4167d2015-04-21 11:45:56 -0700310 // glTextureBarrier is part of desktop 4.5. There are also ARB and NV extensions.
311 if (kGL_GrGLStandard == fStandard) {
312 if (glVer >= GR_GL_VER(4,5) ||
313 fExtensions.has("GL_ARB_texture_barrier") ||
314 fExtensions.has("GL_NV_texture_barrier")) {
315 if (NULL == fFunctions.fTextureBarrier) {
316 RETURN_FALSE_INTERFACE
317 }
318 }
319 } else if (fExtensions.has("GL_NV_texture_barrier")) {
320 if (NULL == fFunctions.fTextureBarrier) {
321 RETURN_FALSE_INTERFACE
322 }
323 }
324
cdaltonbae6f6c2015-04-22 10:39:03 -0700325 if (fExtensions.has("GL_KHR_blend_equation_advanced") ||
326 fExtensions.has("GL_NV_blend_equation_advanced")) {
327 if (NULL == fFunctions.fBlendBarrier) {
328 RETURN_FALSE_INTERFACE
329 }
330 }
331
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000332 if (fExtensions.has("GL_EXT_discard_framebuffer")) {
bsalomonc9aec1e2015-04-24 11:08:25 -0700333// FIXME: Remove this once Chromium is updated to provide this function
334#if 0
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000335 if (NULL == fFunctions.fDiscardFramebuffer) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000336 RETURN_FALSE_INTERFACE
robertphillips@google.coma6ffb582013-04-29 16:50:17 +0000337 }
bsalomonc9aec1e2015-04-24 11:08:25 -0700338#endif
robertphillips@google.coma6ffb582013-04-29 16:50:17 +0000339 }
340
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000341 // FBO MSAA
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000342 if (kGL_GrGLStandard == fStandard) {
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000343 // GL 3.0 and the ARB extension have multisample + blit
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000344 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_ARB_framebuffer_object")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000345 if (NULL == fFunctions.fRenderbufferStorageMultisample ||
346 NULL == fFunctions.fBlitFramebuffer) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000347 RETURN_FALSE_INTERFACE
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000348 }
349 } else {
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000350 if (fExtensions.has("GL_EXT_framebuffer_blit") &&
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000351 NULL == fFunctions.fBlitFramebuffer) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000352 RETURN_FALSE_INTERFACE
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000353 }
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000354 if (fExtensions.has("GL_EXT_framebuffer_multisample") &&
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000355 NULL == fFunctions.fRenderbufferStorageMultisample) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000356 RETURN_FALSE_INTERFACE
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000357 }
358 }
359 } else {
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000360 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_CHROMIUM_framebuffer_multisample")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000361 if (NULL == fFunctions.fRenderbufferStorageMultisample ||
362 NULL == fFunctions.fBlitFramebuffer) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000363 RETURN_FALSE_INTERFACE
commit-bot@chromium.orga8e5a062013-09-05 23:44:09 +0000364 }
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000365 }
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000366 if (fExtensions.has("GL_APPLE_framebuffer_multisample")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000367 if (NULL == fFunctions.fRenderbufferStorageMultisampleES2APPLE ||
368 NULL == fFunctions.fResolveMultisampleFramebuffer) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000369 RETURN_FALSE_INTERFACE
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000370 }
371 }
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000372 if (fExtensions.has("GL_IMG_multisampled_render_to_texture") ||
373 fExtensions.has("GL_EXT_multisampled_render_to_texture")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000374 if (NULL == fFunctions.fRenderbufferStorageMultisampleES2EXT ||
375 NULL == fFunctions.fFramebufferTexture2DMultisample) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000376 RETURN_FALSE_INTERFACE
bsalomon@google.comf3a60c02013-03-19 19:06:09 +0000377 }
378 }
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000379 }
380
381 // On ES buffer mapping is an extension. On Desktop
382 // buffer mapping was part of original VBO extension
383 // which we require.
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000384 if (kGL_GrGLStandard == fStandard || fExtensions.has("GL_OES_mapbuffer")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000385 if (NULL == fFunctions.fMapBuffer ||
386 NULL == fFunctions.fUnmapBuffer) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000387 RETURN_FALSE_INTERFACE
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000388 }
389 }
390
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000391 // Dual source blending
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000392 if (kGL_GrGLStandard == fStandard &&
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000393 (glVer >= GR_GL_VER(3,3) || fExtensions.has("GL_ARB_blend_func_extended"))) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000394 if (NULL == fFunctions.fBindFragDataLocationIndexed) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000395 RETURN_FALSE_INTERFACE
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000396 }
397 }
skia.committer@gmail.com12eea2b2013-02-27 07:10:10 +0000398
commit-bot@chromium.org726e6212013-08-23 20:55:46 +0000399 // glGetStringi was added in version 3.0 of both desktop and ES.
400 if (glVer >= GR_GL_VER(3, 0)) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000401 if (NULL == fFunctions.fGetStringi) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000402 RETURN_FALSE_INTERFACE
bsalomon@google.com1744f972013-02-26 21:46:32 +0000403 }
404 }
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000405
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000406 if (kGL_GrGLStandard == fStandard) {
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000407 if (glVer >= GR_GL_VER(3, 0) || fExtensions.has("GL_ARB_vertex_array_object")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000408 if (NULL == fFunctions.fBindVertexArray ||
409 NULL == fFunctions.fDeleteVertexArrays ||
410 NULL == fFunctions.fGenVertexArrays) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000411 RETURN_FALSE_INTERFACE
bsalomon@google.comecd84842013-03-01 15:36:02 +0000412 }
413 }
414 } else {
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +0000415 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_OES_vertex_array_object")) {
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000416 if (NULL == fFunctions.fBindVertexArray ||
417 NULL == fFunctions.fDeleteVertexArrays ||
418 NULL == fFunctions.fGenVertexArrays) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000419 RETURN_FALSE_INTERFACE
bsalomon@google.comecd84842013-03-01 15:36:02 +0000420 }
421 }
bsalomon@google.comecd84842013-03-01 15:36:02 +0000422 }
commit-bot@chromium.orga3baf3b2014-02-21 18:45:30 +0000423
commit-bot@chromium.orga3baf3b2014-02-21 18:45:30 +0000424 if (fExtensions.has("GL_EXT_debug_marker")) {
425 if (NULL == fFunctions.fInsertEventMarker ||
426 NULL == fFunctions.fPushGroupMarker ||
427 NULL == fFunctions.fPopGroupMarker) {
commit-bot@chromium.orgadadf7c2014-03-24 19:43:02 +0000428 RETURN_FALSE_INTERFACE
commit-bot@chromium.orga3baf3b2014-02-21 18:45:30 +0000429 }
430 }
bsalomon@google.coma34bb602014-04-01 13:07:29 +0000431
commit-bot@chromium.org160b4782014-05-05 12:32:37 +0000432 if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) ||
433 fExtensions.has("GL_ARB_invalidate_subdata")) {
bsalomon@google.coma34bb602014-04-01 13:07:29 +0000434 if (NULL == fFunctions.fInvalidateBufferData ||
435 NULL == fFunctions.fInvalidateBufferSubData ||
436 NULL == fFunctions.fInvalidateFramebuffer ||
437 NULL == fFunctions.fInvalidateSubFramebuffer ||
438 NULL == fFunctions.fInvalidateTexImage ||
439 NULL == fFunctions.fInvalidateTexSubImage) {
440 RETURN_FALSE_INTERFACE;
441 }
commit-bot@chromium.org160b4782014-05-05 12:32:37 +0000442 } else if (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,0)) {
bsalomon@google.coma34bb602014-04-01 13:07:29 +0000443 // ES 3.0 adds the framebuffer functions but not the others.
444 if (NULL == fFunctions.fInvalidateFramebuffer ||
445 NULL == fFunctions.fInvalidateSubFramebuffer) {
446 RETURN_FALSE_INTERFACE;
447 }
448 }
commit-bot@chromium.orgbeb8b3a2014-04-15 15:37:51 +0000449
450 if (kGLES_GrGLStandard == fStandard && fExtensions.has("GL_CHROMIUM_map_sub")) {
451 if (NULL == fFunctions.fMapBufferSubData ||
452 NULL == fFunctions.fMapTexSubImage2D ||
453 NULL == fFunctions.fUnmapBufferSubData ||
454 NULL == fFunctions.fUnmapTexSubImage2D) {
455 RETURN_FALSE_INTERFACE;
456 }
457 }
bsalomon@google.coma34bb602014-04-01 13:07:29 +0000458
commit-bot@chromium.org160b4782014-05-05 12:32:37 +0000459 // These functions are added to the 3.0 version of both GLES and GL.
460 if (glVer >= GR_GL_VER(3,0) ||
461 (kGLES_GrGLStandard == fStandard && fExtensions.has("GL_EXT_map_buffer_range")) ||
462 (kGL_GrGLStandard == fStandard && fExtensions.has("GL_ARB_map_buffer_range"))) {
463 if (NULL == fFunctions.fMapBufferRange ||
464 NULL == fFunctions.fFlushMappedBufferRange) {
465 RETURN_FALSE_INTERFACE;
466 }
467 }
kkinnunen32b9a3b2014-07-02 22:56:35 -0700468
kkinnunen32b9a3b2014-07-02 22:56:35 -0700469 if ((kGL_GrGLStandard == fStandard &&
470 (glVer >= GR_GL_VER(4,3) || fExtensions.has("GL_ARB_program_interface_query"))) ||
471 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) {
472 if (NULL == fFunctions.fGetProgramResourceLocation) {
473 RETURN_FALSE_INTERFACE
474 }
475 }
476
bsalomonee64d6e2014-12-03 10:46:08 -0800477 if (kGLES_GrGLStandard == fStandard || glVer >= GR_GL_VER(4,1) ||
478 fExtensions.has("GL_ARB_ES2_compatibility")) {
bsalomonc9aec1e2015-04-24 11:08:25 -0700479#if 0 // Enable this once Chrome gives us the function ptr
bsalomonee64d6e2014-12-03 10:46:08 -0800480 if (NULL == fFunctions.fGetShaderPrecisionFormat) {
481 RETURN_FALSE_INTERFACE
482 }
bsalomonc9aec1e2015-04-24 11:08:25 -0700483#endif
bsalomonee64d6e2014-12-03 10:46:08 -0800484 }
485
kkinnunen32b9a3b2014-07-02 22:56:35 -0700486 if (fExtensions.has("GL_NV_path_rendering")) {
cdalton626e1ff2015-06-12 13:56:46 -0700487 if (NULL == fFunctions.fMatrixLoadf ||
488 NULL == fFunctions.fMatrixLoadIdentity ||
489 NULL == fFunctions.fPathCommands ||
kkinnunen32b9a3b2014-07-02 22:56:35 -0700490 NULL == fFunctions.fPathParameteri ||
491 NULL == fFunctions.fPathParameterf ||
492 NULL == fFunctions.fGenPaths ||
493 NULL == fFunctions.fDeletePaths ||
cdalton8dd90cb2014-07-17 09:28:36 -0700494 NULL == fFunctions.fIsPath ||
kkinnunen32b9a3b2014-07-02 22:56:35 -0700495 NULL == fFunctions.fPathStencilFunc ||
496 NULL == fFunctions.fStencilFillPath ||
497 NULL == fFunctions.fStencilStrokePath ||
498 NULL == fFunctions.fStencilFillPathInstanced ||
499 NULL == fFunctions.fStencilStrokePathInstanced ||
500 NULL == fFunctions.fCoverFillPath ||
501 NULL == fFunctions.fCoverStrokePath ||
502 NULL == fFunctions.fCoverFillPathInstanced ||
kkinnunencfe62e32015-07-01 02:58:50 -0700503 NULL == fFunctions.fCoverStrokePathInstanced
504#if 0
505 // List of functions that Skia uses, but which have been added since the initial release
506 // of NV_path_rendering driver. We do not want to fail interface validation due to
507 // missing features, we will just not use the extension.
508 // Update this list -> update GrGLCaps::hasPathRenderingSupport too.
509 || NULL == fFunctions.fStencilThenCoverFillPath ||
510 NULL == fFunctions.fStencilThenCoverStrokePath ||
511 NULL == fFunctions.fStencilThenCoverFillPathInstanced ||
512 NULL == fFunctions.fStencilThenCoverStrokePathInstanced ||
513 NULL == fFunctions.fProgramPathFragmentInputGen
514#endif
515 ) {
kkinnunen32b9a3b2014-07-02 22:56:35 -0700516 RETURN_FALSE_INTERFACE
517 }
kkinnunen32b9a3b2014-07-02 22:56:35 -0700518 }
519
cdalton0edea2c2015-05-21 08:27:44 -0700520 if (fExtensions.has("GL_EXT_raster_multisample")) {
521 if (NULL == fFunctions.fRasterSamples) {
522 RETURN_FALSE_INTERFACE
523 }
524 }
525
vbuzinov08b4d292015-04-01 06:29:49 -0700526 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) {
527 if (NULL == fFunctions.fCoverageModulation) {
528 RETURN_FALSE_INTERFACE
529 }
530 }
531
cdalton626e1ff2015-06-12 13:56:46 -0700532 if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1)) ||
533 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,0)) ||
534 fExtensions.has("GL_ARB_draw_instanced") ||
535 fExtensions.has("GL_EXT_draw_instanced")) {
536 if (NULL == fFunctions.fDrawArraysInstanced ||
537 NULL == fFunctions.fDrawElementsInstanced) {
538 RETURN_FALSE_INTERFACE
539 }
540 }
541
542 if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,2)) ||
543 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,0)) ||
544 fExtensions.has("GL_ARB_instanced_arrays") ||
545 fExtensions.has("GL_EXT_instanced_arrays")) {
546 if (NULL == fFunctions.fVertexAttribDivisor) {
547 RETURN_FALSE_INTERFACE
548 }
549 }
550
551 if (fExtensions.has("GL_NV_bindless_texture")) {
552 if (NULL == fFunctions.fGetTextureHandle ||
553 NULL == fFunctions.fGetTextureSamplerHandle ||
554 NULL == fFunctions.fMakeTextureHandleResident ||
555 NULL == fFunctions.fMakeTextureHandleNonResident ||
556 NULL == fFunctions.fGetImageHandle ||
557 NULL == fFunctions.fMakeImageHandleResident ||
558 NULL == fFunctions.fMakeImageHandleNonResident ||
559 NULL == fFunctions.fIsTextureHandleResident ||
560 NULL == fFunctions.fIsImageHandleResident ||
561 NULL == fFunctions.fUniformHandleui64 ||
562 NULL == fFunctions.fUniformHandleui64v ||
563 NULL == fFunctions.fProgramUniformHandleui64 ||
564 NULL == fFunctions.fProgramUniformHandleui64v) {
565 RETURN_FALSE_INTERFACE
566 }
567 }
568
569 if (kGL_GrGLStandard == fStandard && fExtensions.has("GL_EXT_direct_state_access")) {
570 if (NULL == fFunctions.fTextureParameteri ||
571 NULL == fFunctions.fTextureParameteriv ||
572 NULL == fFunctions.fTextureParameterf ||
573 NULL == fFunctions.fTextureParameterfv ||
574 NULL == fFunctions.fTextureImage1D ||
575 NULL == fFunctions.fTextureImage2D ||
576 NULL == fFunctions.fTextureSubImage1D ||
577 NULL == fFunctions.fTextureSubImage2D ||
578 NULL == fFunctions.fCopyTextureImage1D ||
579 NULL == fFunctions.fCopyTextureImage2D ||
580 NULL == fFunctions.fCopyTextureSubImage1D ||
581 NULL == fFunctions.fCopyTextureSubImage2D ||
582 NULL == fFunctions.fGetTextureImage ||
583 NULL == fFunctions.fGetTextureParameterfv ||
584 NULL == fFunctions.fGetTextureParameteriv ||
585 NULL == fFunctions.fGetTextureLevelParameterfv ||
586 NULL == fFunctions.fGetTextureLevelParameteriv) {
587 RETURN_FALSE_INTERFACE
588 }
589 if (glVer >= GR_GL_VER(1,2)) {
590 if (NULL == fFunctions.fTextureImage3D ||
591 NULL == fFunctions.fTextureSubImage3D ||
592 NULL == fFunctions.fCopyTextureSubImage3D ||
593 NULL == fFunctions.fCompressedTextureImage3D ||
594 NULL == fFunctions.fCompressedTextureImage2D ||
595 NULL == fFunctions.fCompressedTextureImage1D ||
596 NULL == fFunctions.fCompressedTextureSubImage3D ||
597 NULL == fFunctions.fCompressedTextureSubImage2D ||
598 NULL == fFunctions.fCompressedTextureSubImage1D ||
599 NULL == fFunctions.fGetCompressedTextureImage) {
600 RETURN_FALSE_INTERFACE
601 }
602 }
603 if (glVer >= GR_GL_VER(1,5)) {
604 if (NULL == fFunctions.fNamedBufferData ||
605 NULL == fFunctions.fNamedBufferSubData ||
606 NULL == fFunctions.fMapNamedBuffer ||
607 NULL == fFunctions.fUnmapNamedBuffer ||
608 NULL == fFunctions.fGetNamedBufferParameteriv ||
609 NULL == fFunctions.fGetNamedBufferPointerv ||
610 NULL == fFunctions.fGetNamedBufferSubData) {
611 RETURN_FALSE_INTERFACE
612 }
613 }
614 if (glVer >= GR_GL_VER(2,0)) {
615 if (NULL == fFunctions.fProgramUniform1f ||
616 NULL == fFunctions.fProgramUniform2f ||
617 NULL == fFunctions.fProgramUniform3f ||
618 NULL == fFunctions.fProgramUniform4f ||
619 NULL == fFunctions.fProgramUniform1i ||
620 NULL == fFunctions.fProgramUniform2i ||
621 NULL == fFunctions.fProgramUniform3i ||
622 NULL == fFunctions.fProgramUniform4i ||
623 NULL == fFunctions.fProgramUniform1fv ||
624 NULL == fFunctions.fProgramUniform2fv ||
625 NULL == fFunctions.fProgramUniform3fv ||
626 NULL == fFunctions.fProgramUniform4fv ||
627 NULL == fFunctions.fProgramUniform1iv ||
628 NULL == fFunctions.fProgramUniform2iv ||
629 NULL == fFunctions.fProgramUniform3iv ||
630 NULL == fFunctions.fProgramUniform4iv ||
631 NULL == fFunctions.fProgramUniformMatrix2fv ||
632 NULL == fFunctions.fProgramUniformMatrix3fv ||
633 NULL == fFunctions.fProgramUniformMatrix4fv) {
634 RETURN_FALSE_INTERFACE
635 }
636 }
637 if (glVer >= GR_GL_VER(2,1)) {
638 if (NULL == fFunctions.fProgramUniformMatrix2x3fv ||
639 NULL == fFunctions.fProgramUniformMatrix3x2fv ||
640 NULL == fFunctions.fProgramUniformMatrix2x4fv ||
641 NULL == fFunctions.fProgramUniformMatrix4x2fv ||
642 NULL == fFunctions.fProgramUniformMatrix3x4fv ||
643 NULL == fFunctions.fProgramUniformMatrix4x3fv) {
644 RETURN_FALSE_INTERFACE
645 }
646 }
647 if (glVer >= GR_GL_VER(3,0)) {
648 if (NULL == fFunctions.fNamedRenderbufferStorage ||
649 NULL == fFunctions.fGetNamedRenderbufferParameteriv ||
650 NULL == fFunctions.fNamedRenderbufferStorageMultisample ||
651 NULL == fFunctions.fCheckNamedFramebufferStatus ||
652 NULL == fFunctions.fNamedFramebufferTexture1D ||
653 NULL == fFunctions.fNamedFramebufferTexture2D ||
654 NULL == fFunctions.fNamedFramebufferTexture3D ||
655 NULL == fFunctions.fNamedFramebufferRenderbuffer ||
656 NULL == fFunctions.fGetNamedFramebufferAttachmentParameteriv ||
657 NULL == fFunctions.fGenerateTextureMipmap ||
658 NULL == fFunctions.fFramebufferDrawBuffer ||
659 NULL == fFunctions.fFramebufferDrawBuffers ||
660 NULL == fFunctions.fFramebufferReadBuffer ||
661 NULL == fFunctions.fGetFramebufferParameteriv ||
662 NULL == fFunctions.fNamedCopyBufferSubData ||
663 NULL == fFunctions.fVertexArrayVertexOffset ||
664 NULL == fFunctions.fVertexArrayColorOffset ||
665 NULL == fFunctions.fVertexArrayEdgeFlagOffset ||
666 NULL == fFunctions.fVertexArrayIndexOffset ||
667 NULL == fFunctions.fVertexArrayNormalOffset ||
668 NULL == fFunctions.fVertexArrayTexCoordOffset ||
669 NULL == fFunctions.fVertexArrayMultiTexCoordOffset ||
670 NULL == fFunctions.fVertexArrayFogCoordOffset ||
671 NULL == fFunctions.fVertexArraySecondaryColorOffset ||
672 NULL == fFunctions.fVertexArrayVertexAttribOffset ||
673 NULL == fFunctions.fVertexArrayVertexAttribIOffset ||
674 NULL == fFunctions.fEnableVertexArray ||
675 NULL == fFunctions.fDisableVertexArray ||
676 NULL == fFunctions.fEnableVertexArrayAttrib ||
677 NULL == fFunctions.fDisableVertexArrayAttrib ||
678 NULL == fFunctions.fGetVertexArrayIntegerv ||
679 NULL == fFunctions.fGetVertexArrayPointerv ||
680 NULL == fFunctions.fGetVertexArrayIntegeri_v ||
681 NULL == fFunctions.fGetVertexArrayPointeri_v ||
682 NULL == fFunctions.fMapNamedBufferRange ||
683 NULL == fFunctions.fFlushMappedNamedBufferRange) {
684 RETURN_FALSE_INTERFACE
685 }
686 }
687 }
688
689 if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) ||
690 fExtensions.has("GL_KHR_debug")) {
691 if (NULL == fFunctions.fDebugMessageControl ||
692 NULL == fFunctions.fDebugMessageInsert ||
693 NULL == fFunctions.fDebugMessageCallback ||
694 NULL == fFunctions.fGetDebugMessageLog ||
695 NULL == fFunctions.fPushDebugGroup ||
696 NULL == fFunctions.fPopDebugGroup ||
697 NULL == fFunctions.fObjectLabel) {
698 RETURN_FALSE_INTERFACE
699 }
700 }
701
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000702 return true;
703}