#asahi-gpu · 2023-02-26 00:43
alyssaThe most obvious symptom is typing into some input fields and not seeing the most recently typed character#asahi-gpu · 2023-02-26 00:43
alyssaAt 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#asahi-gpu · 2023-02-26 00:42
alyssa1. 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.#asahi-gpu · 2023-02-26 00:40
alyssaHowever, there are some regressions#asahi-gpu · 2023-02-26 00:40
alyssaand agx/next has everything integratino#asahi-gpu · 2023-02-26 00:39
alyssahttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21538 has the subset that I think can be upstreamed#asahi-gpu · 2023-02-26 00:32
alyssa(the mesa ones, obviously didn't touch the kernel)#asahi-gpu · 2023-02-26 00:32
alyssalina: I've squashed+rebased your explicit sync patches#asahi-gpu · 2023-02-22 17:28
linaThe VDM barrier is userspace, firmware structs are kernel#asahi-gpu · 2023-02-22 17:27
linaAt least none of the pending unknowns I have helped#asahi-gpu · 2023-02-22 17:27
linaYeah, that's what that VDM barrier seems to accomplish. I don't know if there is another way, like a field in the firmware structs...#asahi-gpu · 2023-02-22 17:27
cwabbottI know on freedreno flushing is handled by the kernel too#asahi-gpu · 2023-02-22 17:27
cwabbottah, maybe just need to clean?#asahi-gpu · 2023-02-22 17:26
linaI think the flushing is handled by the firmware, I already ran into that with compute and it seems to be related to a sequence number in some firmware structures.#asahi-gpu · 2023-02-22 17:26
cwabbottthere should be a flush and invalidate/clean command and you probably also need to flush at the end of a submission in addition to cleaning at the beginning#asahi-gpu · 2023-02-22 17:24
cwabbottthere's probably a similar sort of requirement with gallium#asahi-gpu · 2023-02-22 17:24
cwabbottlina: I don't know how things work in GL, but for vulkan, there's a line in the spec that all user writes become visible to the GPU upon submit, so if your GPU has any sort of non-coherent cache then you have to invalidate it at the beginning and flush it at the end of a submission#asahi-gpu · 2023-02-22 16:28
marcansure it is, unless you're actively developing the driver it goes in #asahi#asahi-gpu · 2023-02-22 16:28
kotleniIt's just not regular questions...#asahi-gpu · 2023-02-22 16:28
kotleniSorry, :>#asahi-gpu · 2023-02-22 16:27
marcankotleni: this is not a support channel, see the blog for how to install the driver (you don't need to build anything) or go to #asahi if you have questions.#asahi-gpu · 2023-02-22 16:26
kotleniI builded all PKGBUILDs from github, but driver for gpu not installed (i still use llvmpipe for rendering.#asahi-gpu · 2023-02-22 16:26
kotleniHello. Driver now integrated to linux kernel?#asahi-gpu · 2023-02-22 16:25
linaMESA: warning: [Batch 1] Render Complete: TVB 196608/ 9306112 bytes (0 ovf) G | vtx 0.000005 frag 0.000015#asahi-gpu · 2023-02-22 16:25
linaMESA: warning: [Batch 4] Render Complete: TVB 196608/ 1048576 bytes (0 ovf) | vtx 0.000006 frag 0.000035#asahi-gpu · 2023-02-22 16:25
linaMESA: warning: [Batch 0] Render Complete: TVB 196608/ 1048576 bytes (0 ovf) | vtx 0.000005 frag 0.000018#asahi-gpu · 2023-02-22 16:25
linaMESA: warning: [Batch 2] Render Complete: TVB 3080192/ 1048576 bytes (3 ovf) O | vtx 0.001174 frag 0.000807#asahi-gpu · 2023-02-22 16:25
linaMESA: warning: [Batch 1] Render Complete: TVB 196608/ 1048576 bytes (0 ovf) | vtx 0.000006 frag 0.000011#asahi-gpu · 2023-02-22 16:24
linaSo now with ASAHI_MESA_DEBUG=stats you get this:#asahi-gpu · 2023-02-22 16:21
linaThat mystery didn't take up my whole day, so I still had time to implement render stats and fault feedback ^^#asahi-gpu · 2023-02-22 16:21
linaglmark2 got another speed bump too, and I saw terrain at over 180 FPS now#asahi-gpu · 2023-02-22 16:20
linaSo now we're back to passing the dEQPs, GLES2 and EGL, except now with no flakes and with gallium sync = flush, not sync ^^#asahi-gpu · 2023-02-22 16:20
linaBut trying random stuff I found out that one bit in the VDM barrier command you found fixes everything, so now I always put one of those at the beginning of every batch.#asahi-gpu · 2023-02-22 16:19
linaI don't know what the "official" way to fix this is, it's possible macOS just never hits it because it never actually pipelines GL commands into hardware queues? (It might always roundtrip through the CPU)#asahi-gpu · 2023-02-22 16:17
linaMy conclusion was that the USC caches persist and are not invalidated when you queue things back to back on the GPU, so if the CPU writes some vertices to a VBO, submits a batch, writes some more, submits another batch, the first one could load a whole cache line before the second one's vertices were written, and then the second one would read those (usually just the first vertex) as zero from the cache.#asahi-gpu · 2023-02-22 16:15
linaBut then there was a much subtler thing that had me stuck for a while... some dEQPs would flake, rarely. The symptom on at least some tests was that a vertex would be processed as all-0, rarely (but always the same one for any given test).#asahi-gpu · 2023-02-22 16:13
linaThe actual big bug was really obvious, that only took an hour or so to find... I wasn't clearing ctx->batch so after a submission things kept getting piled onto the same batch.#asahi-gpu · 2023-02-22 16:12
linaalyssa: Explicit sync should be fixed! ^^#asahi-gpu · 2023-02-22 03:54
ktzyeah you're right, that's all from me, wish you the best once more!#asahi-gpu · 2023-02-22 03:53
ktzreally? I should have sent you some pictures then, I did many surgeries on my poor machine hehe, its resting in peace now#asahi-gpu · 2023-02-22 03:53
ktzif you ever need to reproduce it there goes my sway config https://git.sr.ht/~ktz/sway, rest is typical, both with rtkit and without if that makes any difference#asahi-gpu · 2023-02-22 03:52
marcanprobably best on #asahi or #asahi-offtopic though#asahi-gpu · 2023-02-22 03:52
marcanI have no idea lol, there may be one on the board? I've never taken one of these machines apart#asahi-gpu · 2023-02-22 03:52
ktzoh by the way since we're here, something I wanted to ask for some time now, is there any other antenna I can physically locate besides the two main ones which plug on the mainboard? even when physically unplugging the machine can do wireless with no problem#asahi-gpu · 2023-02-22 03:51
marcanlots of subtleties#asahi-gpu · 2023-02-22 03:51
marcan(or you could get the same experience forcing the CPU governor to performance and tasksetting everything that matters to the p-cores, even with the drivers)#asahi-gpu · 2023-02-22 03:50
marcanso it's possible you have fewer of those rare dropped frames than I do, though it would be a very minor difference, and definitely not worth burning CPU for it, and we can fix that with the scheduler tweaks we discussed#asahi-gpu · 2023-02-22 03:50
marcanAlso another counterintuitive thing: with a 300+FPS uncapped setup like yours, you'll be pegging the CPUs, which means you will actually have fewer chances of higher latency problems when the scheduler downclocks CPUs or tries to run things on the e-cores (this is what we were talking about earlier)#asahi-gpu · 2023-02-22 03:46
ktzhehe, thanks for elaborating buddy, appreciate your time, you're the man