aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_context.c9
-rw-r--r--src/mesa/state_tracker/st_debug.c1
-rw-r--r--src/mesa/state_tracker/st_debug.h1
-rw-r--r--src/mesa/state_tracker/st_extensions.c5
4 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 4add50e3ed9..ce1e97aacb5 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -438,6 +438,12 @@ void st_destroy_context( struct st_context *st )
free(ctx);
}
+static void
+st_emit_string_marker(struct gl_context *ctx, const GLchar *string, GLsizei len)
+{
+ struct st_context *st = ctx->st;
+ st->pipe->emit_string_marker(st->pipe, string, len);
+}
void st_init_driver_functions(struct pipe_screen *screen,
struct dd_function_table *functions)
@@ -476,6 +482,9 @@ void st_init_driver_functions(struct pipe_screen *screen,
st_init_vdpau_functions(functions);
+ if (screen->get_param(screen, PIPE_CAP_STRING_MARKER))
+ functions->EmitStringMarker = st_emit_string_marker;
+
functions->Enable = st_Enable;
functions->UpdateState = st_invalidate_state;
}
diff --git a/src/mesa/state_tracker/st_debug.c b/src/mesa/state_tracker/st_debug.c
index 134366db09d..9eb3b53b230 100644
--- a/src/mesa/state_tracker/st_debug.c
+++ b/src/mesa/state_tracker/st_debug.c
@@ -57,6 +57,7 @@ static const struct debug_named_value st_debug_flags[] = {
{ "buffer", DEBUG_BUFFER, NULL },
{ "wf", DEBUG_WIREFRAME, NULL },
{ "precompile", DEBUG_PRECOMPILE, NULL },
+ { "gremedy", DEBUG_GREMEDY, "Enable GREMEDY debug extensions" },
DEBUG_NAMED_VALUE_END
};
diff --git a/src/mesa/state_tracker/st_debug.h b/src/mesa/state_tracker/st_debug.h
index ed3ead82914..a094fdc2bfa 100644
--- a/src/mesa/state_tracker/st_debug.h
+++ b/src/mesa/state_tracker/st_debug.h
@@ -50,6 +50,7 @@ st_print_current(void);
#define DEBUG_BUFFER 0x200
#define DEBUG_WIREFRAME 0x400
#define DEBUG_PRECOMPILE 0x800
+#define DEBUG_GREMEDY 0x1000
#ifdef DEBUG
extern int ST_DEBUG;
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 2a3e52362e4..53ea6767395 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -37,6 +37,7 @@
#include "util/u_math.h"
#include "st_context.h"
+#include "st_debug.h"
#include "st_extensions.h"
#include "st_format.h"
@@ -973,4 +974,8 @@ void st_init_extensions(struct pipe_screen *screen,
extensions->ARB_gpu_shader_fp64 = GL_TRUE;
extensions->ARB_vertex_attrib_64bit = GL_TRUE;
}
+
+ if ((ST_DEBUG & DEBUG_GREMEDY) &&
+ screen->get_param(screen, PIPE_CAP_STRING_MARKER))
+ extensions->GREMEDY_string_marker = GL_TRUE;
}