eglSwapInterval not working

I am running Qt application on an R-Car board with fellow basic info:

Animation Driver: using vsync: 16.67 ms
GL_VENDOR: Imagination Technologies
GL_RENDERER: PowerVR Rogue GE8300
GL_VERSION: OpenGL ES 3.2 build 1.10@5187610

powervr.in:

WindowSystem=libpvrWAYLAND_WSEGL.so

I tried to set eglSwapInterval but looks like the function is not working at all.
btw I used the PVRTrace test the eglSwapInterval did return true.
Any solution?

Hi jiu,

I’d recommend verifying the steps below:

  1. Query the values EGL_MIN_SWAP_INTERVAL and EGL_MAX_SWAP_INTERVAL, since the final interval value is clamped to those values.
  2. Verify the EGLBoolean value returned by the call to eglSwapInterval.
  3. Make sure you have a drawing surface bound to the context from where you’re calling eglSwapInterval.

Also, you might find some interesting posts about the behaviour of eglSwapInterval in coordination with VSync in this post: eglSwapInterval = 0 tearing problem Maybe it is working, but not in the way you were expecting it to.

Please, let me know after those verifications if you’re still experiencing any issues,

Alejandro

Hi AlejandroCosin

  1. EGL_MIN_SWAP_INTERVAL and EGL_MAX_SWAP_INTERVAL both show 1
  2. eglSwapInterval returns true and confirmed by PVRTrace
  3. is there any small test demo for this?

Thank you

Hi jiu,

Regarding 3., you can see an example in the method bool QEGLPlatformContext::makeCurrent(QPlatformSurface *surface) here https://code.qt.io/cgit/qt/qtbase.git/tree/src/platformsupport/eglconvenience/qeglplatformcontext.cpp?id=d800180f828087e144b30346e8cea312aa2bf062

Also, the API call eglGetCurrentSurface can be of interest to verify there is a surface bound to the current context. You can see how it is used in the provided example.

Alejandro

Hi
is there any way to change default EGL_MIN_SWAP_INTERVAL EGL_MAX_SWAP_INTERVAL?

Hi jiu,

I’m afraid the values of EGL_MIN_SWAP_INTERVAL and EGL_MAX_SWAP_INTERVAL are fixed and can only be queried.

Maybe you can give more details about the problems you have due to eglSwapInterval not working. Is it you’re having tearing problems, not regular frame updates, or just generated frames being wasted for the 16.67ms vsync config you have?

Since EGL_MIN_SWAP_INTERVAL and EGL_MAX_SWAP_INTERVAL both are 1, I assume the problem you’re experiencing is not regular frame updates. Could you verify you have VSync activated?

Best regards,

Alejandro