1ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com/* 2ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Copyright 2011 Google Inc. 3ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * 4ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Use of this source code is governed by a BSD-style license that can be 5ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * found in the LICENSE file. 659a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com */ 759a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 859a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com#ifndef GrGLInterface_DEFINED 959a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com#define GrGLInterface_DEFINED 1059a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 11637d5e929708db8eace06b81fa3049141f9a07efbsalomon@google.com#include "GrGLFunctions.h" 1290313cc36a6f43a3e9d3818aca536cd6631c222bcommit-bot@chromium.org#include "GrGLExtensions.h" 13a4de8c257ea0be8ff7081f645249b6afe5c48e7ecommit-bot@chromium.org#include "SkRefCnt.h" 1459a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 1559a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com//////////////////////////////////////////////////////////////////////////////// 1659a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 1759a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com/** 180b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * Rather than depend on platform-specific GL headers and libraries, we require 190b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * the client to provide a struct of GL function pointers. This struct can be 200b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * specified per-GrContext as a parameter to GrContext::Create. If NULL is 21a3b15ed0373b873d4c497b51384b8c07d751753acommit-bot@chromium.org * passed to Create then a "default" GL interface is created. If the default is 220b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * also NULL GrContext creation will fail. 230b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * 246fb736fc2ea5f3f7ac44494211cc6755180ca192bsalomon@google.com * The default interface is returned by GrGLDefaultInterface. This function's 250da3719050473344b6013fd7b614611984f20effrobertphillips@google.com * implementation is platform-specific. Several have been provided, along with 26a3b15ed0373b873d4c497b51384b8c07d751753acommit-bot@chromium.org * an implementation that simply returns NULL. 2756bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com * 2856bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com * By defining GR_GL_PER_GL_CALL_IFACE_CALLBACK to 1 the client can specify a 2956bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com * callback function that will be called prior to each GL function call. See 3056bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com * comments in GrGLConfig.h 3159a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com */ 320b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com 33d416a5b10ff9e6d4f55a1f5b0419722132d68ff3cdaltontypedef void(*GrGLFuncPtr)(); 34d416a5b10ff9e6d4f55a1f5b0419722132d68ff3cdalton 3559a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.comstruct GrGLInterface; 3659a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 376fb736fc2ea5f3f7ac44494211cc6755180ca192bsalomon@google.comconst GrGLInterface* GrGLDefaultInterface(); 3859a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 3957f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com/** 4057f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com * Creates a GrGLInterface for a "native" GL context (e.g. WGL on windows, 41a3b15ed0373b873d4c497b51384b8c07d751753acommit-bot@chromium.org * GLX on linux, AGL on Mac). The interface is only valid for the GL context 42a3b15ed0373b873d4c497b51384b8c07d751753acommit-bot@chromium.org * that is current when the interface is created. 4357f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com */ 440fc1dbe59271d507e1435a5d06bbfc2ec5bb4816halcanarySK_API const GrGLInterface* GrGLCreateNativeInterface(); 45373a6635b7190b4af4d265fdd4b70f102ec3a6fdbsalomon@google.com 463724e574a744491b7cfb8187ac865a70ef3d4528bsalomon#if GR_GL_PER_GL_FUNC_CALLBACK 473724e574a744491b7cfb8187ac865a70ef3d4528bsalomontypedef void (*GrGLInterfaceCallbackProc)(const GrGLInterface*); 483724e574a744491b7cfb8187ac865a70ef3d4528bsalomontypedef intptr_t GrGLInterfaceCallbackData; 49885bf0925514b9dfe3365bab227d36897d866b5dhendrikw#endif 50885bf0925514b9dfe3365bab227d36897d866b5dhendrikw 5174913722bfe5e4b6810545891958e3d8e9c63791bsalomon@google.com/** 5274913722bfe5e4b6810545891958e3d8e9c63791bsalomon@google.com * Creates a null GrGLInterface that doesn't draw anything. Used for measuring 533724e574a744491b7cfb8187ac865a70ef3d4528bsalomon * CPU overhead. TODO: We would like to move this to tools/gpu/gl/null but currently 543724e574a744491b7cfb8187ac865a70ef3d4528bsalomon * Chromium is using it in its unit tests. 5574913722bfe5e4b6810545891958e3d8e9c63791bsalomon@google.com */ 56b988ecf639f1394ea5e821ac15b989e25e064534svaisanenconst SK_API GrGLInterface* GrGLCreateNullInterface(bool enableNVPR = false); 5774913722bfe5e4b6810545891958e3d8e9c63791bsalomon@google.com 58a3baf3be0e2a3128fb73bd41d40d130f75a4dc86commit-bot@chromium.org/** Function that returns a new interface identical to "interface" but with support for 59a3baf3be0e2a3128fb73bd41d40d130f75a4dc86commit-bot@chromium.org test version of GL_EXT_debug_marker. */ 60a3baf3be0e2a3128fb73bd41d40d130f75a4dc86commit-bot@chromium.orgconst GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface*, 61a3baf3be0e2a3128fb73bd41d40d130f75a4dc86commit-bot@chromium.org GrGLInsertEventMarkerProc insertEventMarkerFn, 62a3baf3be0e2a3128fb73bd41d40d130f75a4dc86commit-bot@chromium.org GrGLPushGroupMarkerProc pushGroupMarkerFn, 63a3baf3be0e2a3128fb73bd41d40d130f75a4dc86commit-bot@chromium.org GrGLPopGroupMarkerProc popGroupMarkerFn); 64a3baf3be0e2a3128fb73bd41d40d130f75a4dc86commit-bot@chromium.org 65d8ed85101ee77ad2cb0c186a79d197698a75d246commit-bot@chromium.org/** 66cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * GrContext uses the following interface to make all calls into OpenGL. When a 67cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * GrContext is created it is given a GrGLInterface. The interface's function 68cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * pointers must be valid for the OpenGL context associated with the GrContext. 69cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * On some platforms, such as Windows, function pointers for OpenGL extensions 70cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * may vary between OpenGL contexts. So the caller must be careful to use a 71cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * GrGLInterface initialized for the correct context. All functions that should 72cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * be available based on the OpenGL's version and extension string must be 73cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * non-NULL or GrContext creation will fail. This can be tested with the 74cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * validate() method when the OpenGL context has been made current. 75bf2a46941e8fdebfcd24ea8f7184779021898225bsalomon@google.com */ 76a4de8c257ea0be8ff7081f645249b6afe5c48e7ecommit-bot@chromium.orgstruct SK_API GrGLInterface : public SkRefCnt { 77ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.comprivate: 78a4de8c257ea0be8ff7081f645249b6afe5c48e7ecommit-bot@chromium.org typedef SkRefCnt INHERITED; 7915e9d3e66e161ce23df30bc13f8a0c87d196b463robertphillips@google.com 80ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.compublic: 810b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com GrGLInterface(); 820b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com 83d8ed85101ee77ad2cb0c186a79d197698a75d246commit-bot@chromium.org static GrGLInterface* NewClone(const GrGLInterface*); 84d8ed85101ee77ad2cb0c186a79d197698a75d246commit-bot@chromium.org 859e90aed5de82732cc9921f01388d3063a41a053bcommit-bot@chromium.org // Validates that the GrGLInterface supports its advertised standard. This means the necessary 869e90aed5de82732cc9921f01388d3063a41a053bcommit-bot@chromium.org // function pointers have been initialized for both the GL version and any advertised 879e90aed5de82732cc9921f01388d3063a41a053bcommit-bot@chromium.org // extensions. 889e90aed5de82732cc9921f01388d3063a41a053bcommit-bot@chromium.org bool validate() const; 8989ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com 909e90aed5de82732cc9921f01388d3063a41a053bcommit-bot@chromium.org // Indicates the type of GL implementation 919e90aed5de82732cc9921f01388d3063a41a053bcommit-bot@chromium.org union { 929e90aed5de82732cc9921f01388d3063a41a053bcommit-bot@chromium.org GrGLStandard fStandard; 939e90aed5de82732cc9921f01388d3063a41a053bcommit-bot@chromium.org GrGLStandard fBindingsExported; // Legacy name, will be remove when Chromium is updated. 949e90aed5de82732cc9921f01388d3063a41a053bcommit-bot@chromium.org }; 95b65e0cb8ad8a690498142d2b0097be250b0c7dfbtwiz@google.com 9690313cc36a6f43a3e9d3818aca536cd6631c222bcommit-bot@chromium.org GrGLExtensions fExtensions; 9790313cc36a6f43a3e9d3818aca536cd6631c222bcommit-bot@chromium.org 98f535561b3baeb5f19c5b81fb439818bdde00d882commit-bot@chromium.org bool hasExtension(const char ext[]) const { return fExtensions.has(ext); } 9990313cc36a6f43a3e9d3818aca536cd6631c222bcommit-bot@chromium.org 100c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org /** 101c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org * The function pointers are in a struct so that we can have a compiler generated assignment 102c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org * operator. 103c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org */ 104c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org struct Functions { 1059f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLActiveTextureProc> fActiveTexture; 1069f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLAttachShaderProc> fAttachShader; 1079f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBeginQueryProc> fBeginQuery; 1089f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBindAttribLocationProc> fBindAttribLocation; 1099f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBindBufferProc> fBindBuffer; 1109f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBindFragDataLocationProc> fBindFragDataLocation; 1119f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBindFragDataLocationIndexedProc> fBindFragDataLocationIndexed; 1129f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBindFramebufferProc> fBindFramebuffer; 1139f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBindRenderbufferProc> fBindRenderbuffer; 1149f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBindTextureProc> fBindTexture; 1150b63ceb10c6aef0b144b1cdee4e95b457968cd0cBrian Salomon GrGLFunction<GrGLBindImageTextureProc> fBindImageTexture; 1169f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBindVertexArrayProc> fBindVertexArray; 1179f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBlendBarrierProc> fBlendBarrier; 1189f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBlendColorProc> fBlendColor; 1199f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBlendEquationProc> fBlendEquation; 1209f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBlendFuncProc> fBlendFunc; 1219f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBlitFramebufferProc> fBlitFramebuffer; 1229f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBufferDataProc> fBufferData; 1239f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBufferSubDataProc> fBufferSubData; 1249f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCheckFramebufferStatusProc> fCheckFramebufferStatus; 1259f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLClearProc> fClear; 1269f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLClearColorProc> fClearColor; 1279f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLClearStencilProc> fClearStencil; 1289f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLColorMaskProc> fColorMask; 1299f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCompileShaderProc> fCompileShader; 1309f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCompressedTexImage2DProc> fCompressedTexImage2D; 1319f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCompressedTexSubImage2DProc> fCompressedTexSubImage2D; 1329f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCopyTexSubImage2DProc> fCopyTexSubImage2D; 1339f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCreateProgramProc> fCreateProgram; 1349f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCreateShaderProc> fCreateShader; 1359f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCullFaceProc> fCullFace; 1369f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDeleteBuffersProc> fDeleteBuffers; 1379f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDeleteFramebuffersProc> fDeleteFramebuffers; 1389f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDeleteProgramProc> fDeleteProgram; 1399f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDeleteQueriesProc> fDeleteQueries; 1409f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDeleteRenderbuffersProc> fDeleteRenderbuffers; 1419f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDeleteShaderProc> fDeleteShader; 1429f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDeleteTexturesProc> fDeleteTextures; 1439f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDeleteVertexArraysProc> fDeleteVertexArrays; 1449f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDepthMaskProc> fDepthMask; 1459f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDisableProc> fDisable; 1469f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDisableVertexAttribArrayProc> fDisableVertexAttribArray; 1479f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDrawArraysProc> fDrawArrays; 1489f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDrawArraysIndirectProc> fDrawArraysIndirect; 1499f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDrawArraysInstancedProc> fDrawArraysInstanced; 1509f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDrawBufferProc> fDrawBuffer; 1519f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDrawBuffersProc> fDrawBuffers; 1529f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDrawElementsProc> fDrawElements; 1539f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDrawElementsIndirectProc> fDrawElementsIndirect; 1549f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDrawElementsInstancedProc> fDrawElementsInstanced; 155fc9527a0dfab9b4e2f6c1b8a7ff23a61a5e6b31fbsalomon GrGLFunction<GrGLDrawRangeElementsProc> fDrawRangeElements; 1569f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLEnableProc> fEnable; 1579f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLEnableVertexAttribArrayProc> fEnableVertexAttribArray; 1589f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLEndQueryProc> fEndQuery; 1599f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFinishProc> fFinish; 1609f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFlushProc> fFlush; 1619f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFlushMappedBufferRangeProc> fFlushMappedBufferRange; 1629f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFramebufferRenderbufferProc> fFramebufferRenderbuffer; 1639f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFramebufferTexture2DProc> fFramebufferTexture2D; 1649f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFramebufferTexture2DMultisampleProc> fFramebufferTexture2DMultisample; 1659f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFrontFaceProc> fFrontFace; 1669f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGenBuffersProc> fGenBuffers; 1679f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGenFramebuffersProc> fGenFramebuffers; 1689f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGenerateMipmapProc> fGenerateMipmap; 1699f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGenQueriesProc> fGenQueries; 1709f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGenRenderbuffersProc> fGenRenderbuffers; 1719f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGenTexturesProc> fGenTextures; 1729f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGenVertexArraysProc> fGenVertexArrays; 1739f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetBufferParameterivProc> fGetBufferParameteriv; 1749f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetErrorProc> fGetError; 1759f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetFramebufferAttachmentParameterivProc> fGetFramebufferAttachmentParameteriv; 1769f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetIntegervProc> fGetIntegerv; 177eb79eea617d6d4ef6951206e51643ec4ef891920cdalton GrGLFunction<GrGLGetMultisamplefvProc> fGetMultisamplefv; 1789f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetQueryObjecti64vProc> fGetQueryObjecti64v; 1799f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetQueryObjectivProc> fGetQueryObjectiv; 1809f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetQueryObjectui64vProc> fGetQueryObjectui64v; 1819f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetQueryObjectuivProc> fGetQueryObjectuiv; 1829f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetQueryivProc> fGetQueryiv; 1839f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetProgramInfoLogProc> fGetProgramInfoLog; 1849f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetProgramivProc> fGetProgramiv; 1859f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv; 1869f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetShaderInfoLogProc> fGetShaderInfoLog; 1879f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetShaderivProc> fGetShaderiv; 1889f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetShaderPrecisionFormatProc> fGetShaderPrecisionFormat; 1899f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetStringProc> fGetString; 1909f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetStringiProc> fGetStringi; 1919f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv; 1929f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetUniformLocationProc> fGetUniformLocation; 1939f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLInsertEventMarkerProc> fInsertEventMarker; 1949f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLInvalidateBufferDataProc> fInvalidateBufferData; 1959f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLInvalidateBufferSubDataProc> fInvalidateBufferSubData; 1969f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLInvalidateFramebufferProc> fInvalidateFramebuffer; 1979f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLInvalidateSubFramebufferProc> fInvalidateSubFramebuffer; 1989f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLInvalidateTexImageProc> fInvalidateTexImage; 1999f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLInvalidateTexSubImageProc> fInvalidateTexSubImage; 2009f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLIsTextureProc> fIsTexture; 2019f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLLineWidthProc> fLineWidth; 2029f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLLinkProgramProc> fLinkProgram; 2039f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMapBufferProc> fMapBuffer; 2049f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMapBufferRangeProc> fMapBufferRange; 2059f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMapBufferSubDataProc> fMapBufferSubData; 2069f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMapTexSubImage2DProc> fMapTexSubImage2D; 2070b63ceb10c6aef0b144b1cdee4e95b457968cd0cBrian Salomon GrGLFunction<GrGLMemoryBarrierProc> fMemoryBarrier; 2080b63ceb10c6aef0b144b1cdee4e95b457968cd0cBrian Salomon GrGLFunction<GrGLMemoryBarrierByRegionProc> fMemoryBarrierByRegion; 2095cebf8c82dfe3fc4110944f0db03d7fc85b7142acsmartdalton GrGLFunction<GrGLMultiDrawArraysIndirectProc> fMultiDrawArraysIndirect; 2105cebf8c82dfe3fc4110944f0db03d7fc85b7142acsmartdalton GrGLFunction<GrGLMultiDrawElementsIndirectProc> fMultiDrawElementsIndirect; 2119f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLPixelStoreiProc> fPixelStorei; 2129f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLPopGroupMarkerProc> fPopGroupMarker; 2139f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLPushGroupMarkerProc> fPushGroupMarker; 2149f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLQueryCounterProc> fQueryCounter; 2159f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLRasterSamplesProc> fRasterSamples; 2169f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLReadBufferProc> fReadBuffer; 2179f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLReadPixelsProc> fReadPixels; 2189f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLRenderbufferStorageProc> fRenderbufferStorage; 219c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org 220c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // On OpenGL ES there are multiple incompatible extensions that add support for MSAA 221c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // and ES3 adds MSAA support to the standard. On an ES3 driver we may still use the 222c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // older extensions for performance reasons or due to ES3 driver bugs. We want the function 223c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // that creates the GrGLInterface to provide all available functions and internally 224c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // we will select among them. They all have a method called glRenderbufferStorageMultisample*. 225c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // So we have separate function pointers for GL_IMG/EXT_multisampled_to_texture, 226c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // GL_CHROMIUM/ANGLE_framebuffer_multisample/ES3, and GL_APPLE_framebuffer_multisample 227c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // variations. 228c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // 229c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // If a driver supports multiple GL_ARB_framebuffer_multisample-style extensions then we will 230c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // assume the function pointers for the standard (or equivalent GL_ARB) version have 231c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // been preferred over GL_EXT, GL_CHROMIUM, or GL_ANGLE variations that have reduced 232c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // functionality. 233c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org 234c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled_render_to_texture 2359f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2EXT; 236c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // GL_APPLE_framebuffer_multisample 2379f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2APPLE; 238c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org 239c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // This is used to store the pointer for GL_ARB/EXT/ANGLE/CHROMIUM_framebuffer_multisample or 240c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // the standard function in ES3+ or GL 3.0+. 2419f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisample; 242c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org 243c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org // Pointer to BindUniformLocationCHROMIUM from the GL_CHROMIUM_bind_uniform_location extension. 2449f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBindUniformLocationProc> fBindUniformLocation; 2459f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon 2469f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer; 2479f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLScissorProc> fScissor; 2489f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLShaderSourceProc> fShaderSource; 2499f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilFuncProc> fStencilFunc; 2509f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilFuncSeparateProc> fStencilFuncSeparate; 2519f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilMaskProc> fStencilMask; 2529f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilMaskSeparateProc> fStencilMaskSeparate; 2539f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilOpProc> fStencilOp; 2549f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilOpSeparateProc> fStencilOpSeparate; 255c04ce676d4516a8c64e29e1f60bb72cd2c6c0a59cdalton GrGLFunction<GrGLTexBufferProc> fTexBuffer; 256f8a6ce8d8c54cab5456d3099fa07e460c889c2e6cdalton GrGLFunction<GrGLTexBufferRangeProc> fTexBufferRange; 2579f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTexImage2DProc> fTexImage2D; 2589f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTexParameteriProc> fTexParameteri; 2599f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTexParameterivProc> fTexParameteriv; 2609f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTexSubImage2DProc> fTexSubImage2D; 2619f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTexStorage2DProc> fTexStorage2D; 2629f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureBarrierProc> fTextureBarrier; 2639f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDiscardFramebufferProc> fDiscardFramebuffer; 2649f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform1fProc> fUniform1f; 2659f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform1iProc> fUniform1i; 2669f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform1fvProc> fUniform1fv; 2679f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform1ivProc> fUniform1iv; 2689f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform2fProc> fUniform2f; 2699f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform2iProc> fUniform2i; 2709f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform2fvProc> fUniform2fv; 2719f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform2ivProc> fUniform2iv; 2729f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform3fProc> fUniform3f; 2739f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform3iProc> fUniform3i; 2749f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform3fvProc> fUniform3fv; 2759f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform3ivProc> fUniform3iv; 2769f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform4fProc> fUniform4f; 2779f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform4iProc> fUniform4i; 2789f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform4fvProc> fUniform4fv; 2799f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniform4ivProc> fUniform4iv; 2809f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniformMatrix2fvProc> fUniformMatrix2fv; 2819f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniformMatrix3fvProc> fUniformMatrix3fv; 2829f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniformMatrix4fvProc> fUniformMatrix4fv; 2839f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUnmapBufferProc> fUnmapBuffer; 2849f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUnmapBufferSubDataProc> fUnmapBufferSubData; 2859f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUnmapTexSubImage2DProc> fUnmapTexSubImage2D; 2869f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUseProgramProc> fUseProgram; 2879f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexAttrib1fProc> fVertexAttrib1f; 2889f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexAttrib2fvProc> fVertexAttrib2fv; 2899f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexAttrib3fvProc> fVertexAttrib3fv; 2909f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexAttrib4fvProc> fVertexAttrib4fv; 2919f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexAttribDivisorProc> fVertexAttribDivisor; 292793dc26ca6ba2543bf50e5215b858d1c265af50ccdalton GrGLFunction<GrGLVertexAttribIPointerProc> fVertexAttribIPointer; 2939f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexAttribPointerProc> fVertexAttribPointer; 2949f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLViewportProc> fViewport; 295c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org 296626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton /* GL_NV_path_rendering */ 2979f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMatrixLoadfProc> fMatrixLoadf; 2989f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMatrixLoadIdentityProc> fMatrixLoadIdentity; 2999f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetProgramResourceLocationProc> fGetProgramResourceLocation; 3009f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLPathCommandsProc> fPathCommands; 3019f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLPathParameteriProc> fPathParameteri; 3029f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLPathParameterfProc> fPathParameterf; 3039f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGenPathsProc> fGenPaths; 3049f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDeletePathsProc> fDeletePaths; 3059f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLIsPathProc> fIsPath; 3069f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLPathStencilFuncProc> fPathStencilFunc; 3079f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilFillPathProc> fStencilFillPath; 3089f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilStrokePathProc> fStencilStrokePath; 3099f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilFillPathInstancedProc> fStencilFillPathInstanced; 3109f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilStrokePathInstancedProc> fStencilStrokePathInstanced; 3119f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCoverFillPathProc> fCoverFillPath; 3129f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCoverStrokePathProc> fCoverStrokePath; 3139f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCoverFillPathInstancedProc> fCoverFillPathInstanced; 3149f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCoverStrokePathInstancedProc> fCoverStrokePathInstanced; 315c7103a104fdc7150b4e3c0d3efc42735ad359616cdalton // NV_path_rendering v1.2 3169f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilThenCoverFillPathProc> fStencilThenCoverFillPath; 3179f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilThenCoverStrokePathProc> fStencilThenCoverStrokePath; 3189f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilThenCoverFillPathInstancedProc> fStencilThenCoverFillPathInstanced; 3199f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLStencilThenCoverStrokePathInstancedProc> fStencilThenCoverStrokePathInstanced; 320c7103a104fdc7150b4e3c0d3efc42735ad359616cdalton // NV_path_rendering v1.3 3219f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramPathFragmentInputGenProc> fProgramPathFragmentInputGen; 3226bb6d4075b198c5935ab6f2d71364ca7ff0153d1kkinnunen // CHROMIUM_path_rendering 3239f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLBindFragmentInputLocationProc> fBindFragmentInputLocation; 324626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton 325626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton /* NV_framebuffer_mixed_samples */ 3269f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCoverageModulationProc> fCoverageModulation; 327626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton 328626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton /* NV_bindless_texture */ 329626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton // We use the NVIDIA verson for now because it does not require dynamically uniform handles. 330626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton // We may switch the the ARB version and/or omit methods in the future. 3319f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetTextureHandleProc> fGetTextureHandle; 3329f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetTextureSamplerHandleProc> fGetTextureSamplerHandle; 3339f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMakeTextureHandleResidentProc> fMakeTextureHandleResident; 3349f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMakeTextureHandleNonResidentProc> fMakeTextureHandleNonResident; 3359f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetImageHandleProc> fGetImageHandle; 3369f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMakeImageHandleResidentProc> fMakeImageHandleResident; 3379f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMakeImageHandleNonResidentProc> fMakeImageHandleNonResident; 3389f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLIsTextureHandleResidentProc> fIsTextureHandleResident; 3399f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLIsImageHandleResidentProc> fIsImageHandleResident; 3409f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniformHandleui64Proc> fUniformHandleui64; 3419f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUniformHandleui64vProc> fUniformHandleui64v; 3429f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformHandleui64Proc> fProgramUniformHandleui64; 3439f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformHandleui64vProc> fProgramUniformHandleui64v; 344626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton 34528ef445d2e55ada7a45fd74e9248b4f22b16e061ethannicholas /* ARB_sample_shading */ 34628ef445d2e55ada7a45fd74e9248b4f22b16e061ethannicholas GrGLFunction<GrGLMinSampleShadingProc> fMinSampleShading; 34728ef445d2e55ada7a45fd74e9248b4f22b16e061ethannicholas 348626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton /* EXT_direct_state_access */ 349626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton // We use the EXT verson because it is more expansive and interacts with more extensions 350626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton // than the ARB or core (4.5) versions. We may switch and/or omit methods in the future. 3519f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureParameteriProc> fTextureParameteri; 3529f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureParameterivProc> fTextureParameteriv; 3539f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureParameterfProc> fTextureParameterf; 3549f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureParameterfvProc> fTextureParameterfv; 3559f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureImage1DProc> fTextureImage1D; 3569f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureImage2DProc> fTextureImage2D; 3579f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureSubImage1DProc> fTextureSubImage1D; 3589f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureSubImage2DProc> fTextureSubImage2D; 3599f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCopyTextureImage1DProc> fCopyTextureImage1D; 3609f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCopyTextureImage2DProc> fCopyTextureImage2D; 3619f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCopyTextureSubImage1DProc> fCopyTextureSubImage1D; 3629f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCopyTextureSubImage2DProc> fCopyTextureSubImage2D; 3639f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetTextureImageProc> fGetTextureImage; 3649f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetTextureParameterfvProc> fGetTextureParameterfv; 3659f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetTextureParameterivProc> fGetTextureParameteriv; 3669f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetTextureLevelParameterfvProc> fGetTextureLevelParameterfv; 3679f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetTextureLevelParameterivProc> fGetTextureLevelParameteriv; 368626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton // OpenGL 1.2 3699f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureImage3DProc> fTextureImage3D; 3709f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLTextureSubImage3DProc> fTextureSubImage3D; 3719f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCopyTextureSubImage3DProc> fCopyTextureSubImage3D; 3729f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCompressedTextureImage3DProc> fCompressedTextureImage3D; 3739f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCompressedTextureImage2DProc> fCompressedTextureImage2D; 3749f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCompressedTextureImage1DProc> fCompressedTextureImage1D; 3759f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCompressedTextureSubImage3DProc> fCompressedTextureSubImage3D; 3769f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCompressedTextureSubImage2DProc> fCompressedTextureSubImage2D; 3779f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCompressedTextureSubImage1DProc> fCompressedTextureSubImage1D; 3789f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetCompressedTextureImageProc> fGetCompressedTextureImage; 379626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton // OpenGL 1.5 3809f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLNamedBufferDataProc> fNamedBufferData; 3819f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLNamedBufferSubDataProc> fNamedBufferSubData; 3829f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMapNamedBufferProc> fMapNamedBuffer; 3839f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLUnmapNamedBufferProc> fUnmapNamedBuffer; 3849f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetNamedBufferParameterivProc> fGetNamedBufferParameteriv; 3859f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetNamedBufferPointervProc> fGetNamedBufferPointerv; 3869f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetNamedBufferSubDataProc> fGetNamedBufferSubData; 387626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton // OpenGL 2.0 3889f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform1fProc> fProgramUniform1f; 3899f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform2fProc> fProgramUniform2f; 3909f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform3fProc> fProgramUniform3f; 3919f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform4fProc> fProgramUniform4f; 3929f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform1iProc> fProgramUniform1i; 3939f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform2iProc> fProgramUniform2i; 3949f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform3iProc> fProgramUniform3i; 3959f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform4iProc> fProgramUniform4i; 3969f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform1fvProc> fProgramUniform1fv; 3979f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform2fvProc> fProgramUniform2fv; 3989f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform3fvProc> fProgramUniform3fv; 3999f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform4fvProc> fProgramUniform4fv; 4009f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform1ivProc> fProgramUniform1iv; 4019f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform2ivProc> fProgramUniform2iv; 4029f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform3ivProc> fProgramUniform3iv; 4039f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniform4ivProc> fProgramUniform4iv; 4049f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformMatrix2fvProc> fProgramUniformMatrix2fv; 4059f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformMatrix3fvProc> fProgramUniformMatrix3fv; 4069f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformMatrix4fvProc> fProgramUniformMatrix4fv; 407626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton // OpenGL 2.1 4089f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformMatrix2x3fvProc> fProgramUniformMatrix2x3fv; 4099f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformMatrix3x2fvProc> fProgramUniformMatrix3x2fv; 4109f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformMatrix2x4fvProc> fProgramUniformMatrix2x4fv; 4119f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformMatrix4x2fvProc> fProgramUniformMatrix4x2fv; 4129f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformMatrix3x4fvProc> fProgramUniformMatrix3x4fv; 4139f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLProgramUniformMatrix4x3fvProc> fProgramUniformMatrix4x3fv; 414626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton // OpenGL 3.0 4159f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLNamedRenderbufferStorageProc> fNamedRenderbufferStorage; 4169f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetNamedRenderbufferParameterivProc> fGetNamedRenderbufferParameteriv; 4179f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLNamedRenderbufferStorageMultisampleProc> fNamedRenderbufferStorageMultisample; 4189f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLCheckNamedFramebufferStatusProc> fCheckNamedFramebufferStatus; 4199f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLNamedFramebufferTexture1DProc> fNamedFramebufferTexture1D; 4209f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLNamedFramebufferTexture2DProc> fNamedFramebufferTexture2D; 4219f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLNamedFramebufferTexture3DProc> fNamedFramebufferTexture3D; 4229f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLNamedFramebufferRenderbufferProc> fNamedFramebufferRenderbuffer; 4239f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetNamedFramebufferAttachmentParameterivProc> fGetNamedFramebufferAttachmentParameteriv; 4249f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGenerateTextureMipmapProc> fGenerateTextureMipmap; 4259f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFramebufferDrawBufferProc> fFramebufferDrawBuffer; 4269f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFramebufferDrawBuffersProc> fFramebufferDrawBuffers; 4279f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFramebufferReadBufferProc> fFramebufferReadBuffer; 4289f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetFramebufferParameterivProc> fGetFramebufferParameteriv; 4299f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLNamedCopyBufferSubDataProc> fNamedCopyBufferSubData; 4309f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArrayVertexOffsetProc> fVertexArrayVertexOffset; 4319f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArrayColorOffsetProc> fVertexArrayColorOffset; 4329f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArrayEdgeFlagOffsetProc> fVertexArrayEdgeFlagOffset; 4339f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArrayIndexOffsetProc> fVertexArrayIndexOffset; 4349f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArrayNormalOffsetProc> fVertexArrayNormalOffset; 4359f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArrayTexCoordOffsetProc> fVertexArrayTexCoordOffset; 4369f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArrayMultiTexCoordOffsetProc> fVertexArrayMultiTexCoordOffset; 4379f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArrayFogCoordOffsetProc> fVertexArrayFogCoordOffset; 4389f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArraySecondaryColorOffsetProc> fVertexArraySecondaryColorOffset; 4399f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArrayVertexAttribOffsetProc> fVertexArrayVertexAttribOffset; 4409f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLVertexArrayVertexAttribIOffsetProc> fVertexArrayVertexAttribIOffset; 4419f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLEnableVertexArrayProc> fEnableVertexArray; 4429f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDisableVertexArrayProc> fDisableVertexArray; 4439f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLEnableVertexArrayAttribProc> fEnableVertexArrayAttrib; 4449f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDisableVertexArrayAttribProc> fDisableVertexArrayAttrib; 4459f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetVertexArrayIntegervProc> fGetVertexArrayIntegerv; 4469f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetVertexArrayPointervProc> fGetVertexArrayPointerv; 4479f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetVertexArrayIntegeri_vProc> fGetVertexArrayIntegeri_v; 4489f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetVertexArrayPointeri_vProc> fGetVertexArrayPointeri_v; 4499f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLMapNamedBufferRangeProc> fMapNamedBufferRange; 4509f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLFlushMappedNamedBufferRangeProc> fFlushMappedNamedBufferRange; 451c04ce676d4516a8c64e29e1f60bb72cd2c6c0a59cdalton // OpenGL 3.1 452c04ce676d4516a8c64e29e1f60bb72cd2c6c0a59cdalton GrGLFunction<GrGLTextureBufferProc> fTextureBuffer; 453626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton 45484741b308496409f4ff662658167221fc6801bbejvanverth /* ARB_sync */ 45584741b308496409f4ff662658167221fc6801bbejvanverth GrGLFunction<GrGLFenceSyncProc> fFenceSync; 45684741b308496409f4ff662658167221fc6801bbejvanverth GrGLFunction<GrGLClientWaitSyncProc> fClientWaitSync; 4576be35238855dbbc7575e78d6723936293a4b38e6Greg Daniel GrGLFunction<GrGLWaitSyncProc> fWaitSync; 45884741b308496409f4ff662658167221fc6801bbejvanverth GrGLFunction<GrGLDeleteSyncProc> fDeleteSync; 45984741b308496409f4ff662658167221fc6801bbejvanverth 460626e1ffe84c24a969dc56ca70ab2e950bf5034c4cdalton /* KHR_debug */ 4619f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDebugMessageControlProc> fDebugMessageControl; 4629f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDebugMessageInsertProc> fDebugMessageInsert; 4639f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLDebugMessageCallbackProc> fDebugMessageCallback; 4649f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLGetDebugMessageLogProc> fGetDebugMessageLog; 4659f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLPushDebugGroupProc> fPushDebugGroup; 4669f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLPopDebugGroupProc> fPopDebugGroup; 4679f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrGLObjectLabelProc> fObjectLabel; 468b1a32ad51767d7639abc6ba16aae656145d7fc77bsalomon 4699bc1187249f27ffed448b49ad75fd226d8181241csmartdalton /* EXT_window_rectangles */ 4709bc1187249f27ffed448b49ad75fd226d8181241csmartdalton GrGLFunction<GrGLWindowRectanglesProc> fWindowRectangles; 4719bc1187249f27ffed448b49ad75fd226d8181241csmartdalton 472b1a32ad51767d7639abc6ba16aae656145d7fc77bsalomon /* EGL functions */ 4739f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrEGLCreateImageProc> fEGLCreateImage; 4749f2dc27642e7e556f54f632bf6eff195d8cf52e1bsalomon GrGLFunction<GrEGLDestroyImageProc> fEGLDestroyImage; 475c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org } fFunctions; 476c72425ae368bfcb47de7d2532eb90d305ec0d1cfcommit-bot@chromium.org 477944bcf0acb78f8f9da01e991f1307629959e338absalomon // This exists for internal testing. 478944bcf0acb78f8f9da01e991f1307629959e338absalomon virtual void abandon() const {} 479bf2a46941e8fdebfcd24ea8f7184779021898225bsalomon@google.com}; 48059a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 48159a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com#endif 482