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
  • I forgot to attach output of the application, where can be seen that extensions required are available on this platform

    major=1, minor = 4

    Number of configs found is 2

    Vendor =ARM

    API    =OpenGL_ES

    Version=1.4 Midgard-"r5p1-00rel1"

    Extens =EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_ARM_pixmap_multisample_discard EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_KHR_cl_event2 EGL_KHR_image_pixmap

    GL_EXTENSIONS: GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader_pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_KHR_blend_equation_advanced GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic

    eglGetError() = 12300 (0x0000300c) at line 252

    glGetError() = 1282 (0x00000502) at line 257

Reply
  • I forgot to attach output of the application, where can be seen that extensions required are available on this platform

    major=1, minor = 4

    Number of configs found is 2

    Vendor =ARM

    API    =OpenGL_ES

    Version=1.4 Midgard-"r5p1-00rel1"

    Extens =EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_ARM_pixmap_multisample_discard EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_KHR_cl_event2 EGL_KHR_image_pixmap

    GL_EXTENSIONS: GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader_pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_KHR_blend_equation_advanced GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic

    eglGetError() = 12300 (0x0000300c) at line 252

    glGetError() = 1282 (0x00000502) at line 257

Children
  • I also tried to use a XPixMap but nope....

    instead of performing

    UploadTexture_UsingEGLImage


    I tried the following

    {
    Window root;
    int x, y;
    unsigned int border, d, w, h;
    const EGLint img_attribs[] = {
    EGL_IMAGE_PRESERVED_KHR, EGL_TRUE,
    EGL_NONE
    };
    if (!XGetGeometry(wind.GetXDisplayPtr(), wind.GethWnd(), &root, &x, &y, &w, &h, &border, &d))
    printf("===== error XGetGeometry\n");
    printf("XGetGeometry %d %d %d\n", w, h, d);
    Pixmap XPixMap = XCreatePixmap(wind.GetXDisplayPtr(), wind.GethWnd(), w, h, d);
    EGLImageKHR eglImage = eglCreateImageKHR(m_sEGLDisplay, m_sEGLContext, EGL_NATIVE_PIXMAP_KHR, &XPixMap, img_attribs);
    EGLint eglError = eglGetError();
    if (eglError != EGL_SUCCESS)
    printf("eglGetError() = %i (0x%.8x) at line %i\n", eglError, eglError, __LINE__);
    glActiveTexture(GL_TEXTURE0);
    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
    glBindTexture(GL_TEXTURE_2D, iTex);
    glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, eglImage);
    _GLCheck();
    }