when eglChooseConfig() is successed but num_config is 0, creating context is failed.
it is depends on GPU driver, but we need to protect.
Change-Id: I68484312f2719a5e0c108e8d7a70fbf3d10d70f9
}
#endif // DALI_PROFILE_UBUNTU
configAttribs.PushBack( EGL_NONE );
}
#endif // DALI_PROFILE_UBUNTU
configAttribs.PushBack( EGL_NONE );
-
- if ( eglChooseConfig( mEglDisplay, &(configAttribs[0]), &mEglConfig, 1, &numConfigs ) != EGL_TRUE )
+ if ( ( eglChooseConfig( mEglDisplay, &(configAttribs[0]), &mEglConfig, 1, &numConfigs ) != EGL_TRUE ) ||
+ ( numConfigs != 1 ) )
{
if( mGlesVersion >= 30 )
{
{
if( mGlesVersion >= 30 )
{
+ if ( numConfigs != 1 )
+ {
+ DALI_LOG_ERROR("No configurations found.\n");
+
+ TEST_EGL_ERROR("eglChooseConfig");
+ }
+
EGLint error = eglGetError();
switch (error)
{
EGLint error = eglGetError();
switch (error)
{
}
mContextAttribs.PushBack( EGL_NONE );
}
mContextAttribs.PushBack( EGL_NONE );
- if ( numConfigs != 1 )
- {
- DALI_LOG_ERROR("No configurations found.\n");
-
- TEST_EGL_ERROR("eglChooseConfig");
- }
-