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

Rendering using OpenGL ES 2.0/3.0 in a zero copy mode on MALI T628

Hi

I am looking for example / articles on how to perform updates to an Open GL ES texture (without using low Performing glTexSubImage2D approach) in a zero copy approach.

I am currently focused on odroid XU3 with MALI  T628 running ubuntu.

I studied and tried eglcreateImageKHR approach without success (I cannot create an eglImage: error EGL_BAD_PARAMETER is returned when using EGL_NATIVE_PIXMAP_KHRas a target).

I read that MALI driver has support for UMP data transfer, but I still need a reference to the inner buffer in a openGL ES texture.

Any help needed

Andrea

Parents
  • Thanks a lot Michael

    First of all I cleaned my source code and commited to git

    https://github.com/andreavaresio/testEGLImage.git.

    Then I was able to step forward: eglCreateImageKHR now works, but I am

    still not able to draw texture changes to screen.

    In order to have eglCreateImageKHR working I had to invert intialisation

    sequence: instead of setting up EGL with defaults and try to create a X11

    Pixmap according to egl parameters (as is suggested in ARM SDK), I reversed

    the order. I initialised X according to default screen and setup egl

    according to X parameters.

    When I try to run the code in mode 1 (changes to Pixmap are performed using

    a memcpy) no changes are drawn on the screen.

    When I try to run the code in mode 2 (changes to Pixmap are performed

    using XFillRectangle) eglSwapBuffer return with error 0x3000d

    The thread you pointed me to refers to fbdev driver version, I am using X11

    driver.

    Regarding the driver (I am not an expert ...). As far as I read r5p1-00rel1

    has DMA_BUF implementation. In my understaning this means ability to

    perform scatter and gather memory transfer, i.e. ability to copy buffers in

    virtual memory.

    So which feature is needed in the driver in order to perform zero copy

    rendering?

    Thanks

    Andrea Varesio

    2015-06-04 16:32 GMT+02:00 ARM Connected Community Admin <community@arm.com>

    :

           

    <http://community.arm.com/?et=notification.mention>     You have been

    mentioned

    by Michael McGeagh

    <http://community.arm.com/people/mcgeagh?et=notification.mention> *in Re:

    Rendering using OpenGL ES 2.0/3.0 in a zero copy mode on MALI T628 in ARM

    Connected Community* - View Michael McGeagh's reference to you

    <http://community.arm.com/message/28304?et=notification.mention#28304>

Reply
  • Thanks a lot Michael

    First of all I cleaned my source code and commited to git

    https://github.com/andreavaresio/testEGLImage.git.

    Then I was able to step forward: eglCreateImageKHR now works, but I am

    still not able to draw texture changes to screen.

    In order to have eglCreateImageKHR working I had to invert intialisation

    sequence: instead of setting up EGL with defaults and try to create a X11

    Pixmap according to egl parameters (as is suggested in ARM SDK), I reversed

    the order. I initialised X according to default screen and setup egl

    according to X parameters.

    When I try to run the code in mode 1 (changes to Pixmap are performed using

    a memcpy) no changes are drawn on the screen.

    When I try to run the code in mode 2 (changes to Pixmap are performed

    using XFillRectangle) eglSwapBuffer return with error 0x3000d

    The thread you pointed me to refers to fbdev driver version, I am using X11

    driver.

    Regarding the driver (I am not an expert ...). As far as I read r5p1-00rel1

    has DMA_BUF implementation. In my understaning this means ability to

    perform scatter and gather memory transfer, i.e. ability to copy buffers in

    virtual memory.

    So which feature is needed in the driver in order to perform zero copy

    rendering?

    Thanks

    Andrea Varesio

    2015-06-04 16:32 GMT+02:00 ARM Connected Community Admin <community@arm.com>

    :

           

    <http://community.arm.com/?et=notification.mention>     You have been

    mentioned

    by Michael McGeagh

    <http://community.arm.com/people/mcgeagh?et=notification.mention> *in Re:

    Rendering using OpenGL ES 2.0/3.0 in a zero copy mode on MALI T628 in ARM

    Connected Community* - View Michael McGeagh's reference to you

    <http://community.arm.com/message/28304?et=notification.mention#28304>

Children
  • I tried fbdev user space driver on xu3.

    Issues:

    1) There is a unacceptable tear-off effect, even  with a very simple texture.

    2) no way to create an an EGLImage

    fbdev_pixmap pm;
    pm.height = HEIGHT;
    pm.width = WIDTH;
    pm.bytes_per_pixel = 32;
    pm.red_size = 8;
    pm.green_size = 8;
    pm.blue_size = 8;
    pm.alpha_size = 8;
    pm.luminance_size = 0;
    pm.flags = FBDEV_PIXMAP_SUPPORTS_UMP;
    pm.data = (unsigned short*)TexData;
    const EGLint img_attribs[] = {
    EGL_IMAGE_PRESERVED_KHR, EGL_TRUE,
    EGL_NONE
    };
    static EGLImageKHR g_eglImage = 0;
    if (g_eglImage)
    eglDestroyImageKHR(g_sEGLDisplay, g_eglImage);
    g_eglImage = eglCreateImageKHR(g_sEGLDisplay, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)&pm, img_attribs);
    EGLint eglError = eglGetError();  ==> 0x300c