aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 630d3525fd4..674364c7b0c 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);
+ }
}