<MrCooper>
Plagman: amdgpu has never set an exclusive fence for buffers which aren't shared with other drivers, therefore dma-buf fds always poll as readable
<MrCooper>
Plagman: Mesa WSI waits for idle before submitting buffers for presentation with mailbox and immediate modes on Xwayland
GreatGodvin[m] has joined #wayland
GreatGod1 has joined #wayland
GreatGodvin has quit [Ping timeout: 480 seconds]
<emersion>
MrCooper: we're polling for writable
<MrCooper>
ugh, that's a workaround for amdgpu then and may oversync with all other drivers
<MrCooper>
and with amdgpu as well once it's fixed
GreatGodvin[m] has quit [Ping timeout: 480 seconds]
<emersion>
yeah. historically we've only been able to run with amdgpu, it's not been a while that we can run with intel
<emersion>
MrCooper, i suppose jekstrand's IOCTL to extract a sync_file from a DMA-BUF won't work on amdgpu?
GreatGod1 has quit []
<MrCooper>
it'll work with the same caveats as dma-buf poll
<emersion>
ok
<MrCooper>
i.e. right now there will never be an exclusive fence, and waiting for all shared fences will potentially oversync
<emersion>
right
<emersion>
> Mesa WSI waits for idle before submitting buffers for presentation with mailbox and immediate modes on Xwayland
<emersion>
why does it do that?
GreatGodvin has joined #wayland
<emersion>
i thought we added a workaround for Mesa to *not* wait for idle in the Xwayland case?
<MrCooper>
it first did it only for mailbox on all X servers, because the current xserver Present code doesn't produce actual mailbox otherwise
<MrCooper>
I extended it to immediate on Xwayland only, because immediate is effectively the same as mailbox right now on Wayland
co2umbarius has joined #wayland
pnowack has joined #wayland
<emersion>
i think i've already forgotten all of the discussions about improving Xwayland's behavior here, sigh
<MrCooper>
once the Xwayland Present code supports presentation-time (and ideally compositors wait for idle), this can be dropped from Mesa for Xwayland
<emersion>
we'd like to get X11 client buffers as soon as possible in our compositor
co1umbarius has quit [Ping timeout: 480 seconds]
<MrCooper>
we'll get there eventually :)
<emersion>
MrCooper, what was the first step towards this again?
<MrCooper>
if the compositor doesn't wait for buffers to become ready, sending buffers to it ASAP results in a bad experience due to page flips getting delayed
<emersion>
MrCooper, i don't think so, because that's what native Wayland clients do
<emersion>
clients should not try to workaround this
<MrCooper>
surely most Wayland clients only send a buffer when getting a frame callback, which isn't as bad
<emersion>
well, in any case, clients have no way to know whether the compositor waits or not
<emersion>
doing any magic is bad IMHO
ppascher has quit [Quit: Gateway shutdown]
<MrCooper>
my plan is to make Xwayland Present use presentation-time, allowing it to forward buffers directly to the compositor in more cases; making compositors wait for buffers to become ready; drop the workaround in Mesa
<emersion>
well, that i know :)
<emersion>
what was the first step in making Xwayland use presentation-time?
<emersion>
iirc we're not even sure what we want to do here…?
<gitlab-bot>
xorg issue (Merge request) 635 in xserver "WIP: xwayland: add support for presentation-time" [Xwayland, Present, Closed]
<MrCooper>
right, unfortunately it's not that simple
<MrCooper>
I think I have a pretty good idea what to do though
<emersion>
we don't all agree here :P
<emersion>
with your plan, presentation-time would only be used for feedback
<emersion>
it won't help with getting frames ASAP to the compositor?
<MrCooper>
that's not set in stone yet, we'll see what to use for what once there's a running prototype
<MrCooper>
the main thing is how to correctly keep track of which presents ended up actually presented or skipped
<MrCooper>
which allows forwarding buffers directly ASAP in more cases
<emersion>
Plagman, maybe the regression happens with Mesa 8ec530d9828e ("wsi/x11: Wait for fences with IMMEDIATE on Xwayland")
<emersion>
Tue Apr 6 12:15:45 2021 +0200
<emersion>
maybe we should just revert this "wait for fences" logic for us
<emersion>
MrCooper, i'd like to help fixing all of this, but unfortunately i don't understand how to
<MrCooper>
maybe you can work on waiting for buffers to become ready in wlroots/sway
<emersion>
MrCooper, i don't see how that will help
<emersion>
MrCooper, i'd like to help with the Xwayland/Mesa issues, Sway is unrelated
<MrCooper>
without that there'll still be a bad experience with mailbox/immediate without the workaround in Mesa
<emersion>
that doesn't really matter to me
<emersion>
i'm fine with the "bad experience" you describe for Sway
co3umbarius has joined #wayland
<emersion>
i don't think it's worse than a Wayland-native game rendering as fast as possible
<emersion>
so, /shrug
<MrCooper>
right, same issue with that
co2umbarius has quit [Ping timeout: 480 seconds]
<emersion>
i'd like to move the Xwayland/Mesa stuff forward, how to help with that?
<MrCooper>
next step is presentation-time support in Xwayland
<emersion>
that i know
co4umbarius has joined #wayland
GreatGodvin has quit [Quit: WeeChat 3.1]
co3umbarius has quit [Ping timeout: 480 seconds]
<emersion>
MrCooper, it seems like we're talking past each other. it would be nice if you could explain your plan for Xwayland presentation-time, so that others can contribute a solution you won';t NACK
gobostone has joined #wayland
<MrCooper>
mainly it needs to take the discussion in the GitLab issue into account, and there needs to be a fallback to frame callbacks when presentation-time isn't supported
gobostone has quit [Remote host closed the connection]
<gitlab-bot>
Mesa issue (Merge request) 11290 in mesa "Draft: vulkan/wsi/x11: stop waiting for fences under Xwayland" [Opened]
co4umbarius has quit []
columbarius has joined #wayland
co1umbarius has joined #wayland
columbarius has quit [Ping timeout: 480 seconds]
co1umbarius has quit [Ping timeout: 480 seconds]
co1umbarius has joined #wayland
<MrCooper>
emersion: TBH I don't understand why this is such a big deal, since gamescope won't make use of the buffer earlier anyway
Arnavion has quit [Quit: Arnavion]
boistordu_ex has joined #wayland
<pq>
Lyude, compositors may or may not have something, but generally not.
<pq>
if you happened to be using weston --debug, then weston-debug would be able to print the protocol flood.
GreatGodvin has joined #wayland
Arnavion has joined #wayland
Ariadne has quit [Quit: hopping away, into the sunset]
Ariadne has joined #wayland
MrCooper has quit [Remote host closed the connection]
MrCooper has joined #wayland
co2umbarius has joined #wayland
co2umbarius has quit []
co1umbarius has quit [Ping timeout: 480 seconds]
columbarius has joined #wayland
<MrCooper>
emersion: FWIW, GpuTest's plot3d can be useful for experimenting with the effect of slow clients; as described in https://gitlab.gnome.org/GNOME/mutter/-/issues/1162 it can be scaled to run at almost any frame rate
<gitlab-bot>
GNOME issue 1162 in mutter "Wayland: Mutter's frame rate is either limited by or lower than that of "heavy" clients" [1. Enhancement, 5. Performance, 5. Wayland, Opened]
GreatGodvin has quit [Quit: WeeChat 3.1]
MrCooper_ has joined #wayland
MrCooper has quit [Ping timeout: 480 seconds]
columbar1 has joined #wayland
columbarius has quit [Ping timeout: 480 seconds]
columbarius has joined #wayland
columbar1 has quit [Ping timeout: 480 seconds]
columbar1 has joined #wayland
MrCooper_ is now known as MrCooper
columbarius has quit [Ping timeout: 480 seconds]
sca has joined #wayland
Stenzek has joined #wayland
Stenzek has quit [autokilled: Suspected spammer. Mail support@oftc.net with questions (2021-06-10 10:33:44)]
hypc has joined #wayland
hypc has quit [Remote host closed the connection]
Sachiel has quit [Ping timeout: 480 seconds]
Sachiel has joined #wayland
pochu has quit [Quit: leaving]
pochu has joined #wayland
ppascher has joined #wayland
<pq>
swick, do you think weston_color_curve would be a better name than weston_color_transfer_function for what we discussed for the 1D LUT?
<pq>
swick, that's the final question I'd like to sort out before merging that Weston MR.
tazle_ has joined #wayland
tazle_ has quit [Remote host closed the connection]
columbar1 has quit []
columbarius has joined #wayland
FaFaS has joined #wayland
FaFaS has quit [Remote host closed the connection]
khfeng has quit [Remote host closed the connection]
khfeng has joined #wayland
calcul0n__22 has joined #wayland
calcul0n__22 has quit [Remote host closed the connection]
Ne02ptze1 has joined #wayland
Ne02ptze1 has quit [Remote host closed the connection]
psydroid has joined #wayland
marathon has joined #wayland
wallfly has joined #wayland
blue__penquin has quit [Remote host closed the connection]
wallfly has quit [Remote host closed the connection]
ned0 has joined #wayland
ned0 has quit [Remote host closed the connection]
<pq>
swick, thank you!
<swick>
np
retif has joined #wayland
retif has quit [Remote host closed the connection]
txtsd is now known as Guest1573
txtsd has joined #wayland
Guest1573 has quit [Ping timeout: 480 seconds]
twnqx has joined #wayland
twnqx has quit [Remote host closed the connection]
MrCooper has quit [Remote host closed the connection]
MrCooper has joined #wayland
brouette has joined #wayland
brouette has quit [Remote host closed the connection]