aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-21 18:45:30 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-21 18:45:30 +0000
commita3baf3be0e2a3128fb73bd41d40d130f75a4dc86 (patch)
tree935d08c9f4098a57a4bde7bbffc2763fc863eae6 /src/gpu
parent5301070de894dbfa4772cf01e111450102837803 (diff)
Add hooks for GL_EXT_debug_marker in gpu
BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/174123003 git-svn-id: http://skia.googlecode.com/svn/trunk@13538 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrDrawTarget.cpp28
-rw-r--r--src/gpu/GrDrawTarget.h20
-rw-r--r--src/gpu/GrDrawTargetCaps.h2
-rw-r--r--src/gpu/GrInOrderDrawBuffer.cpp12
-rw-r--r--src/gpu/GrInOrderDrawBuffer.h5
-rw-r--r--src/gpu/gl/GrGLCaps.cpp2
-rw-r--r--src/gpu/gl/GrGLCreateNullInterface.cpp3
-rw-r--r--src/gpu/gl/GrGLExtensions.cpp11
-rw-r--r--src/gpu/gl/GrGLInterface.cpp30
-rw-r--r--src/gpu/gl/GrGLNoOpInterface.cpp7
-rw-r--r--src/gpu/gl/GrGLNoOpInterface.h4
-rw-r--r--src/gpu/gl/GrGpuGL.cpp19
-rw-r--r--src/gpu/gl/GrGpuGL.h6
-rw-r--r--src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp12
-rw-r--r--src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp6
-rw-r--r--src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp6
-rw-r--r--src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp6
-rw-r--r--src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp6
-rw-r--r--src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp6
-rw-r--r--src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp6
20 files changed, 194 insertions, 3 deletions
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 0909e08dc8..fb4c9a1509 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -88,7 +88,8 @@ void GrDrawTarget::DrawInfo::adjustStartIndex(int indexOffset) {
GrDrawTarget::GrDrawTarget(GrContext* context)
: fClip(NULL)
- , fContext(context) {
+ , fContext(context)
+ , fPushGpuTraceCount(0) {
SkASSERT(NULL != context);
fDrawState = &fDefaultDrawState;
@@ -547,6 +548,28 @@ void GrDrawTarget::drawPath(const GrPath* path, SkPath::FillType fill) {
this->onDrawPath(path, fill, dstCopy.texture() ? &dstCopy : NULL);
}
+void GrDrawTarget::instantGpuTraceEvent(const char* marker) {
+ if (this->caps()->gpuTracingSupport()) {
+ this->onInstantGpuTraceEvent(marker);
+ }
+}
+
+void GrDrawTarget::pushGpuTraceEvent(const char* marker) {
+ SkASSERT(fPushGpuTraceCount >= 0);
+ if (this->caps()->gpuTracingSupport()) {
+ this->onPushGpuTraceEvent(marker);
+ ++fPushGpuTraceCount;
+ }
+}
+
+void GrDrawTarget::popGpuTraceEvent() {
+ SkASSERT(fPushGpuTraceCount >= 1);
+ if (this->caps()->gpuTracingSupport()) {
+ this->onPopGpuTraceEvent();
+ --fPushGpuTraceCount;
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
bool GrDrawTarget::willUseHWAALines() const {
@@ -971,6 +994,7 @@ void GrDrawTargetCaps::reset() {
fPathRenderingSupport = false;
fDstReadInShaderSupport = false;
fReuseScratchTextures = true;
+ fGpuTracingSupport = false;
fMaxRenderTargetSize = 0;
fMaxTextureSize = 0;
@@ -993,6 +1017,7 @@ GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) {
fPathRenderingSupport = other.fPathRenderingSupport;
fDstReadInShaderSupport = other.fDstReadInShaderSupport;
fReuseScratchTextures = other.fReuseScratchTextures;
+ fGpuTracingSupport = other.fGpuTracingSupport;
fMaxRenderTargetSize = other.fMaxRenderTargetSize;
fMaxTextureSize = other.fMaxTextureSize;
@@ -1019,6 +1044,7 @@ SkString GrDrawTargetCaps::dump() const {
r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport]);
r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport]);
r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]);
+ r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSupport]);
r.appendf("Max Texture Size : %d\n", fMaxTextureSize);
r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize);
r.appendf("Max Sample Count : %d\n", fMaxSampleCount);
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index c5058699b5..19ce16f64a 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -423,6 +423,20 @@ public:
GrRenderTarget* renderTarget = NULL) = 0;
/**
+ * instantGpuTraceEvent places a single "sign post" type marker into command stream. The
+ * argument marker will be the name of the annotation that is added.
+ */
+ void instantGpuTraceEvent(const char* marker);
+ /**
+ * The following two functions are used for marking groups of commands. Use pushGpuTraceEvent
+ * to set the beginning of a command set, and popGpuTraceEvent is be called at end of the
+ * command set. The argument marker is the name for the annotation that is added. The push and
+ * pops can be used hierarchically, but every push must have a match pop.
+ */
+ void pushGpuTraceEvent(const char* marker);
+ void popGpuTraceEvent();
+
+ /**
* Copies a pixel rectangle from one surface to another. This call may finalize
* reserved vertex/index data (as though a draw call was made). The src pixels
* copied are specified by srcRect. They are copied to a rect of the same
@@ -854,6 +868,10 @@ private:
virtual void onDrawPath(const GrPath*, SkPath::FillType,
const GrDeviceCoordTexture* dstCopy) = 0;
+ virtual void onInstantGpuTraceEvent(const char* marker) = 0;
+ virtual void onPushGpuTraceEvent(const char* marker) = 0;
+ virtual void onPopGpuTraceEvent() = 0;
+
// helpers for reserving vertex and index space.
bool reserveVertexSpace(size_t vertexSize,
int vertexCount,
@@ -888,6 +906,8 @@ private:
GrDrawState fDefaultDrawState;
// The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTarget.
GrContext* fContext;
+ // To keep track that we always have at least as many debug marker pushes as pops
+ int fPushGpuTraceCount;
typedef SkRefCnt INHERITED;
};
diff --git a/src/gpu/GrDrawTargetCaps.h b/src/gpu/GrDrawTargetCaps.h
index b316e491c1..b33217a125 100644
--- a/src/gpu/GrDrawTargetCaps.h
+++ b/src/gpu/GrDrawTargetCaps.h
@@ -40,6 +40,7 @@ public:
bool bufferLockSupport() const { return fBufferLockSupport; }
bool pathRenderingSupport() const { return fPathRenderingSupport; }
bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; }
+ bool gpuTracingSupport() const { return fGpuTracingSupport; }
// Scratch textures not being reused means that those scratch textures
// that we upload to (i.e., don't have a render target) will not be
@@ -71,6 +72,7 @@ protected:
bool fPathRenderingSupport : 1;
bool fDstReadInShaderSupport : 1;
bool fReuseScratchTextures : 1;
+ bool fGpuTracingSupport : 1;
int fMaxRenderTargetSize;
int fMaxTextureSize;
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 669167c419..44bf4edab7 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -441,6 +441,18 @@ void GrInOrderDrawBuffer::clear(const SkIRect* rect, GrColor color,
renderTarget->ref();
}
+void GrInOrderDrawBuffer::onInstantGpuTraceEvent(const char* marker) {
+ // TODO: adds command to buffer
+}
+
+void GrInOrderDrawBuffer::onPushGpuTraceEvent(const char* marker) {
+ // TODO: adds command to buffer
+}
+
+void GrInOrderDrawBuffer::onPopGpuTraceEvent() {
+ // TODO: adds command to buffer
+}
+
void GrInOrderDrawBuffer::reset() {
SkASSERT(1 == fGeoPoolStateStack.count());
this->resetVertexSource();
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index 6b680b2d55..60e01f01b9 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -168,6 +168,11 @@ private:
bool quickInsideClip(const SkRect& devBounds);
+ virtual void onInstantGpuTraceEvent(const char* marker) SK_OVERRIDE;
+ virtual void onPushGpuTraceEvent(const char* marker) SK_OVERRIDE;
+ virtual void onPopGpuTraceEvent() SK_OVERRIDE;
+
+
// Attempts to concat instances from info onto the previous draw. info must represent an
// instanced draw. The caller must have already recorded a new draw state and clip if necessary.
int concatInstancedDraw(const DrawInfo& info);
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index bdb19e2e3a..a60230a2fe 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -312,6 +312,8 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering");
SkASSERT(!fPathRenderingSupport || fFixedFunctionSupport);
+ fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker");
+
fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType;
// Disable scratch texture reuse on Mali and Adreno devices
diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp
index 105fb0b604..fa404ce090 100644
--- a/src/gpu/gl/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -335,12 +335,15 @@ const GrGLInterface* GrGLCreateNullInterface() {
functions->fGetStringi = noOpGLGetStringi;
functions->fGetTexLevelParameteriv = noOpGLGetTexLevelParameteriv;
functions->fGetUniformLocation = noOpGLGetUniformLocation;
+ functions->fInsertEventMarker = noOpGLInsertEventMarker;
functions->fLoadIdentity = noOpGLLoadIdentity;
functions->fLoadMatrixf = noOpGLLoadMatrixf;
functions->fLineWidth = noOpGLLineWidth;
functions->fLinkProgram = noOpGLLinkProgram;
functions->fMatrixMode = noOpGLMatrixMode;
functions->fPixelStorei = nullGLPixelStorei;
+ functions->fPopGroupMarker = noOpGLPopGroupMarker;
+ functions->fPushGroupMarker = noOpGLPushGroupMarker;
functions->fQueryCounter = noOpGLQueryCounter;
functions->fReadBuffer = noOpGLReadBuffer;
functions->fReadPixels = nullGLReadPixels;
diff --git a/src/gpu/gl/GrGLExtensions.cpp b/src/gpu/gl/GrGLExtensions.cpp
index 33273e5f65..6d1b04d2cc 100644
--- a/src/gpu/gl/GrGLExtensions.cpp
+++ b/src/gpu/gl/GrGLExtensions.cpp
@@ -120,6 +120,17 @@ bool GrGLExtensions::remove(const char ext[]) {
}
}
+void GrGLExtensions::add(const char ext[]) {
+ int idx = find_string(*fStrings, ext);
+ if (idx < 0) {
+ // This is not the most effecient approach since we end up doing a full sort of the
+ // extensions after the add
+ fStrings->push_back().set(ext);
+ SkTLessFunctionToFunctorAdaptor<SkString, extension_compare> cmp;
+ SkTQSort(&fStrings->front(), &fStrings->back(), cmp);
+ }
+}
+
void GrGLExtensions::print(const char* sep) const {
if (NULL == sep) {
sep = " ";
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index f7b0a53c20..5bee4084eb 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -18,6 +18,23 @@ void GrGLDefaultInterfaceCallback(const GrGLInterface*) {}
}
#endif
+const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface* interface,
+ GrGLInsertEventMarkerProc insertEventMarkerFn,
+ GrGLPushGroupMarkerProc pushGroupMarkerFn,
+ GrGLPopGroupMarkerProc popGroupMarkerFn) {
+ GrGLInterface* newInterface = GrGLInterface::NewClone(interface);
+
+ if (!newInterface->fExtensions.has("GL_EXT_debug_marker")) {
+ newInterface->fExtensions.add("GL_EXT_debug_marker");
+ }
+
+ newInterface->fInsertEventMarker = insertEventMarkerFn;
+ newInterface->fPushGroupMarker = pushGroupMarkerFn;
+ newInterface->fPopGroupMarker = popGroupMarkerFn;
+
+ return newInterface;
+}
+
const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) {
GrGLInterface* newInterface = GrGLInterface::NewClone(interface);
@@ -157,6 +174,7 @@ GrGLInterface::GrGLInterface()
, fGetStringi(&fFunctions.fGetStringi)
, fGetTexLevelParameteriv(&fFunctions.fGetTexLevelParameteriv)
, fGetUniformLocation(&fFunctions.fGetUniformLocation)
+ , fInsertEventMarker(&fFunctions.fInsertEventMarker)
, fLineWidth(&fFunctions.fLineWidth)
, fLinkProgram(&fFunctions.fLinkProgram)
, fLoadIdentity(&fFunctions.fLoadIdentity)
@@ -164,6 +182,8 @@ GrGLInterface::GrGLInterface()
, fMapBuffer(&fFunctions.fMapBuffer)
, fMatrixMode(&fFunctions.fMatrixMode)
, fPixelStorei(&fFunctions.fPixelStorei)
+ , fPopGroupMarker(&fFunctions.fPopGroupMarker)
+ , fPushGroupMarker(&fFunctions.fPushGroupMarker)
, fQueryCounter(&fFunctions.fQueryCounter)
, fReadBuffer(&fFunctions.fReadBuffer)
, fReadPixels(&fFunctions.fReadPixels)
@@ -655,5 +675,15 @@ bool GrGLInterface::validate() const {
}
}
}
+
+#if 0
+ if (fExtensions.has("GL_EXT_debug_marker")) {
+ if (NULL == fFunctions.fInsertEventMarker ||
+ NULL == fFunctions.fPushGroupMarker ||
+ NULL == fFunctions.fPopGroupMarker) {
+ return false;
+ }
+ }
+#endif
return true;
}
diff --git a/src/gpu/gl/GrGLNoOpInterface.cpp b/src/gpu/gl/GrGLNoOpInterface.cpp
index 0641af85d7..a9a7d3f631 100644
--- a/src/gpu/gl/GrGLNoOpInterface.cpp
+++ b/src/gpu/gl/GrGLNoOpInterface.cpp
@@ -656,3 +656,10 @@ GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const cha
static int gUniLocation = 0;
return ++gUniLocation;
}
+
+GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const char* marker) {
+}
+GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const char* marker) {
+}
+GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker() {
+}
diff --git a/src/gpu/gl/GrGLNoOpInterface.h b/src/gpu/gl/GrGLNoOpInterface.h
index 8fe9b44ea2..20c67a3128 100644
--- a/src/gpu/gl/GrGLNoOpInterface.h
+++ b/src/gpu/gl/GrGLNoOpInterface.h
@@ -375,4 +375,8 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetTexLevelParameteriv(GrGLenum target,
GrGLint GR_GL_FUNCTION_TYPE noOpGLGetUniformLocation(GrGLuint program, const char* name);
+GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const char* marker);
+GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const char* marker);
+GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker();
+
#endif
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index ec9c8d6fab..5fb268863b 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -117,14 +117,12 @@ GrGpuGL::GrGpuGL(const GrGLContext& ctx, GrContext* context)
, fGLContext(ctx) {
SkASSERT(ctx.isInitialized());
-
fCaps.reset(SkRef(ctx.caps()));
fHWBoundTextures.reset(this->glCaps().maxFragmentTextureUnits());
fHWTexGenSettings.reset(this->glCaps().maxFixedFunctionTextureCoords());
GrGLClearErr(fGLContext.interface());
-
if (gPrintStartupSpew) {
const GrGLubyte* vendor;
const GrGLubyte* renderer;
@@ -2663,6 +2661,23 @@ bool GrGpuGL::onCanCopySurface(GrSurface* dst,
return INHERITED::onCanCopySurface(dst, src, srcRect, dstPoint);
}
+void GrGpuGL::onInstantGpuTraceEvent(const char* marker) {
+ if (this->caps()->gpuTracingSupport()) {
+ // GL_CALL(InsertEventMarker(0, marker));
+ }
+}
+
+void GrGpuGL::onPushGpuTraceEvent(const char* marker) {
+ if (this->caps()->gpuTracingSupport()) {
+ // GL_CALL(PushGroupMarker(0, marker));
+ }
+}
+
+void GrGpuGL::onPopGpuTraceEvent() {
+ if (this->caps()->gpuTracingSupport()) {
+ // GL_CALL(PopGroupMarker());
+ }
+}
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index edd58c44bc..05802550af 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -162,6 +162,12 @@ private:
bool insideClip) SK_OVERRIDE;
virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
+ // GrDrawTarget ovverides
+ virtual void onInstantGpuTraceEvent(const char* marker) SK_OVERRIDE;
+ virtual void onPushGpuTraceEvent(const char* marker) SK_OVERRIDE;
+ virtual void onPopGpuTraceEvent() SK_OVERRIDE;
+
+
// binds texture unit in GL
void setTextureUnit(int unitIdx);
diff --git a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
index 1f91165304..4c8c37827a 100644
--- a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
+++ b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
@@ -190,6 +190,12 @@ static GrGLInterface* create_es_interface(GrGLVersion version,
functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBufferOES");
#endif
+ if (extensions.has("GL_EXT_debug_marker")) {
+ functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glInsertEventMarkerEXT");
+ functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glPushGroupMarkerEXT");
+ functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glPopGropuMarkerEXT");
+ }
+
return interface;
}
@@ -389,6 +395,12 @@ static GrGLInterface* create_desktop_interface(GrGLVersion version,
functions->fPointAlongPath = (GrGLPointAlongPathProc) eglGetProcAddress("glPointAlongPathNV");
}
+ if (extensions.has("GL_EXT_debug_marker")) {
+ functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glInsertEventMarkerEXT");
+ functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glPushGroupMarkerEXT");
+ functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glPopGropuMarkerEXT");
+ }
+
return interface;
}
diff --git a/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp b/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
index 1695c3c36f..95229df36d 100644
--- a/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
+++ b/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
@@ -153,6 +153,12 @@ const GrGLInterface* GrGLCreateANGLEInterface() {
functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOES");
functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBufferOES");
+ if (extensions.has("GL_EXT_debug_marker")) {
+ functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glInsertEventMarkerEXT");
+ functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glPushGroupMarkerEXT");
+ functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glPopGropuMarkerEXT");
+ }
+
interface->fExtensions.init(kGLES_GrGLStandard,
interface->fFunctions.fGetString,
interface->fFunctions.fGetStringi,
diff --git a/src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp b/src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp
index d8b4e1f8cc..ee41df7715 100644
--- a/src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp
+++ b/src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp
@@ -144,6 +144,12 @@ const GrGLInterface* GrGLCreateNativeInterface() {
functions->fGenVertexArrays = glGenVertexArraysOES;
#endif
+#if GL_EXT_debug_marker
+ functions->fInsertEventMarker = glInsertEventMarkerEXT;
+ functions->fPushGroupMarker = glPushGroupMarkerEXT;
+ functions->fPopGroupMarker = glPopGropuMarkerEXT;
+#endif
+
interface->fStandard = kGLES_GrGLStandard;
interface->fExtensions.init(kGLES_GrGLStandard, glGetString, NULL, glGetIntegerv);
diff --git a/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp b/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp
index f57b80ebc7..f580997a89 100644
--- a/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp
+++ b/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp
@@ -241,6 +241,12 @@ const GrGLInterface* GrGLCreateNativeInterface() {
GET_PROC(BindFragDataLocationIndexed);
}
+ if (extensions.has("GL_EXT_debug_marker")) {
+ GET_PROC_SUFFIX(InsertEventMarker, EXT);
+ GET_PROC_SUFFIX(PushGroupMarker, EXT);
+ GET_PROC_SUFFIX(PopGroupMarker, EXT);
+ }
+
interface->fExtensions.swap(&extensions);
return interface;
}
diff --git a/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp b/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp
index 59314445b3..0ce6d2f295 100644
--- a/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp
+++ b/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp
@@ -221,6 +221,12 @@ const GrGLInterface* GrGLCreateMesaInterface() {
}
GR_GL_GET_PROC(BindFragDataLocationIndexed);
+ if (extensions.has("GL_EXT_debug_marker")) {
+ GR_GL_GET_PROC_SUFFIX(InsertEventMarker, EXT);
+ GR_GL_GET_PROC_SUFFIX(PopGroupMarker, EXT);
+ GR_GL_GET_PROC_SUFFIX(PushGroupMarker, EXT);
+ }
+
interface->fStandard = kGL_GrGLStandard;
interface->fExtensions.swap(&extensions);
diff --git a/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp b/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp
index 67d7ef5a5f..8ef5ca231e 100644
--- a/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp
+++ b/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp
@@ -275,6 +275,12 @@ const GrGLInterface* GrGLCreateNativeInterface() {
GR_GL_GET_PROC_SUFFIX(PointAlongPath, NV);
}
+ if (extensions.has("GL_EXT_debug_marker")) {
+ GR_GL_GET_PROC_SUFFIX(InsertEventMarker, EXT);
+ GR_GL_GET_PROC_SUFFIX(PushGroupMarker, EXT);
+ GR_GL_GET_PROC_SUFFIX(PopGroupMarker, EXT);
+ }
+
interface->fStandard = kGL_GrGLStandard;
interface->fExtensions.swap(&extensions);
diff --git a/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp b/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp
index e901b3602c..645a582037 100644
--- a/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp
+++ b/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp
@@ -304,6 +304,12 @@ const GrGLInterface* GrGLCreateNativeInterface() {
WGL_SET_PROC_SUFFIX(PointAlongPath, NV);
}
+ if (extensions.has("GL_EXT_debug_marker")) {
+ WGL_SET_PROC_SUFFIX(InsertEventMarker, EXT);
+ WGL_SET_PROC_SUFFIX(PushGroupMarker, EXT);
+ WGL_SET_PROC_SUFFIX(PopGroupMarker, EXT);
+ }
+
interface->fStandard = kGL_GrGLStandard;
interface->fExtensions.swap(&extensions);