diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-12-11 08:40:05 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-12-11 08:40:05 +0000 |
commit | 21ab4c9f31674b113c24177398ed39f29b7cd8e6 (patch) | |
tree | 8be392d7a792d9663c2586396be77bfd506f5164 /lib/mesa/src/glx/tests | |
parent | a8f0a7916e26e550dd2a26e7188835c481978004 (diff) |
Import Mesa 13.0.2
Diffstat (limited to 'lib/mesa/src/glx/tests')
6 files changed, 14 insertions, 11 deletions
diff --git a/lib/mesa/src/glx/tests/clientinfo_unittest.cpp b/lib/mesa/src/glx/tests/clientinfo_unittest.cpp index b56c94be4..320e8fcc0 100644 --- a/lib/mesa/src/glx/tests/clientinfo_unittest.cpp +++ b/lib/mesa/src/glx/tests/clientinfo_unittest.cpp @@ -23,9 +23,7 @@ #include <gtest/gtest.h> #include <string.h> -extern "C" { #include "glxclient.h" -} #include <xcb/glx.h> diff --git a/lib/mesa/src/glx/tests/create_context_unittest.cpp b/lib/mesa/src/glx/tests/create_context_unittest.cpp index 819b0b27d..a2590589d 100644 --- a/lib/mesa/src/glx/tests/create_context_unittest.cpp +++ b/lib/mesa/src/glx/tests/create_context_unittest.cpp @@ -23,10 +23,8 @@ #include <gtest/gtest.h> #include <string.h> -extern "C" { #include "glxclient.h" #include "glx_error.h" -} #include <xcb/glx.h> #include "mock_xdisplay.h" diff --git a/lib/mesa/src/glx/tests/fake_glx_screen.cpp b/lib/mesa/src/glx/tests/fake_glx_screen.cpp index db2074950..801f54a6f 100644 --- a/lib/mesa/src/glx/tests/fake_glx_screen.cpp +++ b/lib/mesa/src/glx/tests/fake_glx_screen.cpp @@ -75,7 +75,20 @@ indirect_create_context_attribs(struct glx_screen *base, return indirect_create_context(base, config_base, shareList, 0); } -__thread void *__glX_tls_Context = NULL; +/* This is necessary so that we don't have to link with glxcurrent.c + * which would require us to link with X libraries and what not. + */ +GLubyte dummyBuffer[__GLX_BUFFER_LIMIT_SIZE]; +struct glx_context_vtable dummyVtable; +struct glx_context dummyContext = { + &dummyBuffer[0], + &dummyBuffer[0], + &dummyBuffer[0], + &dummyBuffer[__GLX_BUFFER_LIMIT_SIZE], + sizeof(dummyBuffer), + &dummyVtable +}; +__thread void *__glX_tls_Context = &dummyContext; #if !defined(GLX_USE_TLS) extern "C" struct glx_context * diff --git a/lib/mesa/src/glx/tests/fake_glx_screen.h b/lib/mesa/src/glx/tests/fake_glx_screen.h index 0249e79bc..39b250ffc 100644 --- a/lib/mesa/src/glx/tests/fake_glx_screen.h +++ b/lib/mesa/src/glx/tests/fake_glx_screen.h @@ -20,9 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -extern "C" { #include "glxclient.h" -}; class fake_glx_screen : public glx_screen { public: diff --git a/lib/mesa/src/glx/tests/query_renderer_implementation_unittest.cpp b/lib/mesa/src/glx/tests/query_renderer_implementation_unittest.cpp index 7f8f30186..c3f5cc721 100644 --- a/lib/mesa/src/glx/tests/query_renderer_implementation_unittest.cpp +++ b/lib/mesa/src/glx/tests/query_renderer_implementation_unittest.cpp @@ -26,13 +26,11 @@ #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) -extern "C" { #include "glxclient.h" #include "glx_error.h" #include "dri2.h" #include "dri_interface.h" #include "dri2_priv.h" -} struct attribute_test_vector { const char *glx_string; diff --git a/lib/mesa/src/glx/tests/query_renderer_unittest.cpp b/lib/mesa/src/glx/tests/query_renderer_unittest.cpp index 2f3c4ef12..dc88cc94f 100644 --- a/lib/mesa/src/glx/tests/query_renderer_unittest.cpp +++ b/lib/mesa/src/glx/tests/query_renderer_unittest.cpp @@ -24,10 +24,8 @@ #include <signal.h> #include <setjmp.h> -extern "C" { #include "glxclient.h" #include "glx_error.h" -} extern bool GetGLXScreenConfigs_called; extern struct glx_screen *psc; |