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.turney@dronecode.org.uk>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 63041ba613)
This commit is contained in:
Jon Turney 2018-01-25 17:34:54 +00:00 committed by Emil Velikov
parent 9d7a80f4ae
commit 937b151e4f
2 changed files with 16 additions and 0 deletions

View 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.
*/

View 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