Vsync?

21 views
Skip to first unread message

Mark Sibly

unread,
Mar 15, 2024, 10:43:38 PMMar 15
to Dawn Graphics
Hi,

Is there any way to control vsync in dawn?

I vaguely remember this being discussed before, but searching for vsync, setswapinterval etc isn't giving any hits.

Bye,
Mark

Mark Sibly

unread,
Mar 15, 2024, 11:27:14 PMMar 15
to Dawn Graphics
OK, using PresentMode::Fifo in the SwapChainDescriptor seems to fix my vsync issues. My render loop is now locked to 60hz (with my graphics card's 'vsync setting' set to 'use application setting').

I had been using PresentMode::Mailbox, probably because the dawn samples must have used this at some point I guess.

But what is the difference anyway? Is this the right thing to do? Is it OK to treat Fifo as vsync=on and Mailbox as vsync=off?

Bye,
Mark


--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/71e4ea5b-1c56-485d-85b5-d95d7ab1a583n%40googlegroups.com.

Austin Eng

unread,
Mar 18, 2024, 12:23:07 PMMar 18
to Mark Sibly, Dawn Graphics
With FIFO, there is a queue of presentation requests. The display engine takes and presents images out of this queue, so yes the rate at which entries in the queue are removed and a new image becomes available to you for rendering is locked to vsync.

With Mailbox mode, there is a single presentation request. Every presentation replaces it (in a non-tearing way), and you can replace it at a rate that is not synchronized with vsync.

Mark Sibly

unread,
Mar 18, 2024, 8:51:51 PMMar 18
to Austin Eng, Dawn Graphics
Thanks Austin!

Reply all
Reply to author
Forward
0 new messages