ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput | register your nick to speak
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
gschwind has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
rasterman has joined #wayland
hardening has quit [Ping timeout: 480 seconds]
kts has joined #wayland
<pq>
ManMower, weston does guarantee that if you commit a new buffer after frame callback, the last (previous) commit will not be superseded. It also means any commit after frame callback triggers cannot hit the very next scanout cycle but may hit the one after.
<pq>
MrCooper, you're right. :-)
<pq>
ManMower, even if Weston does process more client requests between sending frame callbacks and the next vblank/flip, those requests cannot affect the contents of the flip. The repainting has been done and programmed to KMS already.
<MrCooper>
pq: thanks for clarifying
<MrCooper>
daniels: is mr-label-maker used by any project(s) yet?
yoslin has quit [Quit: WeeChat 3.6]
yoslin has joined #wayland
<pq>
I think wlroots might be sending the frame callbacks later than what Weston does? In order to reduce latency. But that still has the same guarantees.
<pq>
i.e. wlroots repaints first, then a bit later sends frame callbacks, right?
<vyivel>
that's sway-specific iirc
<pq>
ah, ok
<daniels>
MrCooper: it runs on Mesa atm
d_ed has joined #wayland
<MrCooper>
cool
Serus has quit [Ping timeout: 480 seconds]
jmdaemon has quit [Ping timeout: 480 seconds]
Serus has joined #wayland
kts has quit [Quit: Leaving]
Lucretia has quit [Read error: No route to host]
Lucretia has joined #wayland
gschwind has quit [Quit: Leaving]
nerdopolis has joined #wayland
cvmn has joined #wayland
caveman has quit [Remote host closed the connection]
<kennylevinsen>
pq: depends on how you define the very next scanout cycle. Without sway's delay, we indeed send frame callbacks after repaint, so very next would to me mean one full refresh cycle later to me.
<kennylevinsen>
But with our delay, frame callbacks end up being send X milliseconds before composite, which is Y milliseconds before the upcoming refresh, so a commit after frame callbacks gives sub-refresh-rate content update latency
fmuellner has joined #wayland
<kennylevinsen>
(as long as you do it at most X milliseconds after the callback fired that is)
Lucretia has quit [Ping timeout: 480 seconds]
occivink has quit [Quit: WeeChat 3.4]
rodrgz has joined #wayland
occivink has joined #wayland
fmuellner has quit []
fmuellner has joined #wayland
<ManMower>
pq: neat, thanks for that. is this mandated by spec or just a decision weston has made?
<pq>
ManMower, I always read it as the definition of frame callbacks.
<pq>
I haven't checked the literal wording in a long time, but doing otherwise... well, I can't see how it would be beneficial in any situation.
fmuellner has quit [Ping timeout: 480 seconds]
<pq>
sending frame callbacks earlier than the deadline would mean clients can race with the deadline a second time on the same frame, which might cause terrible jitter.
eroux has quit [Read error: Connection reset by peer]
<kennylevinsen>
the spec says that the server should send the frame callback so that there is time for the client to make the next deadline, and that a client submitting buffers before frame callback is likely a wasted effort.
<kennylevinsen>
So just comes down to what the next deadline is
systwi has quit [Read error: Connection reset by peer]
Leopold_ has quit [Remote host closed the connection]
Leopold__ has quit [Remote host closed the connection]
Leopold has joined #wayland
<pq>
kennylevinsen, in what I was saying, "the very next scanout cycle" is literally the scanout cycle that will start when the current (at this time instant) scanout cycle ends at vblank. So I'm thining purely from CRTC perspective with "next" here.
<pq>
kennylevinsen, yes, agreed on X and Y ms. To be clear, one would need to also label the frames and scanout cycles N, N+1, N+2 etc.
kts has quit [Quit: Leaving]
<pq>
I believe that the frame callback defines that when it says "you can start drawing your frame N+1 now", it guarantees that frame N+1 cannot supersede (replace, discard) frame N.
<pq>
And that's pretty much all it guarantees or informs.
<pq>
If frame callback "start N+1" was sent before the deadline for repaint N, then the drawing for N+1 might actually manage to get into repaint and scanout N, i.e. too early. That would be bad.
Leopold has quit []
<pq>
So it necessarily follows, that the frame callback "start N+1" must always be sent after the deadline N.
<pq>
Then it's just common reason and desireable to send "start N+1" well before the deadline N+1. This is not required in the protocol, because throttling updates is a thing.
erodrgz has joined #wayland
<pq>
frames N, N+1 and N+2 may all be in flight at the same time, at different points of the presentation pipeline
rodrgz has quit [Ping timeout: 480 seconds]
<pq>
frame N about finish its scanout, N+1 programmed to KMS to flip to next, and N+2 being drawn by a client
<kennylevinsen>
Ah in that way. Indeed, the frame callback for a buffer submitted should not fire before the deadline for that buffer has passed. I was just thinking about when a single frame callback fires in relation to composite and scanout.
Moprius has quit [Quit: bye]
<pq>
yes, that's a good way of wording it: deadline for that buffer
manuel has quit [Remote host closed the connection]
manuel has joined #wayland
ofourdan has quit [Ping timeout: 480 seconds]
paulk has quit [Quit: WeeChat 3.0]
paulk has joined #wayland
paulk-bis has joined #wayland
paulk has quit [Ping timeout: 480 seconds]
Leopold has joined #wayland
paulk-ter has joined #wayland
paulk-bis has quit [Ping timeout: 480 seconds]
floof58 has quit [Read error: Connection reset by peer]
floof58 has joined #wayland
d_ed has quit [Remote host closed the connection]
rv1sr has joined #wayland
audgirka has quit [Remote host closed the connection]
Leopold has quit [Remote host closed the connection]