summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index b27274725fc..92a630eff97 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -279,6 +279,12 @@ void st_make_current(struct st_context *st,
}
}
+struct st_context *st_get_current(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ return (ctx == NULL) ? NULL : ctx->st;
+}
void st_copy_context_state(struct st_context *dst,
struct st_context *src,