aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/dd.h6
-rw-r--r--src/mesa/main/errors.c13
-rw-r--r--src/mesa/main/errors.h3
-rw-r--r--src/mesa/main/extensions_table.h2
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp3
6 files changed, 28 insertions, 0 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 70ed5633f7b..d4378e51159 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -762,6 +762,12 @@ struct dd_function_table {
void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
/*@}*/
+ /**
+ * \name GREMEDY debug/marker functions
+ */
+ /*@{*/
+ void (*EmitStringMarker)(struct gl_context *ctx, const GLchar *string, GLsizei len);
+ /*@}*/
/**
* \name Support for multiple T&L engines
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index 9e6610918c4..630d3525fd4 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -1276,6 +1276,19 @@ _mesa_free_errors_data(struct gl_context *ctx)
mtx_destroy(&ctx->DebugMutex);
}
+void GLAPIENTRY
+_mesa_StringMarkerGREMEDY(GLsizei len, const GLvoid *string)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (ctx->Extensions.GREMEDY_string_marker) {
+ /* if length not specified, string will be null terminated: */
+ if (len <= 0)
+ len = strlen(string);
+ ctx->Driver.EmitStringMarker(ctx, string, len);
+ } else {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "StringMarkerGREMEDY");
+ }
+}
/**********************************************************************/
/** \name Diagnostics */
diff --git a/src/mesa/main/errors.h b/src/mesa/main/errors.h
index f2919765488..92df2ac868a 100644
--- a/src/mesa/main/errors.h
+++ b/src/mesa/main/errors.h
@@ -138,6 +138,9 @@ _mesa_PushDebugGroup(GLenum source, GLuint id, GLsizei length,
void GLAPIENTRY
_mesa_PopDebugGroup(void);
+void GLAPIENTRY
+_mesa_StringMarkerGREMEDY(GLsizei len, const GLvoid *string);
+
#ifdef __cplusplus
}
#endif
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index aeccb017423..9cec1762dbe 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -251,6 +251,8 @@ EXT(EXT_unpack_subimage , dummy_true
EXT(EXT_vertex_array , dummy_true , GLL, x , x , x , 1995)
EXT(EXT_vertex_array_bgra , EXT_vertex_array_bgra , GLL, GLC, x , x , 2008)
+EXT(GREMEDY_string_marker , GREMEDY_string_marker , GLL, GLC, x , x , 2007)
+
EXT(IBM_multimode_draw_arrays , dummy_true , GLL, GLC, x , x , 1998)
EXT(IBM_rasterpos_clip , dummy_true , GLL, x , x , x , 1996)
EXT(IBM_texture_mirrored_repeat , dummy_true , GLL, x , x , x , 1998)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 0992d4d30f0..3912c2bc847 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3880,6 +3880,7 @@ struct gl_extensions
GLboolean ATI_texture_env_combine3;
GLboolean ATI_fragment_shader;
GLboolean ATI_separate_stencil;
+ GLboolean GREMEDY_string_marker;
GLboolean INTEL_performance_query;
GLboolean KHR_texture_compression_astc_hdr;
GLboolean KHR_texture_compression_astc_ldr;
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 7610bcbd701..eb1108124e9 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -940,6 +940,9 @@ const struct function common_desktop_functions_possible[] = {
{ "glGetTextureSubImage", 20, -1 },
{ "glGetCompressedTextureSubImage", 20, -1 },
+ /* GL_GREMEDY_string_marker */
+ { "glStringMarkerGREMEDY", 15, -1 },
+
{ NULL, 0, -1 }
};