blob: 7732c037217dd5ce218c7264749b9dc00795b240 [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
twiz@google.com59a190b2011-03-14 21:23:01 +00008#ifndef GrGLInterface_DEFINED
9#define GrGLInterface_DEFINED
10
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "include/core/SkRefCnt.h"
12#include "include/gpu/gl/GrGLExtensions.h"
13#include "include/gpu/gl/GrGLFunctions.h"
twiz@google.com59a190b2011-03-14 21:23:01 +000014
twiz@google.com59a190b2011-03-14 21:23:01 +000015////////////////////////////////////////////////////////////////////////////////
16
Brian Salomon3d6801e2017-12-11 10:06:31 -050017typedef void(*GrGLFuncPtr)();
18struct GrGLInterface;
19
20
twiz@google.com59a190b2011-03-14 21:23:01 +000021/**
bsalomon@google.com0b77d682011-08-19 13:28:54 +000022 * Rather than depend on platform-specific GL headers and libraries, we require
23 * the client to provide a struct of GL function pointers. This struct can be
Brian Salomonc1b9c102018-04-06 09:18:00 -040024 * specified per-GrContext as a parameter to GrContext::MakeGL. If no interface is
25 * passed to MakeGL then a default GL interface is created using GrGLMakeNativeInterface().
26 * If this returns nullptr then GrContext::MakeGL() will fail.
bsalomon@google.com0b77d682011-08-19 13:28:54 +000027 *
Brian Salomonc1b9c102018-04-06 09:18:00 -040028 * The implementation of GrGLMakeNativeInterface is platform-specific. Several
29 * implementations have been provided (for GLX, WGL, EGL, etc), along with an
30 * implementation that simply returns nullptr. Clients should select the most
31 * appropriate one to build.
twiz@google.com59a190b2011-03-14 21:23:01 +000032 */
Brian Salomon3d6801e2017-12-11 10:06:31 -050033SK_API sk_sp<const GrGLInterface> GrGLMakeNativeInterface();
34// Deprecated alternative to GrGLMakeNativeInterface().
halcanary0fc1dbe2015-09-21 08:22:19 -070035SK_API const GrGLInterface* GrGLCreateNativeInterface();
bsalomon@google.com373a6632011-10-19 20:43:20 +000036
bsalomon@google.com74913722011-10-27 20:44:19 +000037/**
bsalomon@google.comcc61b172012-05-07 21:45:48 +000038 * GrContext uses the following interface to make all calls into OpenGL. When a
39 * GrContext is created it is given a GrGLInterface. The interface's function
40 * pointers must be valid for the OpenGL context associated with the GrContext.
41 * On some platforms, such as Windows, function pointers for OpenGL extensions
42 * may vary between OpenGL contexts. So the caller must be careful to use a
43 * GrGLInterface initialized for the correct context. All functions that should
44 * be available based on the OpenGL's version and extension string must be
45 * non-NULL or GrContext creation will fail. This can be tested with the
46 * validate() method when the OpenGL context has been made current.
bsalomon@google.combf2a4692011-05-04 12:35:39 +000047 */
commit-bot@chromium.orga4de8c22013-09-09 13:38:37 +000048struct SK_API GrGLInterface : public SkRefCnt {
bsalomon@google.comba800e22012-03-29 21:04:52 +000049private:
commit-bot@chromium.orga4de8c22013-09-09 13:38:37 +000050 typedef SkRefCnt INHERITED;
robertphillips@google.com15e9d3e2012-06-21 20:25:03 +000051
bsalomon@google.comba800e22012-03-29 21:04:52 +000052public:
bsalomon@google.com0b77d682011-08-19 13:28:54 +000053 GrGLInterface();
54
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +000055 // Validates that the GrGLInterface supports its advertised standard. This means the necessary
56 // function pointers have been initialized for both the GL version and any advertised
57 // extensions.
58 bool validate() const;
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000059
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +000060 // Indicates the type of GL implementation
61 union {
62 GrGLStandard fStandard;
63 GrGLStandard fBindingsExported; // Legacy name, will be remove when Chromium is updated.
64 };
twiz@google.comb65e0cb2011-03-18 20:41:44 +000065
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +000066 GrGLExtensions fExtensions;
67
commit-bot@chromium.orgf5355612014-02-28 20:28:50 +000068 bool hasExtension(const char ext[]) const { return fExtensions.has(ext); }
commit-bot@chromium.org90313cc2014-01-17 15:05:38 +000069
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +000070 /**
71 * The function pointers are in a struct so that we can have a compiler generated assignment
72 * operator.
73 */
74 struct Functions {
Brian Salomon2424ec42018-08-24 10:26:42 -040075 GrGLFunction<GrGLActiveTextureFn> fActiveTexture;
76 GrGLFunction<GrGLAttachShaderFn> fAttachShader;
77 GrGLFunction<GrGLBeginQueryFn> fBeginQuery;
78 GrGLFunction<GrGLBindAttribLocationFn> fBindAttribLocation;
79 GrGLFunction<GrGLBindBufferFn> fBindBuffer;
80 GrGLFunction<GrGLBindFragDataLocationFn> fBindFragDataLocation;
81 GrGLFunction<GrGLBindFragDataLocationIndexedFn> fBindFragDataLocationIndexed;
82 GrGLFunction<GrGLBindFramebufferFn> fBindFramebuffer;
83 GrGLFunction<GrGLBindRenderbufferFn> fBindRenderbuffer;
Brian Salomona2a94a42018-10-16 10:54:10 -040084 GrGLFunction<GrGLBindSamplerFn> fBindSampler;
Brian Salomon2424ec42018-08-24 10:26:42 -040085 GrGLFunction<GrGLBindTextureFn> fBindTexture;
86 GrGLFunction<GrGLBindVertexArrayFn> fBindVertexArray;
87 GrGLFunction<GrGLBlendBarrierFn> fBlendBarrier;
88 GrGLFunction<GrGLBlendColorFn> fBlendColor;
89 GrGLFunction<GrGLBlendEquationFn> fBlendEquation;
90 GrGLFunction<GrGLBlendFuncFn> fBlendFunc;
91 GrGLFunction<GrGLBlitFramebufferFn> fBlitFramebuffer;
92 GrGLFunction<GrGLBufferDataFn> fBufferData;
93 GrGLFunction<GrGLBufferSubDataFn> fBufferSubData;
94 GrGLFunction<GrGLCheckFramebufferStatusFn> fCheckFramebufferStatus;
95 GrGLFunction<GrGLClearFn> fClear;
96 GrGLFunction<GrGLClearColorFn> fClearColor;
97 GrGLFunction<GrGLClearStencilFn> fClearStencil;
98 GrGLFunction<GrGLClearTexImageFn> fClearTexImage;
99 GrGLFunction<GrGLClearTexSubImageFn> fClearTexSubImage;
100 GrGLFunction<GrGLColorMaskFn> fColorMask;
101 GrGLFunction<GrGLCompileShaderFn> fCompileShader;
102 GrGLFunction<GrGLCompressedTexImage2DFn> fCompressedTexImage2D;
103 GrGLFunction<GrGLCompressedTexSubImage2DFn> fCompressedTexSubImage2D;
104 GrGLFunction<GrGLCopyTexSubImage2DFn> fCopyTexSubImage2D;
105 GrGLFunction<GrGLCreateProgramFn> fCreateProgram;
106 GrGLFunction<GrGLCreateShaderFn> fCreateShader;
107 GrGLFunction<GrGLCullFaceFn> fCullFace;
108 GrGLFunction<GrGLDeleteBuffersFn> fDeleteBuffers;
109 GrGLFunction<GrGLDeleteFramebuffersFn> fDeleteFramebuffers;
110 GrGLFunction<GrGLDeleteProgramFn> fDeleteProgram;
111 GrGLFunction<GrGLDeleteQueriesFn> fDeleteQueries;
112 GrGLFunction<GrGLDeleteRenderbuffersFn> fDeleteRenderbuffers;
Brian Salomona2a94a42018-10-16 10:54:10 -0400113 GrGLFunction<GrGLDeleteSamplersFn> fDeleteSamplers;
Brian Salomon2424ec42018-08-24 10:26:42 -0400114 GrGLFunction<GrGLDeleteShaderFn> fDeleteShader;
115 GrGLFunction<GrGLDeleteTexturesFn> fDeleteTextures;
116 GrGLFunction<GrGLDeleteVertexArraysFn> fDeleteVertexArrays;
117 GrGLFunction<GrGLDepthMaskFn> fDepthMask;
118 GrGLFunction<GrGLDisableFn> fDisable;
119 GrGLFunction<GrGLDisableVertexAttribArrayFn> fDisableVertexAttribArray;
120 GrGLFunction<GrGLDrawArraysFn> fDrawArrays;
121 GrGLFunction<GrGLDrawArraysIndirectFn> fDrawArraysIndirect;
122 GrGLFunction<GrGLDrawArraysInstancedFn> fDrawArraysInstanced;
123 GrGLFunction<GrGLDrawBufferFn> fDrawBuffer;
124 GrGLFunction<GrGLDrawBuffersFn> fDrawBuffers;
125 GrGLFunction<GrGLDrawElementsFn> fDrawElements;
126 GrGLFunction<GrGLDrawElementsIndirectFn> fDrawElementsIndirect;
127 GrGLFunction<GrGLDrawElementsInstancedFn> fDrawElementsInstanced;
128 GrGLFunction<GrGLDrawRangeElementsFn> fDrawRangeElements;
129 GrGLFunction<GrGLEnableFn> fEnable;
130 GrGLFunction<GrGLEnableVertexAttribArrayFn> fEnableVertexAttribArray;
131 GrGLFunction<GrGLEndQueryFn> fEndQuery;
132 GrGLFunction<GrGLFinishFn> fFinish;
133 GrGLFunction<GrGLFlushFn> fFlush;
134 GrGLFunction<GrGLFlushMappedBufferRangeFn> fFlushMappedBufferRange;
135 GrGLFunction<GrGLFramebufferRenderbufferFn> fFramebufferRenderbuffer;
136 GrGLFunction<GrGLFramebufferTexture2DFn> fFramebufferTexture2D;
137 GrGLFunction<GrGLFramebufferTexture2DMultisampleFn> fFramebufferTexture2DMultisample;
138 GrGLFunction<GrGLFrontFaceFn> fFrontFace;
139 GrGLFunction<GrGLGenBuffersFn> fGenBuffers;
140 GrGLFunction<GrGLGenFramebuffersFn> fGenFramebuffers;
141 GrGLFunction<GrGLGenerateMipmapFn> fGenerateMipmap;
142 GrGLFunction<GrGLGenQueriesFn> fGenQueries;
143 GrGLFunction<GrGLGenRenderbuffersFn> fGenRenderbuffers;
Brian Salomona2a94a42018-10-16 10:54:10 -0400144 GrGLFunction<GrGLGenSamplersFn> fGenSamplers;
Brian Salomon2424ec42018-08-24 10:26:42 -0400145 GrGLFunction<GrGLGenTexturesFn> fGenTextures;
146 GrGLFunction<GrGLGenVertexArraysFn> fGenVertexArrays;
147 GrGLFunction<GrGLGetBufferParameterivFn> fGetBufferParameteriv;
148 GrGLFunction<GrGLGetErrorFn> fGetError;
149 GrGLFunction<GrGLGetFramebufferAttachmentParameterivFn> fGetFramebufferAttachmentParameteriv;
150 GrGLFunction<GrGLGetIntegervFn> fGetIntegerv;
151 GrGLFunction<GrGLGetMultisamplefvFn> fGetMultisamplefv;
152 GrGLFunction<GrGLGetProgramBinaryFn> fGetProgramBinary;
153 GrGLFunction<GrGLGetProgramInfoLogFn> fGetProgramInfoLog;
154 GrGLFunction<GrGLGetProgramivFn> fGetProgramiv;
155 GrGLFunction<GrGLGetQueryObjecti64vFn> fGetQueryObjecti64v;
156 GrGLFunction<GrGLGetQueryObjectivFn> fGetQueryObjectiv;
157 GrGLFunction<GrGLGetQueryObjectui64vFn> fGetQueryObjectui64v;
158 GrGLFunction<GrGLGetQueryObjectuivFn> fGetQueryObjectuiv;
159 GrGLFunction<GrGLGetQueryivFn> fGetQueryiv;
160 GrGLFunction<GrGLGetRenderbufferParameterivFn> fGetRenderbufferParameteriv;
161 GrGLFunction<GrGLGetShaderInfoLogFn> fGetShaderInfoLog;
162 GrGLFunction<GrGLGetShaderivFn> fGetShaderiv;
163 GrGLFunction<GrGLGetShaderPrecisionFormatFn> fGetShaderPrecisionFormat;
164 GrGLFunction<GrGLGetStringFn> fGetString;
165 GrGLFunction<GrGLGetStringiFn> fGetStringi;
166 GrGLFunction<GrGLGetTexLevelParameterivFn> fGetTexLevelParameteriv;
167 GrGLFunction<GrGLGetUniformLocationFn> fGetUniformLocation;
168 GrGLFunction<GrGLInsertEventMarkerFn> fInsertEventMarker;
169 GrGLFunction<GrGLInvalidateBufferDataFn> fInvalidateBufferData;
170 GrGLFunction<GrGLInvalidateBufferSubDataFn> fInvalidateBufferSubData;
171 GrGLFunction<GrGLInvalidateFramebufferFn> fInvalidateFramebuffer;
172 GrGLFunction<GrGLInvalidateSubFramebufferFn> fInvalidateSubFramebuffer;
173 GrGLFunction<GrGLInvalidateTexImageFn> fInvalidateTexImage;
174 GrGLFunction<GrGLInvalidateTexSubImageFn> fInvalidateTexSubImage;
175 GrGLFunction<GrGLIsTextureFn> fIsTexture;
176 GrGLFunction<GrGLLineWidthFn> fLineWidth;
177 GrGLFunction<GrGLLinkProgramFn> fLinkProgram;
178 GrGLFunction<GrGLProgramBinaryFn> fProgramBinary;
179 GrGLFunction<GrGLProgramParameteriFn> fProgramParameteri;
180 GrGLFunction<GrGLMapBufferFn> fMapBuffer;
181 GrGLFunction<GrGLMapBufferRangeFn> fMapBufferRange;
182 GrGLFunction<GrGLMapBufferSubDataFn> fMapBufferSubData;
183 GrGLFunction<GrGLMapTexSubImage2DFn> fMapTexSubImage2D;
184 GrGLFunction<GrGLMultiDrawArraysIndirectFn> fMultiDrawArraysIndirect;
185 GrGLFunction<GrGLMultiDrawElementsIndirectFn> fMultiDrawElementsIndirect;
186 GrGLFunction<GrGLPixelStoreiFn> fPixelStorei;
187 GrGLFunction<GrGLPolygonModeFn> fPolygonMode;
188 GrGLFunction<GrGLPopGroupMarkerFn> fPopGroupMarker;
189 GrGLFunction<GrGLPushGroupMarkerFn> fPushGroupMarker;
190 GrGLFunction<GrGLQueryCounterFn> fQueryCounter;
Brian Salomon2424ec42018-08-24 10:26:42 -0400191 GrGLFunction<GrGLReadBufferFn> fReadBuffer;
192 GrGLFunction<GrGLReadPixelsFn> fReadPixels;
193 GrGLFunction<GrGLRenderbufferStorageFn> fRenderbufferStorage;
commit-bot@chromium.orga8e5a062013-09-05 23:44:09 +0000194
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000195 // On OpenGL ES there are multiple incompatible extensions that add support for MSAA
196 // and ES3 adds MSAA support to the standard. On an ES3 driver we may still use the
197 // older extensions for performance reasons or due to ES3 driver bugs. We want the function
198 // that creates the GrGLInterface to provide all available functions and internally
199 // we will select among them. They all have a method called glRenderbufferStorageMultisample*.
200 // So we have separate function pointers for GL_IMG/EXT_multisampled_to_texture,
201 // GL_CHROMIUM/ANGLE_framebuffer_multisample/ES3, and GL_APPLE_framebuffer_multisample
202 // variations.
203 //
204 // If a driver supports multiple GL_ARB_framebuffer_multisample-style extensions then we will
205 // assume the function pointers for the standard (or equivalent GL_ARB) version have
206 // been preferred over GL_EXT, GL_CHROMIUM, or GL_ANGLE variations that have reduced
207 // functionality.
commit-bot@chromium.orga8e5a062013-09-05 23:44:09 +0000208
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000209 // GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled_render_to_texture
Brian Salomon2424ec42018-08-24 10:26:42 -0400210 GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisampleES2EXT;
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000211 // GL_APPLE_framebuffer_multisample
Brian Salomon2424ec42018-08-24 10:26:42 -0400212 GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisampleES2APPLE;
commit-bot@chromium.org92b78842014-01-16 20:49:46 +0000213
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000214 // This is used to store the pointer for GL_ARB/EXT/ANGLE/CHROMIUM_framebuffer_multisample or
215 // the standard function in ES3+ or GL 3.0+.
Brian Salomon2424ec42018-08-24 10:26:42 -0400216 GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisample;
commit-bot@chromium.orga8e5a062013-09-05 23:44:09 +0000217
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000218 // Pointer to BindUniformLocationCHROMIUM from the GL_CHROMIUM_bind_uniform_location extension.
Brian Salomon2424ec42018-08-24 10:26:42 -0400219 GrGLFunction<GrGLBindUniformLocationFn> fBindUniformLocation;
commit-bot@chromium.orgd3baf202013-11-07 22:06:08 +0000220
Brian Salomon2424ec42018-08-24 10:26:42 -0400221 GrGLFunction<GrGLResolveMultisampleFramebufferFn> fResolveMultisampleFramebuffer;
Brian Salomona2a94a42018-10-16 10:54:10 -0400222 GrGLFunction<GrGLSamplerParameteriFn> fSamplerParameteri;
223 GrGLFunction<GrGLSamplerParameterivFn> fSamplerParameteriv;
Brian Salomon2424ec42018-08-24 10:26:42 -0400224 GrGLFunction<GrGLScissorFn> fScissor;
225 GrGLFunction<GrGLShaderSourceFn> fShaderSource;
226 GrGLFunction<GrGLStencilFuncFn> fStencilFunc;
227 GrGLFunction<GrGLStencilFuncSeparateFn> fStencilFuncSeparate;
228 GrGLFunction<GrGLStencilMaskFn> fStencilMask;
229 GrGLFunction<GrGLStencilMaskSeparateFn> fStencilMaskSeparate;
230 GrGLFunction<GrGLStencilOpFn> fStencilOp;
231 GrGLFunction<GrGLStencilOpSeparateFn> fStencilOpSeparate;
232 GrGLFunction<GrGLTexBufferFn> fTexBuffer;
233 GrGLFunction<GrGLTexBufferRangeFn> fTexBufferRange;
234 GrGLFunction<GrGLTexImage2DFn> fTexImage2D;
Brian Salomon0a7e58f2018-12-07 19:20:19 -0500235 GrGLFunction<GrGLTexParameterfFn> fTexParameterf;
236 GrGLFunction<GrGLTexParameterfvFn> fTexParameterfv;
Brian Salomon2424ec42018-08-24 10:26:42 -0400237 GrGLFunction<GrGLTexParameteriFn> fTexParameteri;
238 GrGLFunction<GrGLTexParameterivFn> fTexParameteriv;
239 GrGLFunction<GrGLTexSubImage2DFn> fTexSubImage2D;
240 GrGLFunction<GrGLTexStorage2DFn> fTexStorage2D;
241 GrGLFunction<GrGLTextureBarrierFn> fTextureBarrier;
242 GrGLFunction<GrGLDiscardFramebufferFn> fDiscardFramebuffer;
243 GrGLFunction<GrGLUniform1fFn> fUniform1f;
244 GrGLFunction<GrGLUniform1iFn> fUniform1i;
245 GrGLFunction<GrGLUniform1fvFn> fUniform1fv;
246 GrGLFunction<GrGLUniform1ivFn> fUniform1iv;
247 GrGLFunction<GrGLUniform2fFn> fUniform2f;
248 GrGLFunction<GrGLUniform2iFn> fUniform2i;
249 GrGLFunction<GrGLUniform2fvFn> fUniform2fv;
250 GrGLFunction<GrGLUniform2ivFn> fUniform2iv;
251 GrGLFunction<GrGLUniform3fFn> fUniform3f;
252 GrGLFunction<GrGLUniform3iFn> fUniform3i;
253 GrGLFunction<GrGLUniform3fvFn> fUniform3fv;
254 GrGLFunction<GrGLUniform3ivFn> fUniform3iv;
255 GrGLFunction<GrGLUniform4fFn> fUniform4f;
256 GrGLFunction<GrGLUniform4iFn> fUniform4i;
257 GrGLFunction<GrGLUniform4fvFn> fUniform4fv;
258 GrGLFunction<GrGLUniform4ivFn> fUniform4iv;
259 GrGLFunction<GrGLUniformMatrix2fvFn> fUniformMatrix2fv;
260 GrGLFunction<GrGLUniformMatrix3fvFn> fUniformMatrix3fv;
261 GrGLFunction<GrGLUniformMatrix4fvFn> fUniformMatrix4fv;
262 GrGLFunction<GrGLUnmapBufferFn> fUnmapBuffer;
263 GrGLFunction<GrGLUnmapBufferSubDataFn> fUnmapBufferSubData;
264 GrGLFunction<GrGLUnmapTexSubImage2DFn> fUnmapTexSubImage2D;
265 GrGLFunction<GrGLUseProgramFn> fUseProgram;
266 GrGLFunction<GrGLVertexAttrib1fFn> fVertexAttrib1f;
267 GrGLFunction<GrGLVertexAttrib2fvFn> fVertexAttrib2fv;
268 GrGLFunction<GrGLVertexAttrib3fvFn> fVertexAttrib3fv;
269 GrGLFunction<GrGLVertexAttrib4fvFn> fVertexAttrib4fv;
270 GrGLFunction<GrGLVertexAttribDivisorFn> fVertexAttribDivisor;
271 GrGLFunction<GrGLVertexAttribIPointerFn> fVertexAttribIPointer;
272 GrGLFunction<GrGLVertexAttribPointerFn> fVertexAttribPointer;
273 GrGLFunction<GrGLViewportFn> fViewport;
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000274
cdalton626e1ff2015-06-12 13:56:46 -0700275 /* GL_NV_path_rendering */
Brian Salomon2424ec42018-08-24 10:26:42 -0400276 GrGLFunction<GrGLMatrixLoadfFn> fMatrixLoadf;
277 GrGLFunction<GrGLMatrixLoadIdentityFn> fMatrixLoadIdentity;
278 GrGLFunction<GrGLGetProgramResourceLocationFn> fGetProgramResourceLocation;
279 GrGLFunction<GrGLPathCommandsFn> fPathCommands;
280 GrGLFunction<GrGLPathParameteriFn> fPathParameteri;
281 GrGLFunction<GrGLPathParameterfFn> fPathParameterf;
282 GrGLFunction<GrGLGenPathsFn> fGenPaths;
283 GrGLFunction<GrGLDeletePathsFn> fDeletePaths;
284 GrGLFunction<GrGLIsPathFn> fIsPath;
285 GrGLFunction<GrGLPathStencilFuncFn> fPathStencilFunc;
286 GrGLFunction<GrGLStencilFillPathFn> fStencilFillPath;
287 GrGLFunction<GrGLStencilStrokePathFn> fStencilStrokePath;
288 GrGLFunction<GrGLStencilFillPathInstancedFn> fStencilFillPathInstanced;
289 GrGLFunction<GrGLStencilStrokePathInstancedFn> fStencilStrokePathInstanced;
290 GrGLFunction<GrGLCoverFillPathFn> fCoverFillPath;
291 GrGLFunction<GrGLCoverStrokePathFn> fCoverStrokePath;
292 GrGLFunction<GrGLCoverFillPathInstancedFn> fCoverFillPathInstanced;
293 GrGLFunction<GrGLCoverStrokePathInstancedFn> fCoverStrokePathInstanced;
cdaltonc7103a12014-08-11 14:05:05 -0700294 // NV_path_rendering v1.2
Brian Salomon2424ec42018-08-24 10:26:42 -0400295 GrGLFunction<GrGLStencilThenCoverFillPathFn> fStencilThenCoverFillPath;
296 GrGLFunction<GrGLStencilThenCoverStrokePathFn> fStencilThenCoverStrokePath;
297 GrGLFunction<GrGLStencilThenCoverFillPathInstancedFn> fStencilThenCoverFillPathInstanced;
298 GrGLFunction<GrGLStencilThenCoverStrokePathInstancedFn> fStencilThenCoverStrokePathInstanced;
cdaltonc7103a12014-08-11 14:05:05 -0700299 // NV_path_rendering v1.3
Brian Salomon2424ec42018-08-24 10:26:42 -0400300 GrGLFunction<GrGLProgramPathFragmentInputGenFn> fProgramPathFragmentInputGen;
kkinnunen6bb6d402015-07-14 10:59:23 -0700301 // CHROMIUM_path_rendering
Brian Salomon2424ec42018-08-24 10:26:42 -0400302 GrGLFunction<GrGLBindFragmentInputLocationFn> fBindFragmentInputLocation;
cdalton626e1ff2015-06-12 13:56:46 -0700303
304 /* NV_framebuffer_mixed_samples */
Brian Salomon2424ec42018-08-24 10:26:42 -0400305 GrGLFunction<GrGLCoverageModulationFn> fCoverageModulation;
cdalton626e1ff2015-06-12 13:56:46 -0700306
jvanverth84741b32016-09-30 08:39:02 -0700307 /* ARB_sync */
Brian Salomon2424ec42018-08-24 10:26:42 -0400308 GrGLFunction<GrGLFenceSyncFn> fFenceSync;
309 GrGLFunction<GrGLIsSyncFn> fIsSync;
310 GrGLFunction<GrGLClientWaitSyncFn> fClientWaitSync;
311 GrGLFunction<GrGLWaitSyncFn> fWaitSync;
312 GrGLFunction<GrGLDeleteSyncFn> fDeleteSync;
jvanverth84741b32016-09-30 08:39:02 -0700313
Greg Daniel81e7bf82017-07-19 14:47:42 -0400314 /* ARB_internalforamt_query */
Brian Salomon2424ec42018-08-24 10:26:42 -0400315 GrGLFunction<GrGLGetInternalformativFn> fGetInternalformativ;
Greg Daniel81e7bf82017-07-19 14:47:42 -0400316
cdalton626e1ff2015-06-12 13:56:46 -0700317 /* KHR_debug */
Brian Salomon2424ec42018-08-24 10:26:42 -0400318 GrGLFunction<GrGLDebugMessageControlFn> fDebugMessageControl;
319 GrGLFunction<GrGLDebugMessageInsertFn> fDebugMessageInsert;
320 GrGLFunction<GrGLDebugMessageCallbackFn> fDebugMessageCallback;
321 GrGLFunction<GrGLGetDebugMessageLogFn> fGetDebugMessageLog;
322 GrGLFunction<GrGLPushDebugGroupFn> fPushDebugGroup;
323 GrGLFunction<GrGLPopDebugGroupFn> fPopDebugGroup;
324 GrGLFunction<GrGLObjectLabelFn> fObjectLabel;
bsalomonb1a32ad2015-11-16 06:48:44 -0800325
csmartdalton9bc11872016-08-09 12:42:47 -0700326 /* EXT_window_rectangles */
Brian Salomon2424ec42018-08-24 10:26:42 -0400327 GrGLFunction<GrGLWindowRectanglesFn> fWindowRectangles;
commit-bot@chromium.orgc72425a2014-01-21 16:09:18 +0000328 } fFunctions;
329
Robert Phillips752e08b2018-06-22 09:48:38 -0400330#if GR_TEST_UTILS
bsalomon944bcf02014-07-29 08:01:52 -0700331 // This exists for internal testing.
Robert Phillips752e08b2018-06-22 09:48:38 -0400332 virtual void abandon() const;
333#endif
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000334};
twiz@google.com59a190b2011-03-14 21:23:01 +0000335
336#endif