2011-07-28 14:26:00 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2011 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
2011-03-14 21:23:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GrGLInterface_DEFINED
|
|
|
|
#define GrGLInterface_DEFINED
|
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "include/core/SkRefCnt.h"
|
|
|
|
#include "include/gpu/gl/GrGLExtensions.h"
|
|
|
|
#include "include/gpu/gl/GrGLFunctions.h"
|
2011-03-14 21:23:01 +00:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2017-12-11 15:06:31 +00:00
|
|
|
typedef void(*GrGLFuncPtr)();
|
|
|
|
struct GrGLInterface;
|
|
|
|
|
|
|
|
|
2011-08-19 13:28:54 +00:00
|
|
|
/**
|
|
|
|
* Rather than depend on platform-specific GL headers and libraries, we require
|
|
|
|
* the client to provide a struct of GL function pointers. This struct can be
|
2018-04-06 13:18:00 +00:00
|
|
|
* specified per-GrContext as a parameter to GrContext::MakeGL. If no interface is
|
|
|
|
* passed to MakeGL then a default GL interface is created using GrGLMakeNativeInterface().
|
|
|
|
* If this returns nullptr then GrContext::MakeGL() will fail.
|
2011-08-19 13:28:54 +00:00
|
|
|
*
|
2018-04-06 13:18:00 +00:00
|
|
|
* The implementation of GrGLMakeNativeInterface is platform-specific. Several
|
|
|
|
* implementations have been provided (for GLX, WGL, EGL, etc), along with an
|
|
|
|
* implementation that simply returns nullptr. Clients should select the most
|
|
|
|
* appropriate one to build.
|
2011-10-24 21:17:53 +00:00
|
|
|
*/
|
2017-12-11 15:06:31 +00:00
|
|
|
SK_API sk_sp<const GrGLInterface> GrGLMakeNativeInterface();
|
|
|
|
// Deprecated alternative to GrGLMakeNativeInterface().
|
2015-09-21 15:22:19 +00:00
|
|
|
SK_API const GrGLInterface* GrGLCreateNativeInterface();
|
2011-10-19 20:43:20 +00:00
|
|
|
|
2014-01-24 20:49:44 +00:00
|
|
|
/**
|
2012-05-07 21:45:48 +00:00
|
|
|
* GrContext uses the following interface to make all calls into OpenGL. When a
|
|
|
|
* GrContext is created it is given a GrGLInterface. The interface's function
|
|
|
|
* pointers must be valid for the OpenGL context associated with the GrContext.
|
|
|
|
* On some platforms, such as Windows, function pointers for OpenGL extensions
|
|
|
|
* may vary between OpenGL contexts. So the caller must be careful to use a
|
|
|
|
* GrGLInterface initialized for the correct context. All functions that should
|
|
|
|
* be available based on the OpenGL's version and extension string must be
|
|
|
|
* non-NULL or GrContext creation will fail. This can be tested with the
|
|
|
|
* validate() method when the OpenGL context has been made current.
|
2011-05-04 12:35:39 +00:00
|
|
|
*/
|
2013-09-09 13:38:37 +00:00
|
|
|
struct SK_API GrGLInterface : public SkRefCnt {
|
2012-03-29 21:04:52 +00:00
|
|
|
private:
|
2013-09-09 13:38:37 +00:00
|
|
|
typedef SkRefCnt INHERITED;
|
2012-06-21 20:25:03 +00:00
|
|
|
|
2020-06-24 14:19:52 +00:00
|
|
|
#if GR_GL_CHECK_ERROR
|
|
|
|
// This is here to avoid having our debug code that checks for a GL error after most GL calls
|
|
|
|
// accidentally swallow an OOM that should be reported.
|
|
|
|
mutable bool fOOMed = false;
|
|
|
|
bool fSuppressErrorLogging = false;
|
|
|
|
#endif
|
|
|
|
|
2012-03-29 21:04:52 +00:00
|
|
|
public:
|
2011-08-19 13:28:54 +00:00
|
|
|
GrGLInterface();
|
|
|
|
|
2014-01-16 16:35:09 +00:00
|
|
|
// Validates that the GrGLInterface supports its advertised standard. This means the necessary
|
|
|
|
// function pointers have been initialized for both the GL version and any advertised
|
|
|
|
// extensions.
|
|
|
|
bool validate() const;
|
2012-02-10 20:05:18 +00:00
|
|
|
|
2020-06-24 14:19:52 +00:00
|
|
|
#if GR_GL_CHECK_ERROR
|
|
|
|
GrGLenum checkError(const char* location, const char* call) const;
|
|
|
|
bool checkAndResetOOMed() const;
|
|
|
|
void suppressErrorLogging();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if GR_TEST_UTILS
|
|
|
|
GrGLInterface(const GrGLInterface& that)
|
|
|
|
: fStandard(that.fStandard)
|
|
|
|
, fExtensions(that.fExtensions)
|
|
|
|
, fFunctions(that.fFunctions) {}
|
|
|
|
#endif
|
|
|
|
|
2014-01-16 16:35:09 +00:00
|
|
|
// Indicates the type of GL implementation
|
|
|
|
union {
|
|
|
|
GrGLStandard fStandard;
|
|
|
|
GrGLStandard fBindingsExported; // Legacy name, will be remove when Chromium is updated.
|
|
|
|
};
|
2011-03-18 20:41:44 +00:00
|
|
|
|
2014-01-17 15:05:38 +00:00
|
|
|
GrGLExtensions fExtensions;
|
|
|
|
|
2014-02-28 20:28:50 +00:00
|
|
|
bool hasExtension(const char ext[]) const { return fExtensions.has(ext); }
|
2014-01-17 15:05:38 +00:00
|
|
|
|
2014-01-21 16:09:18 +00:00
|
|
|
/**
|
|
|
|
* The function pointers are in a struct so that we can have a compiler generated assignment
|
|
|
|
* operator.
|
|
|
|
*/
|
|
|
|
struct Functions {
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLActiveTextureFn> fActiveTexture;
|
|
|
|
GrGLFunction<GrGLAttachShaderFn> fAttachShader;
|
|
|
|
GrGLFunction<GrGLBeginQueryFn> fBeginQuery;
|
|
|
|
GrGLFunction<GrGLBindAttribLocationFn> fBindAttribLocation;
|
|
|
|
GrGLFunction<GrGLBindBufferFn> fBindBuffer;
|
|
|
|
GrGLFunction<GrGLBindFragDataLocationFn> fBindFragDataLocation;
|
|
|
|
GrGLFunction<GrGLBindFragDataLocationIndexedFn> fBindFragDataLocationIndexed;
|
|
|
|
GrGLFunction<GrGLBindFramebufferFn> fBindFramebuffer;
|
|
|
|
GrGLFunction<GrGLBindRenderbufferFn> fBindRenderbuffer;
|
2018-10-16 14:54:10 +00:00
|
|
|
GrGLFunction<GrGLBindSamplerFn> fBindSampler;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLBindTextureFn> fBindTexture;
|
|
|
|
GrGLFunction<GrGLBindVertexArrayFn> fBindVertexArray;
|
|
|
|
GrGLFunction<GrGLBlendBarrierFn> fBlendBarrier;
|
|
|
|
GrGLFunction<GrGLBlendColorFn> fBlendColor;
|
|
|
|
GrGLFunction<GrGLBlendEquationFn> fBlendEquation;
|
|
|
|
GrGLFunction<GrGLBlendFuncFn> fBlendFunc;
|
|
|
|
GrGLFunction<GrGLBlitFramebufferFn> fBlitFramebuffer;
|
|
|
|
GrGLFunction<GrGLBufferDataFn> fBufferData;
|
|
|
|
GrGLFunction<GrGLBufferSubDataFn> fBufferSubData;
|
|
|
|
GrGLFunction<GrGLCheckFramebufferStatusFn> fCheckFramebufferStatus;
|
|
|
|
GrGLFunction<GrGLClearFn> fClear;
|
|
|
|
GrGLFunction<GrGLClearColorFn> fClearColor;
|
|
|
|
GrGLFunction<GrGLClearStencilFn> fClearStencil;
|
|
|
|
GrGLFunction<GrGLClearTexImageFn> fClearTexImage;
|
|
|
|
GrGLFunction<GrGLClearTexSubImageFn> fClearTexSubImage;
|
|
|
|
GrGLFunction<GrGLColorMaskFn> fColorMask;
|
|
|
|
GrGLFunction<GrGLCompileShaderFn> fCompileShader;
|
|
|
|
GrGLFunction<GrGLCompressedTexImage2DFn> fCompressedTexImage2D;
|
|
|
|
GrGLFunction<GrGLCompressedTexSubImage2DFn> fCompressedTexSubImage2D;
|
|
|
|
GrGLFunction<GrGLCopyTexSubImage2DFn> fCopyTexSubImage2D;
|
|
|
|
GrGLFunction<GrGLCreateProgramFn> fCreateProgram;
|
|
|
|
GrGLFunction<GrGLCreateShaderFn> fCreateShader;
|
|
|
|
GrGLFunction<GrGLCullFaceFn> fCullFace;
|
|
|
|
GrGLFunction<GrGLDeleteBuffersFn> fDeleteBuffers;
|
2020-01-22 14:59:56 +00:00
|
|
|
GrGLFunction<GrGLDeleteFencesFn> fDeleteFences;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLDeleteFramebuffersFn> fDeleteFramebuffers;
|
|
|
|
GrGLFunction<GrGLDeleteProgramFn> fDeleteProgram;
|
|
|
|
GrGLFunction<GrGLDeleteQueriesFn> fDeleteQueries;
|
|
|
|
GrGLFunction<GrGLDeleteRenderbuffersFn> fDeleteRenderbuffers;
|
2018-10-16 14:54:10 +00:00
|
|
|
GrGLFunction<GrGLDeleteSamplersFn> fDeleteSamplers;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLDeleteShaderFn> fDeleteShader;
|
|
|
|
GrGLFunction<GrGLDeleteTexturesFn> fDeleteTextures;
|
|
|
|
GrGLFunction<GrGLDeleteVertexArraysFn> fDeleteVertexArrays;
|
|
|
|
GrGLFunction<GrGLDepthMaskFn> fDepthMask;
|
|
|
|
GrGLFunction<GrGLDisableFn> fDisable;
|
|
|
|
GrGLFunction<GrGLDisableVertexAttribArrayFn> fDisableVertexAttribArray;
|
|
|
|
GrGLFunction<GrGLDrawArraysFn> fDrawArrays;
|
|
|
|
GrGLFunction<GrGLDrawArraysIndirectFn> fDrawArraysIndirect;
|
|
|
|
GrGLFunction<GrGLDrawArraysInstancedFn> fDrawArraysInstanced;
|
|
|
|
GrGLFunction<GrGLDrawBufferFn> fDrawBuffer;
|
|
|
|
GrGLFunction<GrGLDrawBuffersFn> fDrawBuffers;
|
|
|
|
GrGLFunction<GrGLDrawElementsFn> fDrawElements;
|
|
|
|
GrGLFunction<GrGLDrawElementsIndirectFn> fDrawElementsIndirect;
|
|
|
|
GrGLFunction<GrGLDrawElementsInstancedFn> fDrawElementsInstanced;
|
|
|
|
GrGLFunction<GrGLDrawRangeElementsFn> fDrawRangeElements;
|
|
|
|
GrGLFunction<GrGLEnableFn> fEnable;
|
|
|
|
GrGLFunction<GrGLEnableVertexAttribArrayFn> fEnableVertexAttribArray;
|
|
|
|
GrGLFunction<GrGLEndQueryFn> fEndQuery;
|
|
|
|
GrGLFunction<GrGLFinishFn> fFinish;
|
2020-01-22 14:59:56 +00:00
|
|
|
GrGLFunction<GrGLFinishFenceFn> fFinishFence;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLFlushFn> fFlush;
|
|
|
|
GrGLFunction<GrGLFlushMappedBufferRangeFn> fFlushMappedBufferRange;
|
|
|
|
GrGLFunction<GrGLFramebufferRenderbufferFn> fFramebufferRenderbuffer;
|
|
|
|
GrGLFunction<GrGLFramebufferTexture2DFn> fFramebufferTexture2D;
|
|
|
|
GrGLFunction<GrGLFramebufferTexture2DMultisampleFn> fFramebufferTexture2DMultisample;
|
|
|
|
GrGLFunction<GrGLFrontFaceFn> fFrontFace;
|
|
|
|
GrGLFunction<GrGLGenBuffersFn> fGenBuffers;
|
2020-01-22 14:59:56 +00:00
|
|
|
GrGLFunction<GrGLGenFencesFn> fGenFences;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLGenFramebuffersFn> fGenFramebuffers;
|
|
|
|
GrGLFunction<GrGLGenerateMipmapFn> fGenerateMipmap;
|
|
|
|
GrGLFunction<GrGLGenQueriesFn> fGenQueries;
|
|
|
|
GrGLFunction<GrGLGenRenderbuffersFn> fGenRenderbuffers;
|
2018-10-16 14:54:10 +00:00
|
|
|
GrGLFunction<GrGLGenSamplersFn> fGenSamplers;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLGenTexturesFn> fGenTextures;
|
|
|
|
GrGLFunction<GrGLGenVertexArraysFn> fGenVertexArrays;
|
|
|
|
GrGLFunction<GrGLGetBufferParameterivFn> fGetBufferParameteriv;
|
|
|
|
GrGLFunction<GrGLGetErrorFn> fGetError;
|
|
|
|
GrGLFunction<GrGLGetFramebufferAttachmentParameterivFn> fGetFramebufferAttachmentParameteriv;
|
|
|
|
GrGLFunction<GrGLGetIntegervFn> fGetIntegerv;
|
|
|
|
GrGLFunction<GrGLGetMultisamplefvFn> fGetMultisamplefv;
|
|
|
|
GrGLFunction<GrGLGetProgramBinaryFn> fGetProgramBinary;
|
|
|
|
GrGLFunction<GrGLGetProgramInfoLogFn> fGetProgramInfoLog;
|
|
|
|
GrGLFunction<GrGLGetProgramivFn> fGetProgramiv;
|
|
|
|
GrGLFunction<GrGLGetQueryObjecti64vFn> fGetQueryObjecti64v;
|
|
|
|
GrGLFunction<GrGLGetQueryObjectivFn> fGetQueryObjectiv;
|
|
|
|
GrGLFunction<GrGLGetQueryObjectui64vFn> fGetQueryObjectui64v;
|
|
|
|
GrGLFunction<GrGLGetQueryObjectuivFn> fGetQueryObjectuiv;
|
|
|
|
GrGLFunction<GrGLGetQueryivFn> fGetQueryiv;
|
|
|
|
GrGLFunction<GrGLGetRenderbufferParameterivFn> fGetRenderbufferParameteriv;
|
|
|
|
GrGLFunction<GrGLGetShaderInfoLogFn> fGetShaderInfoLog;
|
|
|
|
GrGLFunction<GrGLGetShaderivFn> fGetShaderiv;
|
|
|
|
GrGLFunction<GrGLGetShaderPrecisionFormatFn> fGetShaderPrecisionFormat;
|
|
|
|
GrGLFunction<GrGLGetStringFn> fGetString;
|
|
|
|
GrGLFunction<GrGLGetStringiFn> fGetStringi;
|
|
|
|
GrGLFunction<GrGLGetTexLevelParameterivFn> fGetTexLevelParameteriv;
|
|
|
|
GrGLFunction<GrGLGetUniformLocationFn> fGetUniformLocation;
|
|
|
|
GrGLFunction<GrGLInsertEventMarkerFn> fInsertEventMarker;
|
|
|
|
GrGLFunction<GrGLInvalidateBufferDataFn> fInvalidateBufferData;
|
|
|
|
GrGLFunction<GrGLInvalidateBufferSubDataFn> fInvalidateBufferSubData;
|
|
|
|
GrGLFunction<GrGLInvalidateFramebufferFn> fInvalidateFramebuffer;
|
|
|
|
GrGLFunction<GrGLInvalidateSubFramebufferFn> fInvalidateSubFramebuffer;
|
|
|
|
GrGLFunction<GrGLInvalidateTexImageFn> fInvalidateTexImage;
|
|
|
|
GrGLFunction<GrGLInvalidateTexSubImageFn> fInvalidateTexSubImage;
|
|
|
|
GrGLFunction<GrGLIsTextureFn> fIsTexture;
|
|
|
|
GrGLFunction<GrGLLineWidthFn> fLineWidth;
|
|
|
|
GrGLFunction<GrGLLinkProgramFn> fLinkProgram;
|
|
|
|
GrGLFunction<GrGLProgramBinaryFn> fProgramBinary;
|
|
|
|
GrGLFunction<GrGLProgramParameteriFn> fProgramParameteri;
|
|
|
|
GrGLFunction<GrGLMapBufferFn> fMapBuffer;
|
|
|
|
GrGLFunction<GrGLMapBufferRangeFn> fMapBufferRange;
|
|
|
|
GrGLFunction<GrGLMapBufferSubDataFn> fMapBufferSubData;
|
|
|
|
GrGLFunction<GrGLMapTexSubImage2DFn> fMapTexSubImage2D;
|
2019-12-28 21:31:09 +00:00
|
|
|
GrGLFunction<GrGLMemoryBarrierFn> fMemoryBarrier;
|
2020-03-26 17:42:44 +00:00
|
|
|
GrGLFunction<GrGLDrawArraysInstancedBaseInstanceFn> fDrawArraysInstancedBaseInstance;
|
|
|
|
GrGLFunction<GrGLDrawElementsInstancedBaseVertexBaseInstanceFn> fDrawElementsInstancedBaseVertexBaseInstance;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLMultiDrawArraysIndirectFn> fMultiDrawArraysIndirect;
|
|
|
|
GrGLFunction<GrGLMultiDrawElementsIndirectFn> fMultiDrawElementsIndirect;
|
2019-12-27 21:56:38 +00:00
|
|
|
GrGLFunction<GrGLPatchParameteriFn> fPatchParameteri;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLPixelStoreiFn> fPixelStorei;
|
|
|
|
GrGLFunction<GrGLPolygonModeFn> fPolygonMode;
|
|
|
|
GrGLFunction<GrGLPopGroupMarkerFn> fPopGroupMarker;
|
|
|
|
GrGLFunction<GrGLPushGroupMarkerFn> fPushGroupMarker;
|
|
|
|
GrGLFunction<GrGLQueryCounterFn> fQueryCounter;
|
|
|
|
GrGLFunction<GrGLReadBufferFn> fReadBuffer;
|
|
|
|
GrGLFunction<GrGLReadPixelsFn> fReadPixels;
|
|
|
|
GrGLFunction<GrGLRenderbufferStorageFn> fRenderbufferStorage;
|
2014-01-21 16:09:18 +00:00
|
|
|
|
|
|
|
// On OpenGL ES there are multiple incompatible extensions that add support for MSAA
|
|
|
|
// and ES3 adds MSAA support to the standard. On an ES3 driver we may still use the
|
|
|
|
// older extensions for performance reasons or due to ES3 driver bugs. We want the function
|
|
|
|
// that creates the GrGLInterface to provide all available functions and internally
|
|
|
|
// we will select among them. They all have a method called glRenderbufferStorageMultisample*.
|
|
|
|
// So we have separate function pointers for GL_IMG/EXT_multisampled_to_texture,
|
|
|
|
// GL_CHROMIUM/ANGLE_framebuffer_multisample/ES3, and GL_APPLE_framebuffer_multisample
|
|
|
|
// variations.
|
|
|
|
//
|
|
|
|
// If a driver supports multiple GL_ARB_framebuffer_multisample-style extensions then we will
|
|
|
|
// assume the function pointers for the standard (or equivalent GL_ARB) version have
|
|
|
|
// been preferred over GL_EXT, GL_CHROMIUM, or GL_ANGLE variations that have reduced
|
|
|
|
// functionality.
|
|
|
|
|
|
|
|
// GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled_render_to_texture
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisampleES2EXT;
|
2014-01-21 16:09:18 +00:00
|
|
|
// GL_APPLE_framebuffer_multisample
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisampleES2APPLE;
|
2014-01-21 16:09:18 +00:00
|
|
|
|
|
|
|
// This is used to store the pointer for GL_ARB/EXT/ANGLE/CHROMIUM_framebuffer_multisample or
|
|
|
|
// the standard function in ES3+ or GL 3.0+.
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLRenderbufferStorageMultisampleFn> fRenderbufferStorageMultisample;
|
2014-01-21 16:09:18 +00:00
|
|
|
|
|
|
|
// Pointer to BindUniformLocationCHROMIUM from the GL_CHROMIUM_bind_uniform_location extension.
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLBindUniformLocationFn> fBindUniformLocation;
|
2016-02-08 15:22:17 +00:00
|
|
|
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLResolveMultisampleFramebufferFn> fResolveMultisampleFramebuffer;
|
2018-10-16 14:54:10 +00:00
|
|
|
GrGLFunction<GrGLSamplerParameteriFn> fSamplerParameteri;
|
|
|
|
GrGLFunction<GrGLSamplerParameterivFn> fSamplerParameteriv;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLScissorFn> fScissor;
|
2020-01-22 14:59:56 +00:00
|
|
|
GrGLFunction<GrGLSetFenceFn> fSetFence;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLShaderSourceFn> fShaderSource;
|
|
|
|
GrGLFunction<GrGLStencilFuncFn> fStencilFunc;
|
|
|
|
GrGLFunction<GrGLStencilFuncSeparateFn> fStencilFuncSeparate;
|
|
|
|
GrGLFunction<GrGLStencilMaskFn> fStencilMask;
|
|
|
|
GrGLFunction<GrGLStencilMaskSeparateFn> fStencilMaskSeparate;
|
|
|
|
GrGLFunction<GrGLStencilOpFn> fStencilOp;
|
|
|
|
GrGLFunction<GrGLStencilOpSeparateFn> fStencilOpSeparate;
|
2020-01-22 14:59:56 +00:00
|
|
|
GrGLFunction<GrGLTestFenceFn> fTestFence;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLTexBufferFn> fTexBuffer;
|
|
|
|
GrGLFunction<GrGLTexBufferRangeFn> fTexBufferRange;
|
|
|
|
GrGLFunction<GrGLTexImage2DFn> fTexImage2D;
|
2018-12-08 00:20:19 +00:00
|
|
|
GrGLFunction<GrGLTexParameterfFn> fTexParameterf;
|
|
|
|
GrGLFunction<GrGLTexParameterfvFn> fTexParameterfv;
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLTexParameteriFn> fTexParameteri;
|
|
|
|
GrGLFunction<GrGLTexParameterivFn> fTexParameteriv;
|
|
|
|
GrGLFunction<GrGLTexSubImage2DFn> fTexSubImage2D;
|
|
|
|
GrGLFunction<GrGLTexStorage2DFn> fTexStorage2D;
|
|
|
|
GrGLFunction<GrGLTextureBarrierFn> fTextureBarrier;
|
|
|
|
GrGLFunction<GrGLDiscardFramebufferFn> fDiscardFramebuffer;
|
|
|
|
GrGLFunction<GrGLUniform1fFn> fUniform1f;
|
|
|
|
GrGLFunction<GrGLUniform1iFn> fUniform1i;
|
|
|
|
GrGLFunction<GrGLUniform1fvFn> fUniform1fv;
|
|
|
|
GrGLFunction<GrGLUniform1ivFn> fUniform1iv;
|
|
|
|
GrGLFunction<GrGLUniform2fFn> fUniform2f;
|
|
|
|
GrGLFunction<GrGLUniform2iFn> fUniform2i;
|
|
|
|
GrGLFunction<GrGLUniform2fvFn> fUniform2fv;
|
|
|
|
GrGLFunction<GrGLUniform2ivFn> fUniform2iv;
|
|
|
|
GrGLFunction<GrGLUniform3fFn> fUniform3f;
|
|
|
|
GrGLFunction<GrGLUniform3iFn> fUniform3i;
|
|
|
|
GrGLFunction<GrGLUniform3fvFn> fUniform3fv;
|
|
|
|
GrGLFunction<GrGLUniform3ivFn> fUniform3iv;
|
|
|
|
GrGLFunction<GrGLUniform4fFn> fUniform4f;
|
|
|
|
GrGLFunction<GrGLUniform4iFn> fUniform4i;
|
|
|
|
GrGLFunction<GrGLUniform4fvFn> fUniform4fv;
|
|
|
|
GrGLFunction<GrGLUniform4ivFn> fUniform4iv;
|
|
|
|
GrGLFunction<GrGLUniformMatrix2fvFn> fUniformMatrix2fv;
|
|
|
|
GrGLFunction<GrGLUniformMatrix3fvFn> fUniformMatrix3fv;
|
|
|
|
GrGLFunction<GrGLUniformMatrix4fvFn> fUniformMatrix4fv;
|
|
|
|
GrGLFunction<GrGLUnmapBufferFn> fUnmapBuffer;
|
|
|
|
GrGLFunction<GrGLUnmapBufferSubDataFn> fUnmapBufferSubData;
|
|
|
|
GrGLFunction<GrGLUnmapTexSubImage2DFn> fUnmapTexSubImage2D;
|
|
|
|
GrGLFunction<GrGLUseProgramFn> fUseProgram;
|
|
|
|
GrGLFunction<GrGLVertexAttrib1fFn> fVertexAttrib1f;
|
|
|
|
GrGLFunction<GrGLVertexAttrib2fvFn> fVertexAttrib2fv;
|
|
|
|
GrGLFunction<GrGLVertexAttrib3fvFn> fVertexAttrib3fv;
|
|
|
|
GrGLFunction<GrGLVertexAttrib4fvFn> fVertexAttrib4fv;
|
|
|
|
GrGLFunction<GrGLVertexAttribDivisorFn> fVertexAttribDivisor;
|
|
|
|
GrGLFunction<GrGLVertexAttribIPointerFn> fVertexAttribIPointer;
|
|
|
|
GrGLFunction<GrGLVertexAttribPointerFn> fVertexAttribPointer;
|
|
|
|
GrGLFunction<GrGLViewportFn> fViewport;
|
2014-01-21 16:09:18 +00:00
|
|
|
|
2015-06-12 20:56:46 +00:00
|
|
|
/* GL_NV_path_rendering */
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLMatrixLoadfFn> fMatrixLoadf;
|
|
|
|
GrGLFunction<GrGLMatrixLoadIdentityFn> fMatrixLoadIdentity;
|
|
|
|
GrGLFunction<GrGLGetProgramResourceLocationFn> fGetProgramResourceLocation;
|
|
|
|
GrGLFunction<GrGLPathCommandsFn> fPathCommands;
|
|
|
|
GrGLFunction<GrGLPathParameteriFn> fPathParameteri;
|
|
|
|
GrGLFunction<GrGLPathParameterfFn> fPathParameterf;
|
|
|
|
GrGLFunction<GrGLGenPathsFn> fGenPaths;
|
|
|
|
GrGLFunction<GrGLDeletePathsFn> fDeletePaths;
|
|
|
|
GrGLFunction<GrGLIsPathFn> fIsPath;
|
|
|
|
GrGLFunction<GrGLPathStencilFuncFn> fPathStencilFunc;
|
|
|
|
GrGLFunction<GrGLStencilFillPathFn> fStencilFillPath;
|
|
|
|
GrGLFunction<GrGLStencilStrokePathFn> fStencilStrokePath;
|
|
|
|
GrGLFunction<GrGLStencilFillPathInstancedFn> fStencilFillPathInstanced;
|
|
|
|
GrGLFunction<GrGLStencilStrokePathInstancedFn> fStencilStrokePathInstanced;
|
|
|
|
GrGLFunction<GrGLCoverFillPathFn> fCoverFillPath;
|
|
|
|
GrGLFunction<GrGLCoverStrokePathFn> fCoverStrokePath;
|
|
|
|
GrGLFunction<GrGLCoverFillPathInstancedFn> fCoverFillPathInstanced;
|
|
|
|
GrGLFunction<GrGLCoverStrokePathInstancedFn> fCoverStrokePathInstanced;
|
2014-08-11 21:05:05 +00:00
|
|
|
// NV_path_rendering v1.2
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLStencilThenCoverFillPathFn> fStencilThenCoverFillPath;
|
|
|
|
GrGLFunction<GrGLStencilThenCoverStrokePathFn> fStencilThenCoverStrokePath;
|
|
|
|
GrGLFunction<GrGLStencilThenCoverFillPathInstancedFn> fStencilThenCoverFillPathInstanced;
|
|
|
|
GrGLFunction<GrGLStencilThenCoverStrokePathInstancedFn> fStencilThenCoverStrokePathInstanced;
|
2014-08-11 21:05:05 +00:00
|
|
|
// NV_path_rendering v1.3
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLProgramPathFragmentInputGenFn> fProgramPathFragmentInputGen;
|
2015-07-14 17:59:23 +00:00
|
|
|
// CHROMIUM_path_rendering
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLBindFragmentInputLocationFn> fBindFragmentInputLocation;
|
2015-06-12 20:56:46 +00:00
|
|
|
|
|
|
|
/* NV_framebuffer_mixed_samples */
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLCoverageModulationFn> fCoverageModulation;
|
2015-06-12 20:56:46 +00:00
|
|
|
|
2016-09-30 15:39:02 +00:00
|
|
|
/* ARB_sync */
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLFenceSyncFn> fFenceSync;
|
|
|
|
GrGLFunction<GrGLIsSyncFn> fIsSync;
|
|
|
|
GrGLFunction<GrGLClientWaitSyncFn> fClientWaitSync;
|
|
|
|
GrGLFunction<GrGLWaitSyncFn> fWaitSync;
|
|
|
|
GrGLFunction<GrGLDeleteSyncFn> fDeleteSync;
|
2016-09-30 15:39:02 +00:00
|
|
|
|
2017-07-19 18:47:42 +00:00
|
|
|
/* ARB_internalforamt_query */
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLGetInternalformativFn> fGetInternalformativ;
|
2017-07-19 18:47:42 +00:00
|
|
|
|
2015-06-12 20:56:46 +00:00
|
|
|
/* KHR_debug */
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLDebugMessageControlFn> fDebugMessageControl;
|
|
|
|
GrGLFunction<GrGLDebugMessageInsertFn> fDebugMessageInsert;
|
|
|
|
GrGLFunction<GrGLDebugMessageCallbackFn> fDebugMessageCallback;
|
|
|
|
GrGLFunction<GrGLGetDebugMessageLogFn> fGetDebugMessageLog;
|
|
|
|
GrGLFunction<GrGLPushDebugGroupFn> fPushDebugGroup;
|
|
|
|
GrGLFunction<GrGLPopDebugGroupFn> fPopDebugGroup;
|
|
|
|
GrGLFunction<GrGLObjectLabelFn> fObjectLabel;
|
2015-11-16 14:48:44 +00:00
|
|
|
|
2016-08-09 19:42:47 +00:00
|
|
|
/* EXT_window_rectangles */
|
2018-08-24 14:26:42 +00:00
|
|
|
GrGLFunction<GrGLWindowRectanglesFn> fWindowRectangles;
|
2019-10-07 17:51:07 +00:00
|
|
|
|
|
|
|
/* GL_QCOM_tiled_rendering */
|
|
|
|
GrGLFunction<GrGLStartTilingFn> fStartTiling;
|
|
|
|
GrGLFunction<GrGLEndTilingFn> fEndTiling;
|
2014-01-21 16:09:18 +00:00
|
|
|
} fFunctions;
|
|
|
|
|
2018-06-22 13:48:38 +00:00
|
|
|
#if GR_TEST_UTILS
|
2014-07-29 15:01:52 +00:00
|
|
|
// This exists for internal testing.
|
2018-06-22 13:48:38 +00:00
|
|
|
virtual void abandon() const;
|
|
|
|
#endif
|
2011-05-04 12:35:39 +00:00
|
|
|
};
|
2011-03-14 21:23:01 +00:00
|
|
|
|
|
|
|
#endif
|