summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/errors.c
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2015-12-05 11:32:25 -0500
committerRob Clark <robclark@freedesktop.org>2016-01-21 17:19:05 -0500
commita6a99fbf05865efcb628ecb2a19d1d77db34c865 (patch)
tree7f92c9216bbd5c95a9c3215bc550d001b70dc410 /src/mesa/main/errors.c
parent1f7a96e005be0c0941df5487a11c53f048ebd58a (diff)
downloadexternal_mesa3d-a6a99fbf05865efcb628ecb2a19d1d77db34c865.zip
external_mesa3d-a6a99fbf05865efcb628ecb2a19d1d77db34c865.tar.gz
external_mesa3d-a6a99fbf05865efcb628ecb2a19d1d77db34c865.tar.bz2
mesa: wire up EmitStringMarker for KHR_debug
The extension spec[1] describes DEBUG_TYPE_MARKER as "Annotation of the command stream". So for DEBUG_TYPE_MARKER, also pass the buf to the driver's EmitStringMarker() to be inserted in the command stream. [1] https://www.opengl.org/registry/specs/KHR/debug.txt Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/main/errors.c')
-rw-r--r--src/mesa/main/errors.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index 630d352..674364c 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -1018,6 +1018,13 @@ _mesa_DebugMessageInsert(GLenum source, GLenum type, GLuint id,
gl_enum_to_debug_type(type), id,
gl_enum_to_debug_severity(severity),
length, buf);
+
+ if (type == GL_DEBUG_TYPE_MARKER && ctx->Driver.EmitStringMarker) {
+ /* if length not specified, string will be null terminated: */
+ if (length < 0)
+ length = strlen(buf);
+ ctx->Driver.EmitStringMarker(ctx, buf, length);
+ }
}