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

Mali texture allocation transformation from OpenGL to GPU internal format

Are there any transformation/conversation if I allocate texture from OpenGL application user space to some GPU internal format?

And is it possible to disable this transformation?

16 or 24 or 32bit texture

Are there any disadvantages ?

For example if I allocate with

some application memory block to OpenGL API ,

some application memory block to EGL API,

DMBBUF to EGL,

UMP to EGL  ?

Parents
  • Are there any transformation/conversation if I allocate texture from OpenGL application user space to some GPU internal format?

    Anything allocated via OpenGL ES (i.e. textures, framebuffer objects) will use internal memory layout. Anything which can be memory mapped, or shared across processes (pixmaps, EGL external images) tends to be in a standard format as the recipient of that data isn't always the Mali hardware.

    And is it possible to disable this transformation?

    No.

    16 or 24 or 32bit texture

    Pretty much everything that is a texture or a renderbuffer.

    Are there any disadvantages ?

    The main transform applied is a texture address swizzle, via a space filling curve algorithm.

         Space-filling curve - Wikipedia, the free encyclopedia

    This technique is very common across GPU vendors (although the precise curve pattern used varies) as it provides much better cache locality (it effectively provides 2D texture coordinate locality in a 1D address space), and is much less sensitive to the orientation of primitives relative to the rendering sequence or display. Less cache misses = lower power and faster performance.

    The downside is a slightly more complex upload path - you can't just memcpy from the source texture into the memory - but the upload paths are generally heavily optimized in the drivers so the performance drop is normally negligible.

    DMBBUF to EGL,

    UMP to EGL  ?

    DMABUF and UMP are only really used for allocation of window surfaces, and as such fall into the platform level format negotiation (i.e. we have to support whatever the display controller and display technology requires). This is normally linear memory, although there are various platform specific issues here (do your rows increment or decrement in address, and that type of thing).

    HTH,
    Pete

Reply
  • Are there any transformation/conversation if I allocate texture from OpenGL application user space to some GPU internal format?

    Anything allocated via OpenGL ES (i.e. textures, framebuffer objects) will use internal memory layout. Anything which can be memory mapped, or shared across processes (pixmaps, EGL external images) tends to be in a standard format as the recipient of that data isn't always the Mali hardware.

    And is it possible to disable this transformation?

    No.

    16 or 24 or 32bit texture

    Pretty much everything that is a texture or a renderbuffer.

    Are there any disadvantages ?

    The main transform applied is a texture address swizzle, via a space filling curve algorithm.

         Space-filling curve - Wikipedia, the free encyclopedia

    This technique is very common across GPU vendors (although the precise curve pattern used varies) as it provides much better cache locality (it effectively provides 2D texture coordinate locality in a 1D address space), and is much less sensitive to the orientation of primitives relative to the rendering sequence or display. Less cache misses = lower power and faster performance.

    The downside is a slightly more complex upload path - you can't just memcpy from the source texture into the memory - but the upload paths are generally heavily optimized in the drivers so the performance drop is normally negligible.

    DMBBUF to EGL,

    UMP to EGL  ?

    DMABUF and UMP are only really used for allocation of window surfaces, and as such fall into the platform level format negotiation (i.e. we have to support whatever the display controller and display technology requires). This is normally linear memory, although there are various platform specific issues here (do your rows increment or decrement in address, and that type of thing).

    HTH,
    Pete

Children