This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2PXEVM: Offscreen GPU rendering cost large time

Part Number: TDA2PXEVM

     I'm using TDA2S_PROCESSOR_SDK_VISION_03_07_00_00 to do glFramebuffer, after rendering the framebuffer, we render the framebuffer to screen, but it cost almost 20ms to render.

I found almost time cost by this function:glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, (GLeglImageOES)eglImage) in render framerbuffer to screen.

    The eglImage is created use pixmap as below:

EGLCompatBuffer eglCBuf;
    if(fd == -1) {
       fd = drmOpen("omapdrm", NULL);
    }
    
    if(fd > 0 && dev == NULL) {
        dev = gbm_create_device(fd);
        odev = omap_device_new(fd);
    }
    // Create a GenericBufferManager Buffer Object. We will use this object to map the EGL image
    struct gbm_bo* bo = gbm_bo_create(dev, width, height, GBM_FORMAT_ARGB8888, GBM_BO_USE_RENDERING);

    // Use Omap Device to map the gbm buffer to userspace
    //struct omap_device* omap_dev = omap_device_new(fd); // open omap device
    
    struct omap_bo *omap_bo_ = omap_bo_from_dmabuf(odev, gbm_bo_get_fd(bo)); // create omap buffer object from the gbm buffer dma handle
    void *omap_bo_userspace = omap_bo_map(omap_bo_); // map the buffer

    eglCBuf.width = gbm_bo_get_width(bo);
    eglCBuf.height = gbm_bo_get_height(bo);
    eglCBuf.stride = gbm_bo_get_stride(bo);
    eglCBuf.eglPixmap = (EGLNativePixmapType) bo;
    eglCBuf.pixmapNative = (void *)omap_bo_userspace;

//create eglImage
        EGLint attrib_list = EGL_NONE; // should be none when using a pixmap
        PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR"); // resolve address of EGL function
        eglImage = eglCreateImageKHR(pEglWindowObj->display, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, eglCBuf.eglPixmap, &attrib_list); // attach the dma buffer to EGLImage

Also I have tried to allocate framebuf from SR1, it's the same.