#asahi · 2023-12-23 17:57
Nefsen402(into wlroots)#asahi · 2023-12-23 17:57
Nefsen402Probably unmergable though#asahi · 2023-12-23 17:56
Nefsen402I might go this far#asahi · 2023-12-23 17:55
Nefsen402oh! Didn't know that one existed#asahi · 2023-12-23 17:55
Nefsen402everything is moving to vulkan anyway#asahi · 2023-12-23 17:54
Nefsen402s/have/hate#asahi · 2023-12-23 17:54
Nefsen402vulkan it's technically possible to get a dmabuf but only if you have compatibility and love hacks or so I've heard#asahi · 2023-12-23 17:53
Nefsen402gl gives you no way of creating a dmabuf. You have GBM for that and with GBM you need a copy#asahi · 2023-12-23 17:52
Nefsen402that's why I specifically chose the word "import"#asahi · 2023-12-23 17:52
Nefsen402dmabuf yes, that's how it currently works#asahi · 2023-12-23 17:52
Nefsen402The gl impl cannot import a shm without a copy#asahi · 2023-12-23 17:51
Nefsen402the fd might have garbage next time#asahi · 2023-12-23 17:51
Nefsen402I don't know enough about vulkan to say anything#asahi · 2023-12-23 17:51
Nefsen402So in the GL world it can't just map it back by creating a new texture#asahi · 2023-12-23 17:50
Nefsen402This means that it's possible that an app can just pass back the same shm and not have a swapchain at all or even double buffering#asahi · 2023-12-23 17:50
Nefsen402Compositors like wlroots will actually release shm textures straight back to the compositor once it uploads it to the render impl#asahi · 2023-12-23 17:49
Nefsen402yes, I was thinking GL#asahi · 2023-12-23 17:49
Nefsen402Ah#asahi · 2023-12-23 17:48
Nefsen402But compositors don't have access to the original shm fd#asahi · 2023-12-23 17:48
Nefsen402But then what happens when the compositor wants the texture again?#asahi · 2023-12-23 17:47
Nefsen402Yeah, but that isn't possible rn without a wayland protocol#asahi · 2023-12-23 17:46
Nefsen402aps that were previously visible but then go suspended is an example#asahi · 2023-12-23 17:46
Nefsen402Of course, but sometimes it will allocate a texture for something, but not actually texture from it#asahi · 2023-12-23 17:45
Nefsen402Right. I was thinking of the case where it would be possible to compress the apps swapchain that it shares with the compositor#asahi · 2023-12-23 17:42
Nefsen402and that upload is done in the compositor#asahi · 2023-12-23 17:42
Nefsen402that shared memory has to be "uploaded" to the gl implementation so that it has a GLTexture to texture from#asahi · 2023-12-23 17:41
Nefsen402or fds representing shared memory#asahi · 2023-12-23 17:41
Nefsen402Wayland can either work by apps passing fds representing dmabufs#asahi · 2023-12-23 17:41
Nefsen402Foot is an example of a popular shm based terminal emulator, would compress really nicely#asahi · 2023-12-23 17:40
Nefsen402Unfortunately compositors upload shm textures themselves, it can't suspend shm based apps with this approach#asahi · 2023-12-23 17:39
Nefsen402That's probably fine when my app is suspended in another workspace and not getting any frame callbacks#asahi · 2023-12-23 17:38
Nefsen402I was thinking it was a hard no, but that's really interesting that it's possible!#asahi · 2023-12-23 17:37
Nefsen402Can zram compress memory reserved for the GPU?#asahi · 2023-12-23 15:23
Nefsen402the swapon advice online is horrible. Just configure /etc/fstab and run mount -a#asahi · 2023-12-23 15:22
Nefsen402you need to put your swap partition under /etc/fstab so that it's persistent to the next boot#asahi · 2023-12-23 15:18
Nefsen402I think in the past btrfs didn't support swapfiles but it does now#asahi · 2023-12-23 15:18
Nefsen402donno if there's anything special you need to do with btrfs#asahi · 2023-12-23 15:18
Nefsen402I would probably do a swapfile#asahi · 2023-12-23 15:18
Nefsen402configuring a swap is like two commands and you can disable it later or give it more#asahi · 2023-12-23 15:17
Nefsen402definitely#asahi · 2023-12-23 15:16
Nefsen402But I have a 32gb machine so it's fine#asahi · 2023-12-23 15:16
Nefsen402my install came with a 8gb zram swap#asahi · 2023-12-23 15:15
Nefsen402Much of the "need to force restart" scenarios would probably evaporate with a bit of actual swap#asahi · 2023-12-23 15:15
Nefsen402It's not actually using your disk#asahi · 2023-12-23 15:14
Nefsen402zram is a virtual swapfile that is backed by ram through a compression algorithm#asahi · 2023-12-23 15:06
Nefsen402if it says something under /dev/zram then you should probably configure real swap#asahi · 2023-12-23 15:05
Nefsen402cat /proc/swaps#asahi · 2023-12-23 13:11
Nefsen402kidplayer666: Is it real swap or compressed zram?#asahi · 2023-12-23 12:49
Nefsen402supprised they aren't marketing a 8gb machine with 8gb of swap as a 16gb machine yet#asahi · 2023-12-23 12:48
Nefsen402more of a criticism to apple