diff options
-rw-r--r-- | framework/platform/null/tcuNullPlatform.cpp | 41 | ||||
-rw-r--r-- | framework/platform/null/tcuNullPlatform.hpp | 4 | ||||
-rw-r--r-- | targets/null/null.cmake | 1 |
3 files changed, 42 insertions, 4 deletions
diff --git a/framework/platform/null/tcuNullPlatform.cpp b/framework/platform/null/tcuNullPlatform.cpp index 80f0a7e2a..8bb9568b0 100644 --- a/framework/platform/null/tcuNullPlatform.cpp +++ b/framework/platform/null/tcuNullPlatform.cpp @@ -23,16 +23,18 @@ #include "tcuNullPlatform.hpp" #include "tcuNullRenderContext.hpp" +#include "egluNativeDisplay.hpp" +#include "eglwLibrary.hpp" namespace tcu { namespace null { -class NullContextFactory : public glu::ContextFactory +class NullGLContextFactory : public glu::ContextFactory { public: - NullContextFactory (void) + NullGLContextFactory (void) : glu::ContextFactory("null", "Null Render Context") { } @@ -43,9 +45,42 @@ public: } }; +class NullEGLDisplay : public eglu::NativeDisplay +{ +public: + NullEGLDisplay (void) + : eglu::NativeDisplay(CAPABILITY_GET_DISPLAY_LEGACY) + { + // \note All functions in library are null + } + + const eglw::Library& getLibrary (void) const + { + return m_library; + } + +private: + eglw::FuncPtrLibrary m_library; +}; + +class NullEGLDisplayFactory : public eglu::NativeDisplayFactory +{ +public: + NullEGLDisplayFactory (void) + : eglu::NativeDisplayFactory("null", "Null EGL Display", eglu::NativeDisplay::CAPABILITY_GET_DISPLAY_LEGACY) + { + } + + eglu::NativeDisplay* createDisplay (const eglw::EGLAttrib*) const + { + return new NullEGLDisplay(); + } +}; + Platform::Platform (void) { - m_contextFactoryRegistry.registerFactory(new NullContextFactory()); + m_contextFactoryRegistry.registerFactory(new NullGLContextFactory()); + m_nativeDisplayFactoryRegistry.registerFactory(new NullEGLDisplayFactory()); } Platform::~Platform (void) diff --git a/framework/platform/null/tcuNullPlatform.hpp b/framework/platform/null/tcuNullPlatform.hpp index 11d6a1486..81ff514fc 100644 --- a/framework/platform/null/tcuNullPlatform.hpp +++ b/framework/platform/null/tcuNullPlatform.hpp @@ -26,19 +26,21 @@ #include "tcuDefs.hpp" #include "tcuPlatform.hpp" #include "gluPlatform.hpp" +#include "egluPlatform.hpp" namespace tcu { namespace null { -class Platform : public tcu::Platform, private glu::Platform +class Platform : public tcu::Platform, private glu::Platform, private eglu::Platform { public: Platform (void); virtual ~Platform (void); virtual const glu::Platform& getGLPlatform (void) const { return static_cast<const glu::Platform&>(*this); } + virtual const eglu::Platform& getEGLPlatform (void) const { return static_cast<const eglu::Platform&>(*this); } }; } // null diff --git a/targets/null/null.cmake b/targets/null/null.cmake index 45ac19baf..d86ef463b 100644 --- a/targets/null/null.cmake +++ b/targets/null/null.cmake @@ -2,6 +2,7 @@ message("*** Using null context target") set(DEQP_TARGET_NAME "Null") +set(DEQP_SUPPORT_EGL ON) set(DEQP_SUPPORT_GLES2 ON) set(DEQP_SUPPORT_GLES3 ON) set(DEQP_SUPPORT_OPENGL ON) |