summaryrefslogtreecommitdiffstats
path: root/src/glx/tests/fake_glx_screen.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-02-17 13:53:19 -0800
committerIan Romanick <[email protected]>2013-11-07 18:12:33 -0800
commit0cce5538673148ffcd7aa9479f6b88cf9a641352 (patch)
tree568867a00ed6b47da0611d7594c64d1f8a5b90aa /src/glx/tests/fake_glx_screen.cpp
parentd4cc1869374c93ef82db5298e9a3941c69e61831 (diff)
glx/tests: Add unit tests for the GLX part of GLX_MESA_query_renderer
These tests primarilly ensure that the functions added by this extension don't abuse other interfaces (e.g., glx_screen::query_renderer_integer) when provided bad data. These tests helped me find a couple small bugs in the initial implementation. Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glx/tests/fake_glx_screen.cpp')
-rw-r--r--src/glx/tests/fake_glx_screen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glx/tests/fake_glx_screen.cpp b/src/glx/tests/fake_glx_screen.cpp
index 7ee9b82e7c7..29f244117cd 100644
--- a/src/glx/tests/fake_glx_screen.cpp
+++ b/src/glx/tests/fake_glx_screen.cpp
@@ -74,3 +74,11 @@ indirect_create_context_attribs(struct glx_screen *base,
return indirect_create_context(base, config_base, shareList, 0);
}
+
+__thread void *__glX_tls_Context = NULL;
+
+extern "C" struct glx_context *
+__glXGetCurrentContext()
+{
+ return (struct glx_context *) __glX_tls_Context;
+}