07:36wlb: weston/main: Marius Vlad * backend-x11: Move back-end removal to the destroy function https://gitlab.freedesktop.org/wayland/weston/commit/8d85c43355fa libweston/backend-x11/x11.c
07:36wlb: weston Merge request !1378 merged \o/ (backend-x11: Move back-end removal to the destroy function https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1378)
07:37wlb: weston/12.0: Derek Foreman * xwm: Fix accidental resizing of windows https://gitlab.freedesktop.org/wayland/weston/commit/6f26c009c1db xwayland/window-manager.c
07:37wlb: weston Merge request !1377 merged \o/ (xwm: Fix accidental resizing of windows https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1377)
07:42wlb: weston/main: Derek Foreman * xwm: Fix accidental resizing of windows https://gitlab.freedesktop.org/wayland/weston/commit/e193a178e806 xwayland/window-manager.c
07:42wlb: weston Merge request !1376 merged \o/ (xwm: Fix accidental resizing of windows https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1376)
09:59wlb: weston Issue #832 closed \o/ (VNC on imx8 https://gitlab.freedesktop.org/wayland/weston/-/issues/832)
11:03kchibisov: How to identify that the output has fractional scaling? I'd assume one could do that based on the resolution and logical size from the xdg-output?
11:03emersion: why do you need to know?
11:03kchibisov: I said the same to the user of the library.
11:04kchibisov: but they want it to contraint size.
11:04kchibisov: They are just get confused that the `monitor` object returns scale 2, but `window` scale 1.5.
11:05kchibisov: I just remember that GTK folks needed something like that in the past to scale their widgets.
11:05kchibisov: Since before they used the `some monitor` as a hint, which is obviously wrong.
11:08emersion: monitors should not be used to infer anything really
11:08emersion: monitors are best ignored unless there is a really good reason to look at them
11:09kchibisov: I guess I'll just update the docs and close the issue.
11:09kchibisov: I was just curious if someone decided to add a fractional scaling information to outputs.
11:09emersion: nope
11:10emersion: also wl_surface.preferred_buffer_scale might not match any output's
11:11kchibisov: I know, I know compositor which has a scaling on per-window basis.
11:11kchibisov: So you can make some windows smaller/bigger separatelly.
11:22kennylevinsen: wl_output.scale was superseded by preferred_buffer_scale, so if anything changes I imagine it would be deprecation rather than upgrade to fractional...
11:26kchibisov: I meant, to xdg-output.
11:26kchibisov: So it's more like meta data.
11:27wlb: wayland Merge request !350 opened by Simon Ser (emersion) protocol: mention wl_surface events from wl_output.{scale,transform} https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/350 [Protocol]
12:04kchibisov: Is it valid for compositor to send configure larger than the configure_bounds it send?
12:12emersion: yes
12:12emersion: configure_bounds is just a hint
12:12kchibisov: But I can use them reliably to constraint initial window size?
12:13kennylevinsen: it's a bit weird to explicitly request a size larger than configure_bounds, but I suppose it could happen if e.g. a user is resizing a window past output dimensions with SSD
12:13kchibisov: Like the hint is used for users to not try to draw the window larger than compositor can present in the current state. From what I understand.
12:14Company: GTK uses the bounds as a hint for the application as an upper limit when the application picks a size
12:14kchibisov: Yeah, when compositor sends `0x0` I want to limit the size by the configure bounds.
12:14Company: and the configure size to set the size when it doesn't ask the application
12:14zamundaaa[m]: kchibisov: yes, that is the intended purpose
12:14Company: so those numbers rarely ever meet each other in that codebase
12:15Company: but it's expected that configure size can be largeer than bounds
12:16kchibisov: Thanks.
12:16Company: usually the results are inpleasant though
12:16Company: because a bunch of code will cause a sudden shrink of the window to the bounds
12:16kchibisov: If the user asks GTK to resize window to WxH will it use configure bounds for that or just resize?
12:16kennylevinsen: I suppose the flow would be: if configure contains dimensions, adhere to those - if not, pick a size less than or equal to configure_bounds (infinity if not set)
12:17Company: kchibisov: it will just resize
12:17kchibisov: Hm, interesting.
12:17Company: kchibisov: but the next time the app initiates a resize, it will limit itself to the bounds
12:17Company: which is where you get the sudden shrinking
12:17kennylevinsen: I suppose that's also fair enough - if a user wants to make the window span two outputs, why not let them? It's just not a pleasant size to pick autonomously.
12:17Company: you can experiment with that in mutter I believe if you have 2 monitors
12:17Company: and resize the window to be larger
12:18kchibisov: kennylevinsen: you don't have tiles spanning 2 outputs.
12:18emersion: in sway, configure_bounds would account for desktop UI elements like bars, but the user can resize past these bounds
12:18emersion: in floating mode
12:18emersion: the bar is actually displayed under the floating windows
12:18Company: kennylevinsen: it's problematic in the sense that you need to come up with an algorithm that works both for users growing the window out of bounds and for things like output size shrinking
12:19Company: kennylevinsen: say when you disconenct from an external monitor
12:19kchibisov: emersion: the bar is displayed where you told it to be displayed though.
12:19emersion: i mean, sway with default config
12:19kchibisov: sure.
12:19kennylevinsen: I would expect a conventional stacking compositor to set bounds to the usable visible area of the current monitor
12:19emersion: it's just an example of when configure can go past configure_bounds
12:19kennylevinsen: tiling is just a case where we reduce the bounds further
12:20Company: we've had various discussions about how to handle bounds and no good conclusion
12:20kennylevinsen: Company: Yeah I can imagine it's tricky to deal with for a toolkit :)
12:20kchibisov: The issue I'm trying to solve is to 1) constraint the initial size 2) disallow resizing in tiling in some cases.
12:20kchibisov: The 1) I solved.
12:20Company: ie if compositors should send monitor bounds or root window bounds or what
12:20kennylevinsen: on the protocol level it's trivial enough, but that's how the story goes for most things isn't it?
12:20Company: and if apps should shrink to bounds or only use it as a limit when growing
12:21kchibisov: The other issue I have is users want to resize, but not when their window can't resize, like on sway with tiling.
12:21kchibisov: But tiling state doesn't mandate that it can't resize, and users on compositor I use can resize tiles.
12:21Company: kennylevinsen: depends on how prescriptive the protocol wants to be - "here's a random number" or "if you do not stay below this number, the compositor will disconnect you"
12:21emersion: clients are not allowed to resize when maximized
12:21kchibisov: does sway set maximize for everything?
12:22kennylevinsen: kchibisov: A tiling compositor should send dimensions in the configure event together with the tiled state, which should overrule bounds anyway. But I would also expect a tiling compositor to send bounds equal to the tile.
12:22kchibisov: I remember it sets maximize or tiling.
12:22emersion: do we not have wording to disallow resize when tiled?
12:22kennylevinsen: clay does that
12:22kchibisov: emersion: we don't and I'm not sure why we need it.
12:22emersion: kchibisov: sway sets tiled when xdg-shell version is high enough, otherwise maximized
12:23kchibisov: kennylevinsen: my tiling compositor can handle user tiles resizes.
12:23kchibisov: because the `x` is infinite.
12:23kennylevinsen: which should result in configure events with new dimensions
12:23kchibisov: So it'll naturally resize and my viewport just scroll.
12:23kennylevinsen: which should take priority over bounds
12:23kchibisov: yes, but I'm talking about different issue.
12:23kchibisov: user want to not resize during tiling when the compositor will crop them, like sway.
12:24kchibisov: So in theory, I could use `configure_bounds` to limit the resizing in such case, but gtk doesn't do that for example.
12:24emersion: some more context: https://github.com/swaywm/sway/issues/7794
12:24emersion: sway crops because sending a protocol error trips too many clients
12:25kchibisov: emersion: there's no wording for tiled states though.
12:25kchibisov: so it's not like you can do so.
12:25kennylevinsen: emersion: do we? I only see tiled for xdg and maximized for xwayland
12:25emersion: kennylevinsen: logic is in wlroots
12:26kchibisov: the maximized has the right wording.
12:26emersion: kchibisov: that sounds like an oversight to me
12:26kennylevinsen: ah, there
12:26kchibisov: ok, what to do with tiled compositor which can resize?
12:26kchibisov: I'd assume that if it can resize, it's not really tiled?
12:27kchibisov: but without tiled state we can't get rid of the shadows.
12:28kchibisov: Maybe sway should always set `maximized` then?
12:29kchibisov: And compositor which can resize during tiling can just have `tiled`?
12:29emersion: it's not maximized though
12:29kchibisov: it's just `must be obeyed` doesn't work for 'us' with tiled.
12:30kennylevinsen: for sway, tile resizing is initiated by sway itself, so whether to allow a certain resize is up to sway. What is communicated to the client would be the current size of the tile, and the client in return states its preferred min/max size which can be used as input
12:30kchibisov: kennylevinsen: yes, but some compositors can resize tiles when user does it correctly.
12:31kchibisov: So if user decided to resize due to some input event, it'll work normally.
12:31kchibisov: even when everything is tiled.
12:31kchibisov: sway can't do that, because it's `x` limited.
12:33kchibisov: Separate `RESIZEABLE` flag sent by compositor could work though.
12:33kennylevinsen: I don't understand why that is important. In sway, when you enlarge one tile, it shrinks another. In your case, it grows the viewport and shifts is neighbors. Potato tomato?
12:33kchibisov: kennylevinsen: it doesn't shift anything though.
12:33kennylevinsen: But if you are not making your windows tiled and using client-side decoration resize, then maybe that is an issue?
12:33kchibisov: I don't want `must obey` wording.
12:33emersion: kennylevinsen: sway doesn't support client-initiated resize when tiled, kchibisov's compositor does
12:33kchibisov: because `must obey` => crash client.
12:34kennylevinsen: emersion: yeah I had a feeling that was where the issue lied, but didn't seem obvious from the chat so far :)
12:35emersion: i think tiled GTK hides the resize handles?
12:35emersion: not sure
12:35kchibisov: it is, but window could decide to resize itself by some other event.
12:35kchibisov: like you opened a video of a larger size so it tried to account for it.
12:36emersion: that sounds like a recipe for disaster tbh
12:36kchibisov: Yeah, but the user on the sway issue really does that.
12:36emersion: if you start allowing client-initiated resize when tiled, there's a chance you end up with an infinite feedback loop
12:36kchibisov: even when I said them the exact same thing.
12:37emersion: clients fighting each other for the "correct" size
12:37kchibisov: I'll wait a bit for YaLTeR[m] since its his compositor that can handle client initiated non interactive resizes.
12:37kchibisov: emersion: this particular compositor doesn't have an issue with fighting, the `x` is unbounded.
12:38kchibisov: so they all can grow as large as they can.
12:38kennylevinsen: yeah that differs from sway where there is always a correct size
12:38emersion: not sure "tiled" is the correct state to use for them
12:38kchibisov: emersion: it's still tiled, to some sort.
12:38kchibisov: https://github.com/YaLTeR/niri
12:39emersion: to me it's maybe tiled on some edges, but not on the resizable edges
12:39kchibisov: yeah, but if you don't set tiled you have shadows, etc.
12:39kchibisov: it can probably crop though.
12:39emersion: shadows are used to allow the user to resize
12:39kennylevinsen: I imagine you either have resize handles with shadows or no resize handles - if you go full tiled you'll probably need to do fully server-initated resize.
12:40kchibisov: it uses ssd, so...
12:40kchibisov: the problem are not with interactive resizes though.
12:40kchibisov: but with just submitting larger buffer.
12:43kchibisov: besides, the right wording for tiled could be hard.
12:43kennylevinsen: yeah and probably wouldn't match your use-case regardless
12:44kchibisov: Because you can only apply it when 'top and bottom' are tiled.
12:44kchibisov: The same for 'left and right'.
12:44kennylevinsen: well maybe not that hard - "if a surface is tiled on two opposing edges, the surface must adhere the window dimension between these edges"
12:45kennylevinsen: then you'll be able to enforce height without width
12:45kennylevinsen: but you'd get a shadow on that side most likely
12:46wlb: wayland-protocols Merge request !257 opened by Simon Ser (emersion) xdg-shell: recommend against drawing decorations when tiled https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/257 [xdg-shell]
12:47kennylevinsen: do we know of compositors that tile fewer than 4 edges today?
12:47emersion: i think GNOME does?
12:47kchibisov: yeah, snap to corner thing.
12:47kchibisov: You still need an edge to resize with CSD.
12:48kchibisov: with SSD you don't have to deal with all of that though.
12:48emersion: kennylevinsen: that would make sense to me
12:48emersion: (the wording you suggested)
12:48kchibisov: You'd need a different wording a bit though.
12:49kchibisov: Since you know the name of the `opposing` edge.
12:49emersion: allowing resize on one axis when both edges are the edge of the screen doesn't make sense, for instance
12:50emersion: i'd go as far as saying all compositors i know but niri can't handle client resize when two opposite edges are tiled
12:50kchibisov: I mean, the wording is correct, you should just tune it a bit to say `right`/`left`.
12:51kchibisov: since each tiled state is separate.
12:51emersion: sure
12:53kchibisov: I guess the said compositor is not really tiled on the `right` edge.
12:53kchibisov: But at the same time, we don't want the shadow, since we can resize on our own.
12:53kchibisov: basically what sway does.
12:57emersion: it would be nice to open an issue summing everything up if you have time
12:57emersion: maybe jadahl has some insights as well
12:58emersion: the way i see it, right now we have two states: either ask the client to draw decos and allow resize on a given edge, either ask the client to not draw decos and not resize on that edge
12:59emersion: and you want a third state: no decos, but resize allowed still
12:59kchibisov: pretty much it.
12:59kchibisov: but it's not like compositors can't crop CSDs.
12:59emersion: that really needs to be per-edge as well, because you still can't resize vertically in niri
13:00emersion: cropping CSDs kinda works but also doesn't look very good with e.g. border radius
13:00kchibisov: emersion: you better not see what hack there's in niri.
13:00emersion: ("what if i want to have tooth-shaped window borders?!?")
13:01kchibisov: it's basically 'if client.has_csd() => draw_border_just_like_a_big_rect()'.
13:01kchibisov: otherwise 4 rects separatelly.
13:02kchibisov: I can probably write an issue for that once I have time. I know that YaLTeR[m] will probably tune in later, since he's in the meeting.
13:02kchibisov: My inital questions are sort of answered though, given that winit is not GTK and we always use SSD I'll just limit resize in tiled.
13:03kchibisov: emersion: will you send a wording suggested by kennylevinsen to add 'obey' wording?
13:07kennylevinsen: yup
13:10emersion: kennylevinsen: do you want to ^ or ENOTIME?
13:10kennylevinsen: am doing
13:10emersion: noice
13:15wlb: wayland-protocols Merge request !258 opened by Kenny Levinsen (kennylevinsen) xdg-shell: Enforce geometry for tiled xdg_toplevel https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/258
13:16kchibisov: kennylevinsen: thx, though, it feels like emersion's patch should go first.
13:18emersion: it's fine, either of us can rebase whenever a patch lands
13:18kennylevinsen: indeed
13:18kchibisov: yeah, it's just the kennylevinsen wording feels like not-complete.
13:18kchibisov: in the context of present wording in maximize.
13:19kennylevinsen: feel free to add a review comment, it's what MRs are for. :)
13:23kchibisov: btw, what groups on gitlab are for? I was added to wayland group in the past, but I have no idea why.
13:23kchibisov: maybe because of the `spam` incedents?
13:24emersion: shouldn't be the case
13:24emersion: in general we add people to groups when they can contribute better that way, e.g. issue triage or merging or such
13:25emersion: you were added by daniels on Mar 30, 2023 for issue triage purposes
13:26kchibisov: yeah, it's just it's not like I'm very active on wayland tracker, so I don't use any powers.
13:27emersion: please make use of your powers ;)
13:28kchibisov: btw, while you're here, why wlroots/sway counts serials for input-method/text-input but never uses them to discard?
13:29kchibisov: wlroots also resets the serial on input-method::commit, but I also don't know why. Probably these protocols are just a mess...
13:29emersion: i have no idea, sorry
13:29emersion: would need to dig into the impl again, it's been ages
13:29kchibisov: I just have a dig a while ago.
13:29kchibisov: I'm still not sure that I understand how it all supposed to work with serials.
13:30kchibisov: especially when gtk commits without active text-input...
13:36kennylevinsen: I wonder if it would have been better to just have strict min_size/max_size separate from state...
13:43YaLTeR[m]: does this go through now?
13:43YaLTeR[m]: yeah it does. At last
13:44emersion: actually let me try to allow unregistered users one more time, with a secret channel
13:45YaLTeR[m]: I tried to register on OFTC like a year ago, but NickServ wasn't responding to me. So now I tried again and it worked this time so yay
13:45kchibisov: emersion: secret should work just fine, given that sr.ht wasn't spammed.
13:45kchibisov: Though, some users could target this specific channel.
13:45emersion: it's on another network though
13:46kchibisov: the spam was there as well, no?
13:46kchibisov: the sway was spammed a lot.
13:46emersion: hm, didn't pay close attention
13:46kchibisov: I know that it had `global pings`.
13:46emersion: i'd trust libera staff to be reactive about spam a lot more than OFTC
13:46kchibisov: the same global pings I was getting on oftc.
13:47YaLTeR[m]: makes me wonder how many more times I thought my messages were going through when they weren't
13:47kchibisov: just use irc directly, YaLTeR[m] .
13:47kchibisov: always go through.
13:48emersion: i wish someone patched the matrix bridge to at least surface back errors properly
13:48YaLTeR[m]: don't want to set up a bouncer and keep something open just for 1-2 channels
13:48kchibisov: Some forges provide said bouncer with the account.
13:48kchibisov: just saying.
13:49emersion: ^^
13:49YaLTeR[m]: this coming from someone explaining to me earlier today how hard it is to log into gitlab :)
13:49kchibisov: YaLTeR[m]: it was yesterday.
13:50YaLTeR[m]: ah right
13:50kchibisov: I mean, asking question on irc without registration is instant.
13:50kchibisov: you just type nick and ask.
13:51kchibisov: Though, if you just use wayland channel, you don't have to be idle here.
13:51YaLTeR[m]: well I read this channel and generally expect to participate occasionally
13:51kchibisov: just read the logs on the logger.
13:51YaLTeR[m]: anyhow now it works as is, i got registered
13:52kchibisov: yeah, some channels ask you to register, but it's kind of rare.
13:52kchibisov: The issue is that you can get logged out and I don't think you'll get notified.
13:52kchibisov: it's pretty common with oftc to end up like that.
13:52YaLTeR[m]: oh that's still a thing?
13:53YaLTeR[m]: isn't technology wonderful
13:53kchibisov: not with libera, but with oftc it still does happen to me.
13:53emersion: thank-you-oftc.jpg
13:53zamundaaa[m]: NickServ does tell you. But if you overlook that and type in the channel, your messages just go into the void
13:53kchibisov: emersion: we say no to sasl.
13:54emersion: ;_;
14:03Company: it's still weird to me how people try so hard to make a communication protocol designed for transient communication retain everything
14:03Company: use a different protocol if you want that
14:04kchibisov: yeah, for most projects retain communication is on the git forge.
14:04Company: you can also use matrix or discourse or all the closed protocols
14:08Company: YaLTeR[m]: while you're here, there was one thing I wanted to ask you
14:08YaLTeR[m]: sure
14:09Company: YaLTeR[m]: in the video apps you're hacking on, what's the alrgest number of video streams you have playing at the same time?
14:09YaLTeR[m]: I load-tested Identity with, like, 12 FullHD 30 FPS streams at once, which ran in realtime
14:10YaLTeR[m]: it currently easily runs into a gstreamer crash tho
14:10Company: I'm trying to figure out how many subsurfaces we would end up with if we passthrough all the video streams
14:11Company: so that ultiamtely I can judge how much I can automate stuff and how much we need API to toggle things
14:11pq: Company, what do you worry about with the number of sub-surfaces?
14:12Company: pq: dunno extensively yet - but it's coming up sometimes, like wondering about swapchains and their sizes
14:12Company: or how hard it is to (de)compose the render tree in GTK
14:12pq: Company, hmm. Why would you have your own swapchain for a sub-surface?
14:13Company: and how important it is to avoid O(N^2) algorithms
14:13Company: because I want to send dmabufs straight to the compositor
14:13YaLTeR[m]: I also load test by loading 50+ images at once
14:13Company: and I can't do that unless I've gotten my dmabufs accepted as wl_buffers by the compositor
14:14YaLTeR[m]: all of those go through gstreamer
14:14YaLTeR[m]: so there's that
14:14Company: 50+ images at once (assuming they're large) will get you bandwidth slowdowns
14:14pq: Company, use sub-surfaces when you *get* dmabufs readily, like from a video decoder. I would not use the GPU to create a dmabuf from something that wasn't, but just compose that to the main window image.
14:15pq: IOW, if you need to use a GPU to make a copy of something in order to get a dmabuf you can send to the compositor, maybe it's better to just render that into the window main buffer instead of a sub-surface.
14:16Company: pq: well, I still need to get it turned into a wl_buffer (unless I use immediate, but that seems scary, too, with how easy it is to break dmabufs)
14:16Company: no, that's not what I'm wondering about
14:16pq: no, immediate does not bypass any checks, it just explodes harder
14:16Company: yeah, that's what I mean
14:16Company: I want stuff to not explode
14:17Company: so having a bufferpool set up in advance seems preferable
14:17Company: and then shuffling those buffers around from the compositor to the video producer (decoder, camera, whatever)
14:17pq: it depends
14:18pq: ah, that way, that's cool
14:18Company: from GTK's POV I think there's 4 rather different producers of buffers:
14:18Company: video decoders (ie usually same hardware as compositor)
14:18Company: cameras (different hardware)
14:18pq: I was assuming that you let the video decoder allocate its own destination buffers, because... they often want that?
14:19Company: VMs (ie virgl, so probably same hardware, but different settings)
14:19Company: and OpenGL libraries, that want to render on their own buffer
14:20Company: and for those 4 cases, GTK should just operate as a passthrough in default operation
14:20pq: right
14:20Company: but I'm not quite sure how to achieve that reliably
14:20pq: you can't, not reliably
14:21Company: like, in conforming to the protocols and APIs those things use
14:21Company: and in not exploding various hardware limits and limitations
14:21pq: protocol and APIs are the easy thing to get right, it's all the stuff that's not explicitly in APIs that likely fails you
14:22Company: protocols and APIs definitely are not the easy part
14:22pq: ok, "easiest"
14:22Company: hehe
14:22pq: I mean, they are defined at least, to some extent :-)
14:23Company: yeah, and then they're incompatible
14:23pq: but yeah, in the end, everything is trial-and-fallback
14:24Company: bufferpools could simplify that quite a bit, because everything gets negotiated and agreed upon and then it's just a question of who uses which buffer of the pool right now
14:24Company: basically one big swapchain that goes from producer to compositor - or for direct scanout, potentially straight from webcam to monitor
14:25pq: ideally, yes
14:26Company: now we just need to do the "easy" part and make all the protocols and APIs do that ;)
14:26pq: except you have to negotiate separately for each set of specific devices involved in any particular path
14:27Company: yeah, I need to tell the compositor and GTK and GStreamer and pipewire and v4l and they all need to agree on stuff
14:27Company: currently my laptop's webcam produces YUYV buffers and my laptop's GPU only accepts NV12
14:27Company: so we're almost there!
14:28pq: heh
14:29pq: when all else fails, CPU conversion! /o\
14:29Company: so it's unlikely that for big videos like FullHD with YaLTeR[m] we get >10 videos at once
14:30Company: we could easily get >10 videos when somebody scrolls in tiktok, but those won't be fullHD
14:30Company: same for videoconferencing
14:31pq: I think it's unlike to achieve direct scanout from a webcam anyway, so might as well use a shader to convert. A webcam probably wouldn't use a non-linear format modifier.
14:31pq: *unlikely
14:32Company: the question with all of that is how far I can push things
14:32Company: like, if I get the webcam buffer to the compositor, and the compositor does the compositing/converting, that's better than if I do it
14:33any1: Switch the camera to MJPEG and HW decode that?
14:33pq: I wouldn't take that as a given.
14:33Company: it's the same amount of work in the ideal case, but it's easier to find the ideal case the further downstream the conversion happens
14:34YaLTeR[m]: switch the camera to MJPEG except it's a logitech camera which will reset all settings and go to 5 fps max when you do that
14:35pq: is it the same amount of work? I think that might depend on the framerates in each software component.
14:36pq: but it should be I guess, fully optimized
14:37Company: this is the simple case anyway
14:37pq: actually, yes, the compositor might be able to do better than the client indeed, especially if the window is partially occluded
14:38Company: if there's any compositing happening (like occlusion or scaling or clipping or subtitles or notification overlays or buttons), you want to do the conversion there
14:39Company: but that's another problem (to know the right thing to convert to)
15:02MrCooper: pq: FWIW, some GPUs can scan out from linear buffers; apparently Nvidia dGPUs can even scan out from system memory, in contrast to AMD & Intel dGPUs
15:03kennylevinsen: hmm that would actually be quite a neat trick, why can't other GPUs do that :(
15:03pq: MrCooper, can, but is it a good idea? anyway, sysram vs. VRAM was the difference I was thinking.
15:03kennylevinsen: direct scan-out shm buffers!
15:05pq: I'd imagine integrated display controllers have even less problems scanning out from sysram.
15:05MrCooper: kennylevinsen: for one thing, it probably results in rather poor utilization of the PCIe bandwidth
15:06MrCooper: which might interfere with any drawing using the same dGPU
15:08kchibisov: probably the use case was intel integrated + nvidia dGPU in laptops for that.
15:18MrCooper: yeah could be
15:19MrCooper: in which case they might even have optimized the memory fetching to avoid wasting PCIe bandwidth
15:49DemiMarie: pq: should one always start with doing a conversion in the shader, then try more optimal approaches later?
16:27wlb: wayland-protocols Merge request !251 closed (linux-dmabuf: mark as stable, v2)
17:09swick[m]: pq: do you intend to get back to https://gitlab.freedesktop.org/pq/color-and-hdr/-/merge_requests/35 at some point?
20:23Company: does the Wayland spec specify somewhere what algorithm is used for scaling buffers?
20:23emersion: nope
20:24Company: hrm
20:24Company: I'm wondering about GTK's scaling guarantees wrt passthrough
20:24Company: in particular when downscaling videos
20:26Company: though I'm not even sure what the best thing to do is when playing a 4k video in a window that's resized to 800x600 or so
20:27Company: do you want to just linear downscale it or do you want to create mipmaps first - or do you even want to write a fancy shader that does cubic or lanczos or whatever
20:28Company: question for video people I guess
20:28emersion: we could have a wayland protocol to set the scaling algo
20:28emersion: KMS has stuff like this
20:28Company: might be useful to look into
20:28emersion: no mimaps though
20:29Company: I'm far from an expert on scaling algos anyway
20:29Company: so no idea how video people want their videos downscaled
20:39Company: emersion: do you ahve a link for docs about that kms property?
20:50emersion: https://drmdb.emersion.fr/properties/4008636142/SCALING_FILTER
20:50emersion: original kernel patch had more modes
21:01Company: yeah, that's not very fancy yet
21:02emersion: the extra modes were removed because no clear use-case iirc
21:03Company: what do video players actually do when downscaling?
21:03Company: just use LINEAR?
21:03Company: run custom shaders?
21:03DemiMarie: Company: How big is the performance win from trying to do passthrough instead of just using a shader?
21:03Company: mipmap?
21:04Company: DemiMarie: there's tons of answers to that question depending on target hardware, app and what you're actually passing through
21:05Company: there's 2 potential wins: 1. is not hitting the GPU on mobile devices that have a custom compositing engine
21:05Company: when playing back video
21:06Company: the video decoder sends its frame straight to the compositing engine, because GStreamer, GTK and gnome-shell all don't need to touch it
21:06Company: 2. is the case where you run benchmarks in a VM
21:07Company: potentially benchmarks that hit the fill rate, so that the framerate goes down if someone does extra copies
21:07DemiMarie: Is this because the CPU is bottlenecked on memory bandwidth?
21:07Company: no, the GPU is
21:08DemiMarie: Anyway, from what others (notably pq) have mentioned here, it seems that the first step is to use shaders because they will work everywhere, and only after that is done look at hardware-specific offloads.
21:08Company: GPUs can do billions or trillions of pixels per second
21:08Company: but if you run a benchmark you can see the difference between 500fps and 400fps
21:09DemiMarie:shrugs
21:09Company: yeah, the trick is to set up your APIs so that it will magically hit the fast path
21:10DemiMarie: Who uses GTK on mobile anyway?
21:10Company: that's the wrong question
21:10Company: the right question is "Who doesn't use GTK when it's obviously the fastest on mobile?"
21:11DemiMarie: Does it support Android?
21:11Company: no
21:11DemiMarie: Because non-Android Linux is a rounding error
21:11DemiMarie: non-Android mobile Linux
21:11Company: I mean, it probably coudl rather easily, but nobody cares
21:11kennylevinsen: So is desktop Linux, but we're all here aren't we?
21:12Company: I'm also not doing this to gain market share
21:12Company: I'm doing this so gnome boxes has a higher framerate than native Windows
21:13DemiMarie: How will that even be possible?
21:14DemiMarie: kennylevinsen: desktop Linux is a development environment. For me at least, my phone is not a development environment, and Qubes OS hasn’t been ported to it yet.
21:14Company: because the native Windows has a shitty gl driver and the VM uses virgl
21:14DemiMarie: which hardware?
21:14Company: Intel is known for shitty GL drivers on Windows
21:15DemiMarie: Whereas Linux uses Mesa?
21:16Company: yeah
21:16Company: no idea what Windows VMs use though
21:16Company: but it's a fun thing to attempt