#include "deUniquePtr.hpp"
#include "gluPlatform.hpp"
+#include "vkPlatform.hpp"
#include "tcuX11.hpp"
+#include "tcuFunctionLibrary.hpp"
#if defined (DEQP_SUPPORT_GLX)
# include "tcuX11GlxPlatform.hpp"
}
};
+class VulkanLibrary : public vk::Library
+{
+public:
+ VulkanLibrary (void)
+ : m_library ("libvulkan.so")
+ , m_driver (m_library)
+ {
+ }
+
+ const vk::PlatformInterface& getPlatformInterface (void) const
+ {
+ return m_driver;
+ }
+
+private:
+ const tcu::DynamicFunctionLibrary m_library;
+ const vk::PlatformDriver m_driver;
+};
+
+class X11VulkanPlatform : public vk::Platform
+{
+public:
+ vk::Library* createLibrary (void) const
+ {
+ return new VulkanLibrary();
+ }
+};
+
class X11Platform : public tcu::Platform
{
public:
- X11Platform (void);
- bool processEvents (void) { return !m_eventState.getQuitFlag(); }
- const glu::Platform& getGLPlatform (void) const { return m_glPlatform; }
+ X11Platform (void);
+ bool processEvents (void) { return !m_eventState.getQuitFlag(); }
+ const glu::Platform& getGLPlatform (void) const { return m_glPlatform; }
#if defined (DEQP_SUPPORT_EGL)
- const eglu::Platform& getEGLPlatform (void) const { return m_eglPlatform; }
+ const eglu::Platform& getEGLPlatform (void) const { return m_eglPlatform; }
#endif // DEQP_SUPPORT_EGL
+ const vk::Platform& getVulkanPlatform (void) const { return m_vkPlatform; }
+
private:
EventState m_eventState;
#if defined (DEQP_SUPPORT_EGL)
x11::egl::Platform m_eglPlatform;
#endif // DEQP_SPPORT_EGL
X11GLPlatform m_glPlatform;
+ X11VulkanPlatform m_vkPlatform;
};
X11Platform::X11Platform (void)