glFramebufferTexture2D copy it’s data

This topic contains 2 replies, has 2 voices, and was last updated by  naxe 5 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30690

    naxe
    Member

     Hi, All.

    I’m doing some post-process work on iPad (iOS 4.3.5) and want to squeeze every microsecond to improve FPS. ‘POWERVR SGX OpenGL ES 2.0 Application Development Recommendations’ contains a topic about render-to-texture. It recommends to clear entire target before any rendering to skip copy texture content from external memory to on-chip dedicated memory. I try 2 scenarios with clear and without, both of them results in the same time. Is there a way to speed-up this use-case?

    1)

    glBindFramebuffer();

    glViewport();

    glClear();

    glDraw(); // draw full-screen quad

    2) 

    glBindFramebuffer();

    glViewport();

    glDraw(); // draw full-screen quad

      

    #35235

    Joe Davis
    Member

    Hi,

    Calling glClear() prevents the GPU having to preserve render buffer data – e.g. the colour buffer – as preserving this data requires is to be loaded from external memory to the on-chip buffers. By calling the glClear(), you can prevent your application wasting memory bandwidth for information that isn’t required by the next frame’s render.

    As this is a memory bandwidth use optimization, you are unlikely to see the benefit of this when your application isn’t already memory bandwidth limited. If you profile the performance of your application (using our PVRUniSCoEditor, PVRTune & PVRTrace tools, and/or Apple’s profiling tools in Xcode) where the bottleneck is in your rendering.

    In many cases, the bottleneck hit first by most applications is shader complexity (particularly fragment shaders), and you can use our PVRUniSCoEditor utility to get in-line cycle count estimates to understand how complex your shaders are while you are editing them.

    Hope that helps 🙂

    #35236

    naxe
    Member

     Can you answer how much time is need to upload 1027×768 texture data of format ARGB8888 to dedicated on-chip memory?  

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.