2023-02-26
00:04possiblemeatball has joined #asahi-gpu
00:32alyssa has joined #asahi-gpu
00:39alyssahttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21538 has the subset that I think can be upstreamed
00:42alyssa1. Even with ASAHI_MESA_DEBUG=sync, there are serious sync glitches with Firefox, at least when WebRender is used (as is the case on agx/next, didn't test without). This is a WSI issue: it happens in GNOME but not in Sway. It might also have to do with Xwayland vs native wayland.
00:43alyssaAt least with (explicit sync + Firefox + WebRender + GNOME), the rendered content is sometimes from a previous frame instead of a current frame, or at least partially so
00:43alyssaThe most obvious symptom is typing into some input fields and not seeing the most recently typed character
00:44alyssaThere are other visual artefacts with Firefox in GNOME, but I assume they have the same root cause
00:46alyssaI'm unsure if {Plasma, Firefox without WebRender} are affected but IMO this regression is blocking even if it's not ... and unless this is a Firefox bug it seems likely it can be hit with things other than Firefox, this is just what I noticed on day #1 of testing
00:47alyssa2. For some reason one of the apitraces I have runs fine (and much faster I think!) in debugoptimized, but faults in release. I have not yet root caused this one. This is not blocking.
00:49alyssaOnce the Firefox regression is sorted, asusming no other regressions come up this week, I'll cut a new asahi/main release on top of the explicit sync UAPI and that should be good to go then
00:58hightower2 has quit [Ping timeout: 480 seconds]
01:16nela has quit [Ping timeout: 480 seconds]
01:36nela has joined #asahi-gpu
01:52alyssalina: Potential race, what happens if we flush (but do not sync) a batch writing resource A?
01:53alyssabefore that batch is completed, there is a second batch that reads resource A that gets flushed
01:54alyssaIt's submitted in the proper order but I don't see any fence/barrier between the two batches (i.e. in agx_flush_writer for batches that are submitted and not active)
02:03akspecs_ has joined #asahi-gpu
02:04tertu2 has joined #asahi-gpu
02:04nepeat_ has joined #asahi-gpu
02:05codingkoopa3 has joined #asahi-gpu
02:06Lightsword_ has joined #asahi-gpu
02:07Z750 has quit [resistance.oftc.net larich.oftc.net]
02:07djorz has quit [resistance.oftc.net larich.oftc.net]
02:07tertu has quit [resistance.oftc.net larich.oftc.net]
02:07akspecs has quit [resistance.oftc.net larich.oftc.net]
02:07nepeat has quit [resistance.oftc.net larich.oftc.net]
02:07wicastC has quit [resistance.oftc.net larich.oftc.net]
02:07alyssa has quit [resistance.oftc.net larich.oftc.net]
02:07hxliew has quit [resistance.oftc.net larich.oftc.net]
02:07Lightsword has quit [resistance.oftc.net larich.oftc.net]
02:07codingkoopa has quit [resistance.oftc.net larich.oftc.net]
02:07hxliew has joined #asahi-gpu
02:08wicastC has joined #asahi-gpu
02:10Z750 has joined #asahi-gpu
02:11alyssa has joined #asahi-gpu
02:14linaalyssa: All batches are submitted with BARRIER_RENDER | BARRIER_COMPUTE, which tells the backend code to insert a fence on the last render and compute commands submitted (if any - the kernel will elide that if it already got a completion notification and it knows the GPU queue is idle, since at that point it doesn't even have event IDs attached so there is nothing to fence on)
02:15linaOn the other hand, we could elide that when we know we do *not* have such a dependency, which I was thinking is the case whenever we submit batches back to back (e.g. whenever we flush_all and there is more than one batch to flush, I think we can avoid that barrier for all but the first, since they're guaranteed not to have any dependencies, otherwise they would have been flushed already), but right now
02:16linaThis is the "currently vertex and fragment are serialized" issue (if you remove those barriers, vertex for batch+1 can run concurrent with fragment for batch)
02:17linaOf course this is all cache issues aside. If we run into cache issues between back to back submissions themselves (like the CPU->GPU one I ran into) we probably need to set more bits in that VDM Barrier command...
02:17linaI still don't know exactly what caches the firmware flushes, when, and how to control any of that. We still have at least 3 mystery bits of freedom in the submission commands.
02:19linaAs for the WSI, my understanding is that that ctx->syncobj is supposed to just track the last submitted batch, so that when WSI wants a barrier on "all past work" we just clone that.
02:19linaBut there is the whole attaching fences to dma-bufs story that I haven't looked at at all... I don't know how the mesa hooks for that work, if it isn't all taken care of by gallium already based on the existing fence support...
02:22linaI get the feeling what we're doing now is *sufficient* for correct WSI but may not be what is actually expected of us...
02:24linaalyssa: Good news: it's in common WSI code! Bad news: it's in common *Vulkan* WSI code. ^^;;
02:24kesslerd_ has joined #asahi-gpu
02:24djorz has joined #asahi-gpu
02:25linaSo do, like, other pure explicit sync drivers not exist? Because that is the only usage of this API anywhere in mesa...
02:26alyssaIt wasn't been possible to have a pure explicit sync Linux (not Android) driver before the ioctls
02:27alyssalina: Good news for you: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20418.patch
02:28alyssaI see DMA_BUF_IOCTL_EXPORT_SYNC_FILE and DMA_BUF_IOCTL_IMPORT_SYNC_FILE in there for their gallium driver
03:40cylm has joined #asahi-gpu
05:05possiblemeatball has quit [Quit: Quit]
05:17kesslerd has quit [Remote host closed the connection]
05:18kesslerd_ has quit [Remote host closed the connection]
05:19kesslerd has joined #asahi-gpu
05:34kesslerd has quit [Remote host closed the connection]
07:09linaalyssa: Fixed the Firefox issue, it turns out we need to make resources shareable in flush_resource... so now it has to blit if not already shareable.
07:09linaAlso the ail stuff for multisampling compression is wrong, I threw in a random guess but that needs tests. That fixed WebGL Aquarium.
07:16linaWooooah I don't know if this is me removing the sync in flush_resource or something you did, but glmark2 just jumped up a ton. Like, from 4500 to 6600 (!!)
07:21linaThat's on GBM, a bit less on Wayland but the output looks legit... I don't think it's fast because it's broken...
09:48bisko has joined #asahi-gpu
10:08wixde has joined #asahi-gpu
10:25bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
10:42nyilas has joined #asahi-gpu
10:45chipxxx has joined #asahi-gpu
10:50chip_x has quit [Ping timeout: 480 seconds]
10:54chip_x has joined #asahi-gpu
10:57chip__ has joined #asahi-gpu
10:58chip_x has quit [Remote host closed the connection]
11:00chipxxx has quit [Ping timeout: 480 seconds]
11:38hightower2 has joined #asahi-gpu
11:42wixde has quit [Ping timeout: 480 seconds]
11:45ChaosPrincess has quit [Quit: WeeChat 3.8]
11:46ChaosPrincess has joined #asahi-gpu
11:46chip_x has joined #asahi-gpu
11:52chip__ has quit [Ping timeout: 480 seconds]
13:11possiblemeatball has joined #asahi-gpu
13:26kesslerd has joined #asahi-gpu
13:28kesslerd has quit []
13:35chipxxx has joined #asahi-gpu
13:39maria6 has joined #asahi-gpu
13:39maria has quit [Ping timeout: 480 seconds]
13:39maria6 is now known as maria
13:40chip_x has quit [Ping timeout: 480 seconds]
14:37chipxxx has quit [Remote host closed the connection]
14:37chipxxx has joined #asahi-gpu
14:40wixde has joined #asahi-gpu
14:44Cromulent has joined #asahi-gpu
15:15linaI still get some weird hangs though... I think something is still broken, probably in WSI ^^;;;
15:20le0n has quit [Remote host closed the connection]
15:21le0n has joined #asahi-gpu
15:35bisko has joined #asahi-gpu
15:42bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
15:43kesslerd has joined #asahi-gpu
15:44kesslerd has quit []
15:47bisko has joined #asahi-gpu
15:53wixde has quit [Ping timeout: 480 seconds]
15:55bisko has quit [Ping timeout: 480 seconds]
15:55kesslerd has joined #asahi-gpu
15:56wixde has joined #asahi-gpu
16:08chip_x has joined #asahi-gpu
16:14chipxxx has quit [Ping timeout: 480 seconds]
16:53bluetail has quit [Quit: The Lounge - https://thelounge.chat]
16:56bisko has joined #asahi-gpu
16:59cy8aer has quit [Remote host closed the connection]
17:04bisko has quit [Ping timeout: 480 seconds]
17:11bluetail has joined #asahi-gpu
17:13cylm has quit [Ping timeout: 480 seconds]
17:17alyssaand I'm still not convinced there's not a register or two we're not yet exposing in the uapi so I was going to leave it to you to work through the deqps when you had some time
18:31Cromulent has quit [Quit: Connection closed for inactivity]
18:34possiblemeatball has quit [Quit: Quit]
19:04bisko has joined #asahi-gpu
19:08possiblemeatball has joined #asahi-gpu
19:13bisko has quit [Ping timeout: 480 seconds]
19:35Dementor has quit [Read error: Connection reset by peer]
19:35Dementor has joined #asahi-gpu
20:01bisko has joined #asahi-gpu
20:09bisko has quit [Ping timeout: 480 seconds]
20:18bisko has joined #asahi-gpu
20:26bisko has quit [Ping timeout: 480 seconds]
20:49nyilas has quit [Remote host closed the connection]
20:52bisko has joined #asahi-gpu
20:58wixde has quit [Read error: Connection reset by peer]
21:00bisko has quit [Ping timeout: 480 seconds]
21:18chipxxx has joined #asahi-gpu
21:23bluetail has quit [Quit: The Lounge - https://thelounge.chat]
21:24chip_x has quit [Ping timeout: 480 seconds]
21:32chipxxx has quit [Remote host closed the connection]
21:32chipxxx has joined #asahi-gpu
21:42pbsds has quit [Quit: The Lounge - https://thelounge.chat]
21:43pbsds has joined #asahi-gpu
21:58bluetail has joined #asahi-gpu
22:04FLHerne_ has joined #asahi-gpu
22:05grange_c68 has joined #asahi-gpu
22:05JoshuaAshton has quit [Ping timeout: 480 seconds]
22:05qdot has quit [Read error: Connection reset by peer]
22:05qdot has joined #asahi-gpu
22:05akemin_dayo has quit [Remote host closed the connection]
22:05JoshuaAshton has joined #asahi-gpu
22:05FLHerne has quit [Read error: Connection reset by peer]
22:06FLHerne_ is now known as FLHerne
22:06grange_c6 has quit [Write error: connection closed]
22:06grange_c68 is now known as grange_c6
22:06akemin_dayo has joined #asahi-gpu
22:17alyssaMESA: warning: [Batch 8] Render (pending): TVB 0/ 0 bytes (0 ovf) | vtx 0.000000 frag 0.000000
22:17alyssaThrive: ../src/gallium/drivers/asahi/agx_batch.c:228: agx_batch_print_stats: Assertion `info->status == DRM_ASAHI_STATUS_COMPLETE' failed.
22:17alyssa$ MESA_GL_VERSION_OVERRIDE=3.3 ASAHI_MESA_DEBUG=deqp DISPLAY=:0 apitrace replay --loop=1000 ~/Downloads/godot-thrive.trace
22:17alyssawith the trace here https://gitlab.freedesktop.org/gfx-ci/tracie/traces-db/-/blob/master/godot/godot-thrive.trace
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:01yrlf has joined #asahi-gpu
23:31rowanG337 has joined #asahi-gpu
23:40possiblemeatball has quit [Quit: Quit]
23:53stipa is now known as Guest6002
23:53stipa has joined #asahi-gpu
23:55Guest6002 has quit [Ping timeout: 480 seconds]