Tool/software: Linux
Hello,
I'm having an issue with egl image. um ddk version is 1.14.3699939(https://git.ti.com/graphics/omap5-sgx-ddk-um-linux/commit/d184140aa5c17e13e1bf21151f1a7bc068bdf8bf)
I want to render the images(argb) using EGLImage but now it seems to support only nv12, yuy2.
So I found this answer(https://e2e.ti.com/support/embedded/linux/f/354/p/563420/2066253#2066253)
1. Import DMABUF as a GBM BO
2. Create a pixmap surface out of it
3. Create an EGL Image based on the pixmap
However, an error occurs when creating the EGL image. below is the source code.
struct omap_bo* lpOmapBo = omap_bo_new( omap_device_new(m_DrmFd), Width * Height * 4, 3 ); struct gbm_import_fd_data GbmImportData; int Idx = 0; GbmImportData.fd = omap_bo_dmabuf( lpOmapBo ); GbmImportData.width = Width; GbmImportData.height = Height; GbmImportData.stride = Width * 4; GbmImportData.format = GBM_BO_FORMAT_ARGB8888; GbmBo* lpBo = gbm_bo_import( m_lpGbmDev, GBM_BO_IMPORT_FD, &GbmImportData, GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT ); EGLSurface lpEglSurface = eglCreatePixmapSurface( m_lpContext->GetEglDisplay(), m_lpContext->GetEglConfig(), lpBo, NULL ); eglCreateImageKHR( m_EglDisplay, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, lpEglSurface, NULL ); eglGetError();
PVR:(Error): [ 1222-> 1231] < gbm_pvr_surface_create_common():422|ERROR> condition [ width != 0] failed [0, ]
PVR:(Error): [ 1222-> 1231] < WSEGL_CreatePixmapDrawable():1018|ERROR> condition [ surf != NULL] failed [0, ]
ERR[3D] : EGL error 0x300C (EGL_BAD_PARAMETER)
- EGL_KHR_image_pixmap is missing from extension list(eglQueryString(EGL_EXTENSIONS)), maybe this is the cause.
- writeback stream(v4l2 yuy2) works fine with eglCreateImageKHR( m_EglDisplay, EGl_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, NULL, Attribs );
How do I create an EGL image in argb format? Is there any sample code? I would appreciate your help.
Thanks