We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
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
Hi Pete,
Thanks for the super quick reply! I noticed the Invalidate not making much sense but copy-pasted it here for completeness. The sequence of calls is from a third-party render engine. Once more, thanks for the precious help!