Asmadeus has quit [Remote host closed the connection]
Asmadeus has joined #wayland
<Asmadeus>
emersion: just following up from yesterday, there were indeed two wl_displays -- silly me didn't have -f on strace and it was created in another thread...
<Asmadeus>
that sorts the mystery, I'll try to see if I can make gstreamer reuse the same one..
ammen99[m] has joined #wayland
ammen99 has joined #wayland
ammen99 has left #wayland [#wayland]
mceier has joined #wayland
<mceier>
daniels: it might be a good idea to do "/msg chanserv set #wayland entrymsg Moved to OFTC: please join #wayland on irc.oftc.net" on libera.chat, since not everyone reads topics; I myself learned about move to OFTC from whot merge request ;)
<gitlab-bot>
libinput issue (Merge request) 636 in libinput "doc/user: #wayland is now on oftc" [Opened]
pascal has joined #wayland
<Arnavion>
mceier: Works for me. Make sure you're not blocking webworkers with uBO or whatever
pascal has quit []
pnowack has joined #wayland
<mceier>
ok, thanks
blue__penquin has quit []
blue__penquin has joined #wayland
st3r4g has joined #wayland
st3r4g has quit [Quit: leaving]
<daniels>
mceier: sure, done, thanks!
<daniels>
mceier: and no, it loads perfectly well for me in Chrome; do you have any blocking extensions?
<mceier>
yeah, uBO is one of them ;)
<mceier>
I probably also explicitly disabled webworkers in about:config, so I should have guessed based on the name of the script, this might be the issue and not CSP misconfiguration ;)
whot has joined #wayland
st3r4g has joined #wayland
_whitelogger has joined #wayland
Guest4595 has joined #wayland
_whitelogger has joined #wayland
_whitelogger has joined #wayland
_whitelogger has joined #wayland
_whitelogger has joined #wayland
Guest4595 is now known as blue_penquin
joes has joined #wayland
pnowack has quit [Quit: pnowack]
pnowack has joined #wayland
Levans has joined #wayland
Levanx has joined #wayland
bodiccea has quit [Remote host closed the connection]
bodiccea has joined #wayland
nifker has joined #wayland
joes has quit [Ping timeout: 480 seconds]
halfline has quit [Quit: Leaving]
spstarr has joined #wayland
st3r4g has quit [Quit: leaving]
st3r4g has joined #wayland
<zamundaaa>
I have a question about atomic tests: If I have two buffers, both created with the exact same arguments to gbm_bo_create, and I do an atomic test with one, is there a guarantee that doing the same test but with the other buffer gives the same result?
blue__penquin has quit []
<pq>
zamundaaa, I guess that depends on what you mean by "guarantee". There is no guarantee, but also you probably have no fallback either in that case.
<pq>
the display controller could have e.g. a buffer position alignment requirement, that one buffer accidentally agrees with and the other does not.
<pq>
zamundaaa, thinking about it more, I guess the answer is simply "no".
<pq>
hmm, but one would also expect those kind of problems result in failing to create DRM FB
<zamundaaa>
The underlying problem is that I'd like to use atomic tests better in KWin, and we don't have the final buffer to present until we actually have the frame rendered. If we can rely on atomic tests with a different buffer than the one we will present (just created with the same args) then we can get rid of a bunch of fallback code
<pq>
you'd have to ask danvet I think
<pq>
...who is here
<pq>
Of course, would be best to test with the buffer you will then render to. Since you allocate all your buffers explicitly and do not rely on EGLSurface to provide them, you can actually do that.
<pq>
And with EGLSurface, you rely on EGL to not fail you with interop. anyway.
<zamundaaa>
I looked into allocating buffers explicitly, and it seems far from hard to integrate. But it would AFAIK reduce efficiency on mobile by quite a lot without EGL_KHR_partial_update
<pq>
that's a good question about partial_update vs. rendering to FBOs
<pq>
zamundaaa, but wait, what is your plan? You can't use an EGLSurface if you allocate yourself, and you can't test before rendering if you use EGLSurface?
<zamundaaa>
One possible plan is to explicitly allocate a separate buffer only for testing
<zamundaaa>
The other would be to swap buffers right in the beginning to get a buffer for testing (with garbage content but that doesn't matter)
<pq>
but... then you don't use the exact same gbm_bo_create call anymore?
<danvet>
if the fb is identical in all aspects except the actual contents, then it should be interchangeable
<danvet>
i.e. all the same metadata in addfb
<pq>
danvet, oh, that's really nice to know!
<danvet>
allocated exactly the same way (which can be tricky if you got it from a client, since there's all kinds of magic allocation things like cma, or content protected, or placement limits)
<danvet>
pq, I mean somewhere we guarantee that an atomic flip between two buffers Will Work
<danvet>
if they exactly match in everything
<pq>
...oh, not what I thought you said, then :-/
<danvet>
this is part of the legacy page flip ioctl contract
<pq>
we're not talking legacy here though
<danvet>
well for atomic drivers legacy page flip is built on top of atomic
<danvet>
so atomic _has_ to guarantee the same
<danvet>
or it's not really working
<pq>
zamundaaa, you can't eglSwapBuffers really if you don't actually draw anything. So I'd recommend a glClear() just for that.
<danvet>
there's only a handful of things which are guaranteed to work
<zamundaaa>
danvet: we'd only be testing our own buffers, the buffer could theoretically change format if we were using direct scanout before
<danvet>
flipping ACTIVE on the crtc on/off, without any changes
<danvet>
and pure page flip of metadata (including how it was allocated) equal buffers
<pq>
danvet, ok, that's very "under the hood"
<danvet>
pq, maybe need to fix docs to make it less under the hood :-)
<pq>
zamundaaa, changing format probably requires a modeset.
<zamundaaa>
can we assume that if changing from our format to a different client format works without a modeset, that going back to our format works without a modeset as well?
<zamundaaa>
Because we only do direct scanout if it's possible without a modeset
<zamundaaa>
in practice we already rely on it changing back without a modeset
<pq>
good question... weston has the same policy, but I'm not sure what it does on going back
<pq>
zamundaaa, the thing I don't understand is how can you "allocate a separate buffer just for testing" and have the test result be meaningful?
joes has joined #wayland
<zamundaaa>
I'm using the same arguments as for the gbm surface, Mesa internally uses that to create the buffers. But I guess we don't have a guarantee for that either
<pq>
zamundaaa, if you test with a buffer from gbm_bo_create(), that might not say much about what happens with a buffer from gbm_surface_lock_front_buffer().
<zamundaaa>
Yeah that's where the other plan comes in. Create the egl surface before we construct the output, swap buffers and use that first buffer for testing until we render
<pq>
yeah, that's what I'd do
<pq>
with glClear to ensure there actually is a buffer to be locked
<zamundaaa>
pq, danvet, thanks for the help, knowing the guarantees (and lack thereof) makes things a lot easier :)
<pq>
mind that my opinions tend to be pessimistic if not paranoid :-p
<pq>
MrCooper, it doesn't mean weston would stop using the EGLSurface path where it can, I think.
<MrCooper>
k
<MrCooper>
mutter is moving toward not using any EGL/GBM surface AFAIK
<pq>
unless the concensus is that the gbm_bo/FBO path is just as safe as the EGLSurface path, in which case doing everything with FBO could let drop some code
joes has quit [Ping timeout: 480 seconds]
<danvet>
zamundaaa, pq wrt format change: if you really haven't changed anything else at all it's probably going to work
<danvet>
but lol we've had exceptions on even this
<danvet>
maybe still have
<MrCooper>
pq: safe WRT what? It's what happens with glamor in Xorg
<zamundaaa>
MrCooper: I would have already implemented the same in KWin if it weren't for EGL_KHR_partial_update. I don't think there is an equivalent one can use with fbos
<pq>
danvet, I have Weston bug report about switching formats between RGB and NV12 IIRC.
<danvet>
yeah
<danvet>
I think with some chips if you take away the 2nd scaler/blender it internally needs
<MrCooper>
zamundaaa: there's an atomic KMS damage property IIRC
<danvet>
it doesn't work
<danvet>
or the other way round
<pq>
MrCooper, oh, it does? And it works for everyone?
<danvet>
because we need to reassign some resources
<danvet>
pq, it should work, but it's not on every driver
<zamundaaa>
MrCooper: I might be mistaken but it's about reducing the rendering load, not about partial display updates
<emersion>
MrCooper: the atomic KMS damage thing is unrelated, iirc
<danvet>
I think there's still some atomic drivers left that would benefit, but haven't wired it up
<emersion>
EGL_KHR_partial_update is strictly about rendering
<MrCooper>
and EGL_KHR_partial_update provides something buffer age can't?
<danvet>
tbf my recommendatation is: use damage prop, tell users to file bug reports against their driver if that's causing issues
<danvet>
the DIRTYFB ioctl is all kinds of horrible
<pq>
MrCooper, yes: allow the driver to avoid loading up parts of the FB that will not change.
<pq>
MrCooper, tilers benefitfrom it, I believe
<MrCooper>
I see
<MrCooper>
jadahl: ^
<pq>
danvet, that's all cool, not at all what we're talking about. But cool. :-)
<MrCooper>
not sure why a tiler would load in a tile nothing gets rendered to though
<pq>
that I don't know
<jadahl>
MrCooper: damage page flip reporting?
<pq>
jadahl, no.
<MrCooper>
no, the EGL_KHR_partial_update discussion
<MrCooper>
they're saying it's needed for efficiency with some GPUs, I don't really understand why yet though
<pq>
You use buffer_age to know which parts to update, and then you use partial_update to tell the driver which parts of the FB you're not going to touch, so the driver can skip... something.
<jadahl>
MrCooper: fwiw, probably not moving away from surfaces completely, it's still necessary somewhere, but going directly to "bos" is nice for pipewire screen casting
vsyrjala has joined #wayland
joppe has quit [Ping timeout: 480 seconds]
<MrCooper>
pq: I could imagine some per-tile processing which can be skipped; I'd imagine that not to be that expensive, but my intuition might be wrong
<pq>
Why else would that extension exist? :-)
<pq>
It's not EGL_EXT_swap_buffers_with_damage.
_whitelogger has joined #wayland
<MrCooper>
I guess maybe with (some?) tilers preserving the previous buffer contents requires some kind of drawing operation, which is executed even for tiles with no other drawing without this extension
<zzag>
pq: zamundaaa: heh, I also tried to make kwin manage gbm_bos manually a year or so ago, but couldn't find a way how to deal with partial updates. both panfrost and lima seem to be doing some magic under the hood when SetDamageRegion is called
<jadahl>
ah partial_update == eglSwapBuffersWithDamage() is it, yea, mutter uses that
<zamundaaa>
jadahl: no, that's a different extension. This is about eglSetDamageRegionKHR
<jadahl>
hmm, right
<emersion>
eglSwapBuffersWithDamage is only about WSI
<jadahl>
shouldn't it be possible to derive DamageRegion from WithDamage?
<emersion>
(ie what gets sent to wayland via set_damage)
<emersion>
eglSetDamageRegionKHR is about rendering optimizations inside the driver
<emersion>
it's not exactly the same same region, see the ext description
<jadahl>
was trying to avoid being side tracked too much :P
<emersion>
one is surface damage in EGL terms, the other is buffer damage. note, *not* the wayland worrding
<emersion>
wording*
<jadahl>
SetDamageRegion helping with panfrost seems promising anyhow, was going to try to find gnome-shell bottle necks running on panfrost at some point
<emersion>
note, as noted above, SetDamageRegion can't be used with FBOs
<emersion>
so if you're going in the same direction as wlroots with FBOs, i wouldn't bother with it
<jadahl>
right, mutter isn't using fbo's other than for shadow buffers atm
<jadahl>
i'm likely going to have both gbm_surface and gbm_bo paths indefinitely
mbritanicus has quit [Killed (NickServ (This nickname is registered and protected))]
<emersion>
ah. but then what is the motivation to switch to gbm_bo?
<emersion>
just optionally have more control over the swapchain?
<jadahl>
emersion: yea
emersion has quit [Remote host closed the connection]
emersion has joined #wayland
<jadahl>
emersion: one example is compositing into gbm_bo's allocated for the pipewire stream
<jadahl>
to avoid the extra blit that sits there now
<emersion>
right
bl4ckb0ne has quit [Quit: Death is but a door, time is but a window, I'll be back!]
bl4ckb0ne has joined #wayland
bl4ckb0ne has quit [Remote host closed the connection]
emersion has quit [Remote host closed the connection]
bl4ckb0ne has joined #wayland
emersion has joined #wayland
Narrat has joined #wayland
Lyude has joined #wayland
sammi`_ has quit []
spstarr has quit [Remote host closed the connection]