This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

eglSwapInterval does not work



I got a question when I am using latest psdk.

====================================

I wrote a demo to display 3d object and video texture, when I config egl below, the rendering time is mutiple of 16.66ms like 32ms, 50ms, 100ms,

.That is no doubt related to  the vertical refresh => 60

But as I turn to OffScreen that configed below, the rendering time is no longer the multiple of 16.66ms, it can be 40ms.

-------------------------------------------------------------------------------------------------------------------------------------------

It is abvious that offscreen is faster than the onscreen.

Because when the rendering time is 40ms,  offscreen will render 40ms as expected, but onscreen can only be render 50ms.

=================================================================================

I have met this quetion on PC linux and android, but I solve it by using  the api eglSwapInterval(m_eglDisplay, 0) to close vertical sync

but in psdk, the api eglSwapInterval always returns EGL_FALSE.

I want to know "why  "or "How can I do to break the limit of  vertical sync with onscreen "

  • Hi,

    I have forwarded your question to an expert to comment.

    Regards,
    Yordan
  • Hi,

    Yes, the Swap Buffer is intentionally aligned with Vsync to prevent any tearing artifacts.

    Can you let us know why the vsync turn-off is required? Is it mainly to benchmark performance? Or is there another use case which requires Vsync to be turned off?

    We can suggest options based on the response.

    Regards,
    Anand
  • As I mentioned above, Vsync will silightly eat some fps.
    When the rendering time is 40ms, fps with onscreen is 20 and offscreen is 24,
    So I get it, the key task is to reduce rendering time.
    Thanks
  • Hi,

    What is the actual use case? Is there a display involved? Or are you just rendering and taking it offscreen? If it's just render, why not use the offscreen Pixmap surface?

    Vsync is a mechanism to ensure there is no tearing between GPU and Display. There is no time lost here. This is essential in a production system.

    Is this a Wayland application? Or just a plain Null Window System app? How is the application designed? Typically, there needs to be separate GPU and render threads. The render thread will just do submit jobs to GPU. The display thread is responsible for showing on screen.

    Regards,
    Anand