iMX6DL Vivante (5.0.11.p8) and 1366x768 resolution

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6DL Vivante (5.0.11.p8) and 1366x768 resolution

844 Views
florinmaticu
Contributor II

Hello everyone,

I have been experiencing problems creating a surface when trying to use the 1366x768 resolution with Vivante libraries.

The error that I got  after calling eglCreateWindowSurface is 0x3003 (EGL_BAD_ALLOC) 

I didn't experience this when using a 720p or 1080p resolution. I have attached the code bellow. 

Any ideas why it doesn't work with this particular resolution?

Thanks,

Florin

EGLConfig configs[10];
EGLint matchingConfigs;
EGLint err;
EGLint ctxAttribs[] =
{
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE
};

eglBindAPI(EGL_OPENGL_ES_API);

g_NativeDisplay = (NativeDisplayType)ozone_egl_nativeCreateDisplay();
fbGetDisplayGeometry(g_NativeDisplay,&g_WindowWidth,&g_WindowHeight);

g_EglDisplay = eglGetDisplay(g_NativeDisplay);
if (g_EglDisplay == EGL_NO_DISPLAY)
{
LOG(ERROR) << "eglGetDisplay returned EGL_NO_DISPLAY";
return OZONE_EGL_FAILURE;
}

EGLint major, minor;
if (!eglInitialize(g_EglDisplay, &major, &minor))
{
    LOG(ERROR) << "eglInitialize failed.";
return OZONE_EGL_FAILURE;
}
LOG(INFO) << "EGL impl. version: " << major << "." << minor;

if (!eglChooseConfig(g_EglDisplay, g_configAttribs, &configs[0],
sizeof(configs)/sizeof(configs[0]), &matchingConfigs))
{
    LOG(ERROR) << "eglChooseConfig failed.";
return OZONE_EGL_FAILURE;
}

if (matchingConfigs < 1)
{
    LOG(ERROR) << "No matching configs found";
return OZONE_EGL_FAILURE;
}

g_EglContext = eglCreateContext(g_EglDisplay, configs[0], NULL, ctxAttribs);
if (g_EglContext == EGL_NO_CONTEXT)
{
    LOG(ERROR) << "Failed to get EGL Context";
return OZONE_EGL_FAILURE;
}
g_NativeWindow = fbCreateWindow(g_NativeDisplay, 0, 0, g_WindowWidth, g_WindowHeight);
g_EglSurface = eglCreateWindowSurface(g_EglDisplay, configs[0], g_NativeWindow, NULL);
if (g_EglSurface == NULL)
{
LOG(ERROR) << "g_EglSurface == EGL_NO_SURFACE eglGeterror = " << eglGetError();
return OZONE_EGL_FAILURE;
}
Labels (3)
0 Kudos
1 Reply

518 Views
igorpadykov
NXP Employee
NXP Employee

Hi Florin

there may be issues with resolutions not multiple of 8, as reported for example on

https://community.nxp.com/thread/272026

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos