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

Unexplained shader core utilization

Hi guys,

I'm seeing a peak in the shader core utilization which is not matched by any activity in the core unit utilization graph at all. My best guess for this is a series of OpenGL API calls that look inefficient to me (which I have below in pseudo-code):

glBindFramebuffer(fbo_1);
glInvalidateFramebuffer(fbo_1, {color,depth,stencil});
glClear(color|depth|stencil);
glBindFramebuffer(fbo_2);
...
// at some point
glBindFramebuffer(fbo_1);

Could the graph below explain this? I can barely see any writes (which, perhaps is related with transaction elimination?) so I'm pretty clueless. 

This was recorded in a Mali-G71 btw.

Cheers,

Joao

Parents
  • Hi Joao, 

    Yep, that API sequence looks like the cause.

    Mali flushes render passes when the binding changes, so you're doing a flush of FBO1 which is just writing clear color tiles. You're not seeing many writes because constant color tiles compress *really well* =) Aim to bind each render passes once, and do all rendering operations in a single pass.

    Note that the placement of that invalidate looks odd. You want to invalidate at the end of a pass after the draw calls before switching the binding ; invalidate only the transient attachments you don't need to persist.

    HTH, 
    Pete

Reply
  • Hi Joao, 

    Yep, that API sequence looks like the cause.

    Mali flushes render passes when the binding changes, so you're doing a flush of FBO1 which is just writing clear color tiles. You're not seeing many writes because constant color tiles compress *really well* =) Aim to bind each render passes once, and do all rendering operations in a single pass.

    Note that the placement of that invalidate looks odd. You want to invalidate at the end of a pass after the draw calls before switching the binding ; invalidate only the transient attachments you don't need to persist.

    HTH, 
    Pete

Children