This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to share texture memory

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

Parents Reply Children
No data