Imagination PowerVR SDK Blog

Does glFinish behave like regular OpenGL on PowerVR?


#1

Greetings,

I’m currently trying to make sure that a buffer has finished processing at some point in the program. Reading the document

http://cdn.imgtec.com/sdk-documentation/PowerVR.Performance%20Recommendations.pdf
Section 6.6.

I’ve found the following sentence regarding glFinish:

“On PowerVR hardware calling the function glFinish flushes (kicks) all outstanding renders in a context, as per the OpenGL ES specification.”

Does that mean that, unlike most implementations, glFinish on PowerVR does not guarantee that all buffers are complete when glFinish return? Especially if you take into account the section about eglClientWaitSync, which seems to say this explicitly:

“On PowerVR hardware calling the function eglClientWaitSync flushes (kicks) all outstanding
renders in a context. It then waits (blocks the calling thread or until x nanoseconds have passed ) for the specified sync object to be signalled. In other words, it waits for the work to be completed.”

So will glFinish guarantee complete buffers when it returns on PowerVR?

Regards


#2

Hello,

Yes, glFinish should wait until the GPU operation (a 3D kick) finalizes. The documentation should be clearer. Bear in mind that PowerVR is a TBDR architecture so the implementations of glFinish and glFlush has not been completely functional on some platforms as it add an extra performance penalty when compared to other architectures.

Regards.

Carlos.


#3

Hello,

I dug a little further and what irritated me was this post by JoeDavis from 6 years ago where he claims that the behaviour of glFlush and glFinish ist platform dependent:

I know it is possible to influence the behaviour of these functions for certain platforms, usually via powervr.ini. However, does PVR require board designers to provide standard-conformant behaviour as default?


#4

Hi,

The problem with glFinish and glFlush is that the specs are very loose and they are not part of the conformant test. In the past we had disabled this functionality because it was used blindly by developers. More recently the functionality has been restored. So yes, still today, you might find different devices behaving differently. Hopefully with the new mechanisms for synchronization and Vulkan this should not be a problem any more.

Regards.

Carlos.