i work on firefly/rk3288,and got the same problem as this discussion http://community.arm.com/thread/8116
when i try to use eglCreateImageKHR , it returned EGL_NO_IMAGE_KHR, error code is EGL_BAD_PARAMETER(0x300c),accroding to this site https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_image_base.txt, it seem the <target> or <attrib_list> is invalid, but i am
doubt,i use as below
const EGLint img_attribs[] = { EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE }; EGLImageKHR image = eglCreateImageKHR (display, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, &pixmap, img_attribs);
pixmap is define as
#define YUYV_FORMAT 0x001022A88LL struct fbdev_pixmap { int width, height; struct { /** @brief The line stride of each plane. * For each plane required by the format, the number of bytes from one line of samples to the next. Other entries in * the array should be 0. */ khronos_usize_t stride; /** @brief The byte size of each plane. * For each plane required by the format, the number of bytes taken up by that plane. That includes any space wasted * in partially-used blocks. */ khronos_usize_t size; /** @brief The offset from the memory handle to each plane. * For each plane required by the format, the number of bytes from the start of the allocation to the start of that * plane. Other entries in the array should be 0. */ khronos_usize_t offset; } planes[3]; /** An integer that specifies the format of the pixmap. Its meaning is known by the Mali driver. */ uint64_t pixmap_format; /* dma_buf fd for each of the plan */ int handles[3]; }; struct fbdev_pixmap pixmap; memset(&pixmap, 0, sizeof(struct fbdev_pixmap)); pixmap.width = width; pixmap.height = height; pixmap.handles[0] = dma_fd; pixmap.planes[0].stride = width * pixel_size; pixmap.planes[0].size = width * height * pixel_size; pixmap.pixmap_format = YUYV_FORMAT;
so,i dont know where is the problem
my mali lib version is mali-t76x_r5p0-06rel0_linux_1+fbdev
and i need the definition of struct fbdev_pixmap on YUYV_FORMAT and GL_RGBA format, thx
by the way,if a new version of driver is needed, when can you release that new version? the deadline of our program is closing in months, so if there is no new version in the near future,we have to find another way to do this
Unfortunately I'm not aware of this pixmap extension being on our roadmap for new driver versions but I'll investigate whether this could be enabled. I would strongly advise you to consider a different extension to import textures in the meantime.
Also, r5p0 is a rather old version of the driver and we'll be publishing new ones soon (r6p0, r7p0 for Mali-T76x / Firefly). I can't give you definitive date but I would hope to see r6p0 out within a few weeks and r7p0 within a couple of months.
We may have at least partial support for https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt. Even though it may not appear in the strings of supported extensinos, as some pixel formats may not be supported, this is something worth trying if it makes sense for your project. I will look for more information on this topic as I believe it may only be available in r6p0 (yet to be released).
Best wishes,
Guillaume