glx: add getProcAddress override
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 10 Feb 2018 17:59:54 +0000 (12:59 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 10 Feb 2018 17:59:54 +0000 (12:59 -0500)
The regular function pointers are filled in on load, but any additional
pointers, potentially from extensions, requested by tests would end up
with NULLs, triggering failures.

Affects:
KHR-GL45.transform_feedback.draw_xfb_instanced_test
KHR-GL45.transform_feedback.draw_xfb_stream_instanced_test

framework/platform/lnx/X11/tcuLnxX11GlxPlatform.cpp

index 29a45e3..47f5de0 100644 (file)
@@ -183,6 +183,7 @@ public:
        void                                                            clearCurrent            (void);
        virtual const glw::Functions&           getFunctions            (void) const;
        virtual const tcu::RenderTarget&        getRenderTarget         (void) const;
+       virtual glw::GenericFuncType            getProcAddress          (const char* name) const;
        const GLXContext&                                       getGLXContext           (void) const;
 
 private:
@@ -734,6 +735,11 @@ void GlxRenderContext::clearCurrent (void)
                                                                                None, None, DE_NULL));
 }
 
+glw::GenericFuncType GlxRenderContext::getProcAddress(const char *name) const
+{
+       return glXGetProcAddress(reinterpret_cast<const GLubyte*>(name));
+}
+
 ContextType GlxRenderContext::getType (void) const
 {
        return m_type;