#
#asahi-gpu · 2023-02-26 02:25
alyssathat's kinda neat :p
#asahi-gpu · 2023-02-26 02:25
alyssaWe might be the first 100% explicit sync gallium driver
#asahi-gpu · 2023-02-26 02:24
linaOkay, now where do I plug this in for us...
#asahi-gpu · 2023-02-26 02:24
alyssaYeah, that's what I expected
#asahi-gpu · 2023-02-26 02:24
linaalyssa: Good news: it's in common WSI code! Bad news: it's in common *Vulkan* WSI code. ^^;;
#asahi-gpu · 2023-02-26 02:22
linaI get the feeling what we're doing now is *sufficient* for correct WSI but may not be what is actually expected of us...
#asahi-gpu · 2023-02-26 02:22
alyssahahahaha :(
#asahi-gpu · 2023-02-26 02:21
linaFingers crossed it's a magic cap we set and mesa does it for us ^^
#asahi-gpu · 2023-02-26 02:21
linaLet me look for the DMA-BUF stuff...
#asahi-gpu · 2023-02-26 02:21
alyssaand the firefox wonkiness suggests that not all is right in oz
#asahi-gpu · 2023-02-26 02:20
alyssaI am worried about the WSI story
#asahi-gpu · 2023-02-26 02:20
alyssaI'm not worried about optimizing those barriers(yet)
#asahi-gpu · 2023-02-26 02:20
alyssaright.. ok
#asahi-gpu · 2023-02-26 02:19
linaBut 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...
#asahi-gpu · 2023-02-26 02:19
linaAs 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.
#asahi-gpu · 2023-02-26 02:17
linaI 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.
#asahi-gpu · 2023-02-26 02:17
linaOf 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...
#asahi-gpu · 2023-02-26 02:16
linaThis 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)
#asahi-gpu · 2023-02-26 02:15
linawe don't
#asahi-gpu · 2023-02-26 02:15
linaOn 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
#asahi-gpu · 2023-02-26 02:14
linaalyssa: 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)
#asahi-gpu · 2023-02-26 01:59
alyssafreedreno is probably closest to what we want, but
#asahi-gpu · 2023-02-26 01:59
alyssaand every driver I look at does something different and the docs are pretty vague
#asahi-gpu · 2023-02-26 01:59
alyssahonestly I don't understand how any of agx_flush/agx_fence_create work
#asahi-gpu · 2023-02-26 01:54
alyssaIt'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)
#asahi-gpu · 2023-02-26 01:53
alyssaIs there a possibility that the second batch reads the wrong contents of A?
#asahi-gpu · 2023-02-26 01:53
alyssabefore that batch is completed, there is a second batch that reads resource A that gets flushed
#asahi-gpu · 2023-02-26 01:52
alyssalina: Potential race, what happens if we flush (but do not sync) a batch writing resource A?
#asahi-gpu · 2023-02-26 01:41
alyssathis stuff is way too complicated
#asahi-gpu · 2023-02-26 01:39
alyssamaybe if I fix that, firefox will fix itself
#asahi-gpu · 2023-02-26 01:39
alyssaand all this ctx->syncobj stuff doesn't make much sense to me in an explicit sync world
#asahi-gpu · 2023-02-26 01:38
alyssaI'm especially suspicious of agx_fence_create
#asahi-gpu · 2023-02-26 01:36
alyssadoesn't trust any of the fencing code
#asahi-gpu · 2023-02-26 01:27
alyssaso what other fence is freedreno using that we're not
#asahi-gpu · 2023-02-26 01:26
alyssaoh but holy broken
#asahi-gpu · 2023-02-26 01:26
alyssai think
#asahi-gpu · 2023-02-26 01:26
alyssathis is worth another 6% on manhattan
#asahi-gpu · 2023-02-26 01:26
alyssafreedreno + explicit sync doesn't seem to do anything for flush resource
#asahi-gpu · 2023-02-26 01:26
alyssaAlso, I am not convinced that it's necessary to sync in flush_resource
#asahi-gpu · 2023-02-26 01:19
alyssaoh well
#asahi-gpu · 2023-02-26 01:19
alyssamaybe I screwed something up
#asahi-gpu · 2023-02-26 01:19
alyssacan't reproduce now
#asahi-gpu · 2023-02-26 00:59
alyssascratch #2
#asahi-gpu · 2023-02-26 00:59
alyssahm wait the apitrace might be from my sysval rewrite being broken
#asahi-gpu · 2023-02-26 00:49
alyssaOnce 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
#asahi-gpu · 2023-02-26 00:47
alyssa2. 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.
#asahi-gpu · 2023-02-26 00:46
alyssaI'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
#asahi-gpu · 2023-02-26 00:45
alyssa(and the glitching when typing is especially noticeable so probably easier to work with)
#asahi-gpu · 2023-02-26 00:44
alyssaThere are other visual artefacts with Firefox in GNOME, but I assume they have the same root cause
#asahi-gpu · 2023-02-26 00:44
alyssaThis is especially noticeable when typing into chat in discord.com

plus ›