#asahi-gpu · 2022-12-13 19:20
alyssaThe issue is that I don't have bandwidth to mentor right now#asahi-gpu · 2022-12-13 19:20
alyssaI have a bunch of compiler tasks if someone wants that#asahi-gpu · 2022-12-13 19:19
alyssaiaguis: Looks good, please MR! :)#asahi-gpu · 2022-12-13 19:19
alyssai really need to start an "easy task board" and get Lina in the reviewing loop too#asahi-gpu · 2022-12-13 16:19
alyssa^ That change to Panfrost needs to be ported to Asahi (which originally copied the buggy Panfrost code)#asahi-gpu · 2022-12-13 16:19
alyssahttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20285#asahi-gpu · 2022-12-13 16:19
alyssaAnyone want an easy Mesa task?#asahi-gpu · 2022-12-08 23:09
alyssaso there's the relevant info, if jannau or lina or anyone else wants to write the fix#asahi-gpu · 2022-12-08 23:09
alyssaanyway I'm supposed to be on break right now but I was eating dinner and it clicked what was going wrong#asahi-gpu · 2022-12-08 23:08
alyssaonce in a patch to shrink the default encoder size, such that instead of allocating 0x80000 we only allocate 64k and then we end up hitting this issue at much smaller draw call counts, once in drawoverhead#asahi-gpu · 2022-12-08 23:07
alyssaand come to think of it I've actually hit this bug twice and not debugged in either case because I thought it was something else#asahi-gpu · 2022-12-08 23:07
alyssa10k fish at aquarium would probably hit it, 1k would probably not#asahi-gpu · 2022-12-08 23:06
alyssawhich explains how I missed it#asahi-gpu · 2022-12-08 23:06
alyssathis code path only triggers at high draw call counts#asahi-gpu · 2022-12-08 23:05
alyssaHere we allocating with 256 alignment, but maybe we need more than that#asahi-gpu · 2022-12-08 23:05
alyssahttps://gitlab.freedesktop.org/asahi/mesa/-/blob/main/src/gallium/drivers/asahi/agx_state.c#L2037#asahi-gpu · 2022-12-08 23:04
alyssabut it's possible there is a heavier alignment requirement#asahi-gpu · 2022-12-08 23:04
alyssathis indicates that the control stream ("encoder") is allocated as regular memory. so not the 32-bit thing#asahi-gpu · 2022-12-08 23:04
alyssahttps://gitlab.freedesktop.org/asahi/mesa/-/blob/main/src/gallium/drivers/asahi/agx_batch.c#L48#asahi-gpu · 2022-12-08 23:03
alyssaassert(batch_encoder_current + AGX_VDM_STREAM_LINK_LENGTH <= batch->encoder_end && "...")#asahi-gpu · 2022-12-08 23:03
alyssaensure_cmdbuf_has_space should probably also assert its own precondition#asahi-gpu · 2022-12-08 23:03
alyssait's also possibly the XML for VDM_STREAM_LINK itself is busted though I don't think so, because otherwise we couldn't trace across stream links (and we can)#asahi-gpu · 2022-12-08 23:02
alyssaI don't remember what macOS does#asahi-gpu · 2022-12-08 23:02
alyssai.e. low 32-bit perhaps?#asahi-gpu · 2022-12-08 23:02
alyssaI woudl also check whether we need any special allocation for the stream#asahi-gpu · 2022-12-08 23:01
alyssaIt's unclear whether that bug can be hit in practice, but if not it's only by accident#asahi-gpu · 2022-12-08 23:00
alyssawithout overflow on the link#asahi-gpu · 2022-12-08 23:00
alyssai.e. we need to make sure we left enough room for the next draw to link to a new stream#asahi-gpu · 2022-12-08 23:00
alyssaassert(batch_encoder_current + AGX_VDM_STREAM_LINK_LENGTH <= batch->encoder_end && "...")#asahi-gpu · 2022-12-08 23:00
alyssaWe actually need to assert something stronger:#asahi-gpu · 2022-12-08 22:59
alyssathat assert then is wrong#asahi-gpu · 2022-12-08 22:59
alyssahttps://gitlab.freedesktop.org/asahi/mesa/-/blob/main/src/gallium/drivers/asahi/agx_state.c#L2194#asahi-gpu · 2022-12-08 22:59
alyssaso that when we ensure there's room each time, there's actually room + enough for a final stream link for the *next* draw#asahi-gpu · 2022-12-08 22:59
alyssawe need to add AGX_VDM_STREAM_LINK_LENGTH to space at the beginning#asahi-gpu · 2022-12-08 22:59
alyssaOne bug jumps out:#asahi-gpu · 2022-12-08 22:57
alyssaI think this mechanism might be busted.#asahi-gpu · 2022-12-08 22:56
alyssajannau: https://gitlab.freedesktop.org/asahi/mesa/-/blob/main/src/gallium/drivers/asahi/agx_state.c#L2026#asahi-gpu · 2022-12-04 01:13
alyssa:D#asahi-gpu · 2022-12-03 03:45
alyssa(and why Linux was fine)#asahi-gpu · 2022-12-03 03:45
alyssaoh lol, pool allocations in magic.c mean the BO handles are wrong, I assume that's why macOS+mesa was unstable#asahi-gpu · 2022-12-02 20:51
alyssaregardless I only have a t8103 so I am going to *sweat* declare this is not my bug ;-p#asahi-gpu · 2022-12-02 20:50
alyssaor no?#asahi-gpu · 2022-12-02 20:44
alyssajannau: to be clear is that fixed with lina's commits from today?#asahi-gpu · 2022-12-02 16:56
alyssafd.o sysadmin, my manager at work, it's a small mesa world :-p#asahi-gpu · 2022-12-02 16:55
alyssaWho said anything about GitHub? :-D#asahi-gpu · 2022-12-02 16:47
alyssaexcept starring gstreamer#asahi-gpu · 2022-12-02 16:46
alyssaas in, created in 2018 and no activity in the whole time#asahi-gpu · 2022-12-02 16:46
alyssa@lina looks pretty inactive#asahi-gpu · 2022-12-02 16:46
alyssacan we get lina the @lina nick? lol#asahi-gpu · 2022-12-02 16:46
alyssaeric_engestrom: ..whoops, thank you