[Mesa-dev] [PATCH 1/4] mesa: add GREMEDY_string_marker
Rob Clark
robdclark at gmail.com
Mon Dec 7 08:45:52 PST 2015
From: Rob Clark <robclark at freedesktop.org>
Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
src/mapi/glapi/gen/GREMEDY_string_marker.xml | 18 ++++++++++++++++++
src/mapi/glapi/gen/Makefile.am | 1 +
src/mapi/glapi/gen/gl_API.xml | 2 ++
src/mapi/glapi/gen/gl_genexec.py | 1 +
src/mesa/main/dd.h | 6 ++++++
src/mesa/main/errors.c | 13 +++++++++++++
src/mesa/main/errors.h | 3 +++
src/mesa/main/extensions_table.h | 2 ++
src/mesa/main/mtypes.h | 1 +
src/mesa/main/tests/dispatch_sanity.cpp | 3 +++
10 files changed, 50 insertions(+)
create mode 100644 src/mapi/glapi/gen/GREMEDY_string_marker.xml
diff --git a/src/mapi/glapi/gen/GREMEDY_string_marker.xml b/src/mapi/glapi/gen/GREMEDY_string_marker.xml
new file mode 100644
index 0000000..ffa3eac
--- /dev/null
+++ b/src/mapi/glapi/gen/GREMEDY_string_marker.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+
+<category name="GL_GREMEDY_string_marker" number="311">
+
+ <function name="StringMarkerGREMEDY">
+ <param name="len" type="GLsizei"/>
+ <param name="string" type="const GLvoid *"/>
+ </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
index 2da8f7d..d2e3c49 100644
--- a/src/mapi/glapi/gen/Makefile.am
+++ b/src/mapi/glapi/gen/Makefile.am
@@ -187,6 +187,7 @@ API_XML = \
EXT_texture_array.xml \
EXT_texture_integer.xml \
EXT_transform_feedback.xml \
+ GREMEDY_string_marker.xml \
INTEL_performance_query.xml \
KHR_debug.xml \
KHR_context_flush_control.xml \
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 21f6293..29e89f3 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -12616,6 +12616,8 @@
<xi:include href="EXT_framebuffer_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="GREMEDY_string_marker.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<xi:include href="EXT_packed_depth_stencil.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="EXT_provoking_vertex.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
diff --git a/src/mapi/glapi/gen/gl_genexec.py b/src/mapi/glapi/gen/gl_genexec.py
index 6c66779..20b4f04 100644
--- a/src/mapi/glapi/gen/gl_genexec.py
+++ b/src/mapi/glapi/gen/gl_genexec.py
@@ -65,6 +65,7 @@ header = """/**
#include "main/context.h"
#include "main/convolve.h"
#include "main/copyimage.h"
+#include "main/debug.h"
#include "main/depth.h"
#include "main/dlist.h"
#include "main/drawpix.h"
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index e5281ce..2f7e9bd 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -757,6 +757,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 9e66109..e455272 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->Driver.EmitStringMarker) {
+ /* 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 f291976..d05bc71 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 52a4ed6..32ee653 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -249,6 +249,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 1eb1e21..1cdd845 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3797,6 +3797,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 d288b1d..eda4ee0 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 }
};
--
2.5.0
More information about the mesa-dev
mailing list