glx/test: fix building for osx
authorJon Turney <jon.turney@dronecode.org.uk>
Thu, 25 Jan 2018 17:34:54 +0000 (17:34 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Fri, 2 Feb 2018 15:28:52 +0000 (15:28 +0000)
An additional stub for applegl_create_context() is needed
Cannot test indirect API as it's not built on osx, currently

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/glx/tests/fake_glx_screen.cpp
src/glx/tests/indirect_api.cpp

index 801f54a6faac0fc75f3a7bb8d4d32f8a27f10285..ca0ca3680536385928eb47de4e6573cd32ebcc22 100644 (file)
@@ -75,6 +75,18 @@ indirect_create_context_attribs(struct glx_screen *base,
    return indirect_create_context(base, config_base, shareList, 0);
 }
 
+#ifdef GLX_USE_APPLEGL
+#warning Indirect GLX tests are not built
+extern "C" struct glx_context *
+applegl_create_context(struct glx_screen *base,
+                      struct glx_config *config_base,
+                      struct glx_context *shareList,
+                      int renderType)
+{
+   return indirect_create_context(base, config_base, shareList, renderType);
+}
+#endif
+
 /* 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.
  */
index 34304a185e48bca9e8d216821e1eb0150c8e98e5..b9a4ca0655e006cb05a8735b420f9f87952130a5 100644 (file)
@@ -705,6 +705,8 @@ void __indirect_glFramebufferTextureLayer(void) { }
 }
 /*@}*/
 
+#ifndef GLX_USE_APPLEGL
+
 class IndirectAPI : public ::testing::Test {
 public:
    virtual void SetUp();
@@ -1518,3 +1520,5 @@ TEST_F(IndirectAPI, EXT_texture_array)
 {
    EXPECT_EQ((_glapi_proc) __indirect_glFramebufferTextureLayer, table[_glapi_get_proc_offset("glFramebufferTextureLayerEXT")]);
 }
+
+#endif