#
…

2022-12-15

00:05Gaspare has quit [Quit: Gaspare]
00:11cylm_ has quit [Ping timeout: 480 seconds]
01:36dorkbutt has quit [Read error: Connection reset by peer]
02:11smoke has joined #asahi-gpu
02:37swaggie has quit [Remote host closed the connection]
03:06c10l has quit [Read error: Connection reset by peer]
03:06c10l has joined #asahi-gpu
03:08pjakobsson has joined #asahi-gpu
03:11pjakobsson_ has quit [Ping timeout: 480 seconds]
03:17amarioguy has joined #asahi-gpu
03:17amarioguy has quit [Remote host closed the connection]
03:18amarioguy has joined #asahi-gpu
03:52user982492 has joined #asahi-gpu
04:20swaggie has joined #asahi-gpu
05:06smoke has quit []
05:09pjakobsson_ has joined #asahi-gpu
05:10WindowPain_ is now known as WindowPain
05:12pjakobsson has quit [Ping timeout: 480 seconds]
05:41user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:59swaggie has quit [Remote host closed the connection]
07:27c10l has quit [Quit: Ping timeout (120 seconds)]
07:39swaggie has joined #asahi-gpu
07:42c10l has joined #asahi-gpu
07:47swaggie has quit [Ping timeout: 480 seconds]
07:53swaggie has joined #asahi-gpu
08:05linaYay! ^^
08:19c10l has quit [Quit: Ping timeout (120 seconds)]
08:28SSJ_GZ has joined #asahi-gpu
08:34c10l has joined #asahi-gpu
09:18galileo has joined #asahi-gpu
09:20c10l has quit [Ping timeout: 480 seconds]
09:21galileo has quit [Remote host closed the connection]
09:22galileo has joined #asahi-gpu
09:24c10l has joined #asahi-gpu
09:26galileo has quit [Remote host closed the connection]
09:27galileo has joined #asahi-gpu
09:30galileo has quit [Remote host closed the connection]
09:36galileo has joined #asahi-gpu
09:49galileo has quit [Remote host closed the connection]
09:59swaggie has quit [Remote host closed the connection]
09:59swaggie has joined #asahi-gpu
10:06galileo has joined #asahi-gpu
10:07swaggie has quit [Ping timeout: 480 seconds]
10:13MajorBiscuit has joined #asahi-gpu
10:13c10l has quit [Ping timeout: 480 seconds]
10:22c10l has joined #asahi-gpu
10:26galileo has quit [Remote host closed the connection]
10:31swaggie has joined #asahi-gpu
10:32galileo has joined #asahi-gpu
10:39swaggie has quit [Ping timeout: 480 seconds]
10:47pjakobsson has joined #asahi-gpu
10:48galileo has quit [Remote host closed the connection]
10:50pjakobsson_ has quit [Ping timeout: 480 seconds]
10:51handlerughas glReadPixels been implemented or optimized? just wondering because I believe wlr-screencopy-unstable-v1 uses glReadPixels, and for some reason screenshots take around 4 seconds
11:00MajorBiscuit has quit [Quit: WeeChat 3.6]
11:01MajorBiscuit has joined #asahi-gpu
11:02r0ni has quit [Quit: Textual IRC Client: www.textualapp.com]
11:05swaggie has joined #asahi-gpu
11:05galileo has joined #asahi-gpu
11:07c10l has quit [Ping timeout: 480 seconds]
11:07galileo has quit [Remote host closed the connection]
11:10c10l has joined #asahi-gpu
11:15bcrumb has joined #asahi-gpu
11:15galileo has joined #asahi-gpu
11:26swaggie has quit [Ping timeout: 480 seconds]
11:28galileo has quit [Remote host closed the connection]
11:28bcrumb has quit [Quit: WeeChat 3.7.1]
11:30galileo has joined #asahi-gpu
11:34bcrumb has joined #asahi-gpu
11:40cylm_ has joined #asahi-gpu
11:48bcrumb has quit [Read error: Connection reset by peer]
11:50galileo has quit [Remote host closed the connection]
11:50c10l has quit [Quit: Ping timeout (120 seconds)]
11:51swaggie has joined #asahi-gpu
12:01swaggie has quit [Ping timeout: 480 seconds]
12:03galileo has joined #asahi-gpu
12:05c10l has joined #asahi-gpu
12:06galileo has quit [Remote host closed the connection]
12:10galileo has joined #asahi-gpu
12:12galileo has quit [Remote host closed the connection]
12:13galileo has joined #asahi-gpu
12:19galileo has quit [Remote host closed the connection]
12:32bcrumb has joined #asahi-gpu
12:42galileo has joined #asahi-gpu
12:44galileo has quit [Remote host closed the connection]
12:46Gaspare has joined #asahi-gpu
12:47c10l has quit [Quit: Ping timeout (120 seconds)]
12:48galileo has joined #asahi-gpu
12:50galileo has quit [Remote host closed the connection]
12:59galileo has joined #asahi-gpu
13:03galileo has quit [Remote host closed the connection]
13:11bcrumb has quit [Ping timeout: 480 seconds]
13:12galileo has joined #asahi-gpu
13:18galileo has quit [Remote host closed the connection]
13:18Gaspare has quit [Quit: Gaspare]
13:23galileo has joined #asahi-gpu
13:34galileo has quit [Remote host closed the connection]
13:35galileo has joined #asahi-gpu
13:45galileo has quit [Remote host closed the connection]
13:46galileo has joined #asahi-gpu
13:47galileo has quit [Remote host closed the connection]
13:57galileo has joined #asahi-gpu
13:58galileo has quit []
14:02iaguis has joined #asahi-gpu
15:15MajorBiscuit has quit [Read error: Connection reset by peer]
15:34swaggie has joined #asahi-gpu
15:42swaggie has quit [Ping timeout: 480 seconds]
16:05LinuxM1 has joined #asahi-gpu
16:06swaggie has joined #asahi-gpu
16:14swaggie has quit [Ping timeout: 480 seconds]
16:37swaggie has joined #asahi-gpu
16:45swaggie has quit [Ping timeout: 480 seconds]
17:19iaguis has quit [Quit: leaving]
17:26swaggie has joined #asahi-gpu
17:38swaggie has quit [Ping timeout: 480 seconds]
17:51LinuxM1 has quit [Quit: Leaving]
19:02bcrumb has joined #asahi-gpu
19:05bcrumb has quit []
19:48alyssa has joined #asahi-gpu
19:49alyssahandlerug: Implemented, yes. Optimized, no. But 4 seconds seems... excessive.
19:50alyssaon an M1 Mini at 4K, `grim` in sway takes 0.34s
19:50alyssa(granted this on a release build of agx/next but it should be similar on what lina ships)
19:50handlerughuh. my machine is MacBook M1 Max 16", same grim + sway setup
19:50alyssaWhat does top show during that 4s?
19:50alyssa100% cpu usage? 3% cpu? very different implications :p
19:50handlerugthe compositor freezes so I'm not sure I will be able to see what top shows :P
19:50alyssaahah right
19:50handleruglemme ssh in
19:51alyssaI don't think I have anything interesting in agx/next right now
19:51alyssalina: shit!
19:52alyssalina: asahi/mesa needs f5dd101ab69 ("asahi: Set flatshading controls appropriately")
19:52alyssathat'll probably fix Darwinia
19:52alyssaI thought that was already merged upstream >.>
19:52alyssaand e643d9b6937 ("asahi: Identify XML for more flatshading controls")
19:53alyssaand 2a094ba5b8d ("asahi,agx,nir: Implement depth and stencil export") for good measure
19:53alyssaapparently I do have interesting things in agx/next that I forgot about
19:53handlerugalyssa: "grim 1.00s user 0.01s system 36% cpu 2.787 total", and sway at 100% CPU
19:54bcrumb has joined #asahi-gpu
19:55handlerugthat's when screenshotting the game Celeste. when screenshotting the foot terminal emulator (which uses CPU for rendering), grim takes 1.7s, but it's still quite a lot imo
19:58renatorabelo has joined #asahi-gpu
19:58bluetail has quit [Read error: Connection reset by peer]
19:58bluetail has joined #asahi-gpu
20:05bluetail has quit [Read error: Connection reset by peer]
20:05bluetail has joined #asahi-gpu
20:10Gaspare has joined #asahi-gpu
20:10bcrumb has quit [Quit: WeeChat 3.7.1]
20:11bcrumb has joined #asahi-gpu
20:16alyssahandlerug: yes that's indeed excessive
20:17alyssaCan you install `sysprof`, run `sysprof-cli screenshot.trace`, run grim (with Celeste or foot), ctrl-c out of `sysprof-cli` and send me the resulting screenshot.trace file?
20:17alyssa(You can preview it with `sysprof screenshot.trace`)
20:17bcrumb has quit [Quit: WeeChat 3.7.1]
20:19Gaspare has quit [Quit: Gaspare]
20:23handlerugsent in private messages
20:25bcrumb has joined #asahi-gpu
20:29bluetail has quit [Ping timeout: 480 seconds]
20:39bcrumb has quit [Quit: WeeChat 3.7.1]
20:56alyssahandlerug: Okay, I've looked at the trace and reproduced similar issues locally
20:56alyssaThere are three slowdowns here:
20:57alyssa1. Format conversion. Because we don't prefer blit-based texture transfer*, mesa/st falls back to software conversion. This would be more efficiently done on the GPU, especially once we have framebuffer compression with the DCP (we don't yet).
20:58alyssa Solution: prefer blit-based texture transfer. Most texture transfers will use a staging blit internally anyway for compression, or worse tile on the CPU, so this is probably good in practice.
20:59alyssa2. Read from write-combine memory (i.e. uncached) from the CPU. The framebuffer, as well as the staging resource used with the blit, are both write-combine which makes readback from the CPU very slow.
20:59alyssa Solution: allocate the staging resource as writeback (instead of write-combine), since we know that we will be reading from the CPU. The copy from framebuffer->staging happens on the GPU so the cache is ok there.
21:00alyssa3. deflate is slow. With #1 and #2 solved, depending on the content grim still spends inordinate amounts of time in deflate() in zlib internal to libpng. That's not our fault, and with #1 and #2 fixed, using `grim -t ppm` instead is generally quite fast.
21:01alyssa Solution: use JPEG with the JPEG hardware encoder.
21:02alyssahttps://rosenzweig.io/wip.diff -- this enables blit based compression (solution for #1) and disables write caching (very blunt hammer to workaround #2, the proper fix requires plumbing some flags around the driver which isn't hard but needs some care)
21:05alyssahttps://github.com/zlib-ng/zlib-ng is probably worth a try for #3
21:05cr1901_ has joined #asahi-gpu
21:06amarioguy has quit [Remote host closed the connection]
21:06cr1901 has quit [Read error: Connection reset by peer]
21:06renato has joined #asahi-gpu
21:06amarioguy has joined #asahi-gpu
21:08alyssamore to the point -- upstream zlib doesn't have NEON optimizations which will penalize png compression on arm systems
21:09alyssaI don't know enough about the various zlib forks to recommend one, it looks like Chromium is carrying a pile of patches of their own
21:09alyssa(including NEON support)
21:10* handlerugis building mesa to test the patch
21:11alyssanot sure I recommend using that patch in general since it's had zero testing other than "grim is faster now" :p
21:11alyssabut YMMV :p
21:12handlerugeh I thought I'd see if it also worked on this machine
21:12handlerugweird how it's much faster on mac mini
21:12handlerugthanks for the writeup and research!
21:13alyssawhat's weird about that?
21:13renatorabelo has quit [Ping timeout: 480 seconds]
21:13alyssaIt's unclear whether blit-based texture transfer should be preferred on integrated GPUs... the gallium docs say blit-based for discrete GPUs and transfer-based for software rasterizers...
21:13alyssairis uses blit-based everywhere
21:13handlerugI am not sure what is the key difference between M1 and M1 Max that makes it faster
21:14alyssav3d uses blit based and says they don't want to for perf for glReadPixels because of the uncached read after.. hm
21:16alyssazink uses blit, except for anv/radv where it uses compute
21:16alyssafreedreno uses transfer
21:21swaggie has joined #asahi-gpu
21:23alyssaI think I want to map PIPE_USAGE_STAGING to writeback and everything else to write-combine and that should do what we want (including for readpix)
21:35bcrumb has joined #asahi-gpu
21:41bcrumb has quit [Quit: WeeChat 3.7.1]
21:49bcrumb has joined #asahi-gpu
21:52bcrumb has quit []
21:56dorkbutt has joined #asahi-gpu
21:57dorkbutt has quit [Max SendQ exceeded]
21:59swaggie has quit [Remote host closed the connection]
22:01swaggie has joined #asahi-gpu
22:11cr1901_ is now known as cr1901
22:11alyssa has left #asahi-gpu [#asahi-gpu]
22:25renatorabelo has joined #asahi-gpu
22:25javier_varez__ has joined #asahi-gpu
22:26zzywysm_ has joined #asahi-gpu
22:27jbowen_ has joined #asahi-gpu
22:28Method_ has joined #asahi-gpu
22:28jbowen has quit [Ping timeout: 480 seconds]
22:28zzywysm has quit [Read error: Connection reset by peer]
22:28digicyc has quit [Remote host closed the connection]
22:28javier_varez_ has quit [Ping timeout: 480 seconds]
22:28javier_varez__ is now known as javier_varez_
22:28jbowen_ has quit []
22:28digicyc has joined #asahi-gpu
22:29jbowen_ has joined #asahi-gpu
22:29renato has quit [resistance.oftc.net larich.oftc.net]
22:29Method has quit [resistance.oftc.net larich.oftc.net]
22:29ids1024 has quit [resistance.oftc.net larich.oftc.net]
22:29jbowen_ has quit [resistance.oftc.net larich.oftc.net]
22:30ids1024 has joined #asahi-gpu
22:30renato has joined #asahi-gpu
22:30jbowen_ has joined #asahi-gpu
22:30Method has joined #asahi-gpu
22:30Method has quit [Ping timeout: 482 seconds]
22:31renato has quit [Ping timeout: 482 seconds]
22:42SSJ_GZ has quit [Ping timeout: 480 seconds]
23:10ajxu2 has joined #asahi-gpu
23:11ajxu2 has quit []
23:13yuka has quit [Remote host closed the connection]
23:13yuka has joined #asahi-gpu
23:31manawyrm has quit [Quit: Read error: 2.99792458 x 10^8 meters/second (Excessive speed of light)]
23:31manawyrm has joined #asahi-gpu
…