Module: Mesa
Branch: master
Commit: 63041ba61308a0576c73cb6bc3d98540669188cf
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=63041ba61308a0576c73cb6bc3d98540669188cf

Author: Jon Turney <jon.tur...@dronecode.org.uk>
Date:   Thu Jan 25 17:34:54 2018 +0000

glx/test: fix building for osx

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.tur...@dronecode.org.uk>
Reviewed-by: Emil Velikov <emil.veli...@collabora.com>

---

 src/glx/tests/fake_glx_screen.cpp | 12 ++++++++++++
 src/glx/tests/indirect_api.cpp    |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/src/glx/tests/fake_glx_screen.cpp 
b/src/glx/tests/fake_glx_screen.cpp
index 801f54a6fa..ca0ca36805 100644
--- a/src/glx/tests/fake_glx_screen.cpp
+++ b/src/glx/tests/fake_glx_screen.cpp
@@ -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.
  */
diff --git a/src/glx/tests/indirect_api.cpp b/src/glx/tests/indirect_api.cpp
index 34304a185e..b9a4ca0655 100644
--- a/src/glx/tests/indirect_api.cpp
+++ b/src/glx/tests/indirect_api.cpp
@@ -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

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to