throw tcu::NotSupportedError("eglu::NativeDisplay can't be used with eglGetPlatformDisplay()", DE_NULL, __FILE__, __LINE__);
}
+const EGLAttrib* NativeDisplay::getPlatformAttributes (void) const
+{
+ TCU_CHECK_INTERNAL((m_capabilities & CAPABILITY_GET_DISPLAY_PLATFORM) == 0);
+ return DE_NULL;
+}
+
// NativeDisplayFactory
NativeDisplayFactory::NativeDisplayFactory (const std::string& name, const std::string& description, NativeDisplay::Capability capabilities, EGLenum platformType, const char* platformExtension)
//! Return display pointer that can be used with eglGetPlatformDisplay(). Default implementations throw tcu::NotSupportedError()
virtual void* getPlatformNative (void);
+ //! Attributes to pass to eglGetPlatformDisplay(EXT)
+ virtual const eglw::EGLAttrib* getPlatformAttributes (void) const;
+
protected:
NativeDisplay (Capability capabilities, eglw::EGLenum platformType, const char* platformExtension);
NativeDisplay (Capability capabilities);
if (usePlatformExt)
{
- display = egl.getPlatformDisplayEXT(nativeDisplay.getPlatformType(), nativeDisplay.getPlatformNative(), DE_NULL);
+ const vector<EGLint> legacyAttribs = toLegacyAttribList(nativeDisplay.getPlatformAttributes());
+
+ display = egl.getPlatformDisplayEXT(nativeDisplay.getPlatformType(), nativeDisplay.getPlatformNative(), &legacyAttribs[0]);
EGLU_CHECK_MSG(egl, "eglGetPlatformDisplayEXT()");
TCU_CHECK(display != EGL_NO_DISPLAY);
}